You can create a list of files for each type and use MultipleInputs[1]. https://hadoop.apache.org/docs/r2.6.3/api/org/apache/hadoop/mapreduce/lib/input/MultipleInputs.html
On Thu, Jun 22, 2017 at 10:30 PM, vivek <vivvekbha...@gmail.com> wrote: > Thanks! > > > On Jun 22, 2017 20:15, "Erik Krogen" <ekro...@linkedin.com> wrote: > >> 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 <vivvekbha...@gmail.com> 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 >>> >> >>