Archives of Support Questions (Read Only)

This is an archived board for historical reference. Information and links may no longer be available or relevant
Announcements
This board is archived and read-only for historical reference. To ask a new question, please post a new topic on the appropriate active board.

Who agreed with this solution

avatar
Mentor
While MultipleInputs was designed for such a thing, your requirement is
unique in that you need to process the same input 2x but with different
params each time. It seems a bit redundant to me given that you can do it
in a single task run vs. 2x the I/O cost…

But I believe the way you can solve your identifier problem is by writing
your own InputFormat wrapper over the existing InputFormat, which generates
special types of InputSplit objects (wrapper over regular FileSplit
classes). These input splits need to add in your identifiers as an extra
field, and you can extract and cast the same from your
context.getInputSplit() in the map-end to then differentiate the input.

View solution in original post

Who agreed with this solution