You would need to write a custom InputFormat which would return an
appropriate RecordReader based on the file format involved in each
InputSplit. You can have InputFormat#getSplits load InputSplits for both
file types and have InputFormat#createRecordReader() delegate to the two
different InputFormats.

Erik

On Wed, Jun 21, 2017 at 9:42 PM, vivek <[email protected]> wrote:

>
> Hi,
> I have two different files having different names.I want to input files
> depending upon the name of the file and use different input format for both
> the files.
> Eg
>
> If i have two files  abc_file1 and bcd_file2
> In the same input folder And i want to use textinputformat for file1 and
> someother format for file2 base on their names(abc and bcd).
> Is this possible in same driver code.
>
> Please suggest incase somebody has any idea
>
>
> Thanks,
> Vk
>

Reply via email to