You can achieve this by following below steps :
1) create two different mappers by creating two different classes
2) keep the same key in both mapper classes
3) In driver class make use of MultiFileInputFormat .
All the values which belong to same key will automatically come to reducer then you can do what ever you want to do with value .
2条答案
按热度按时间5cnsuln71#
是的,你可以使用多个输入。
您可以重用相同的Map类,因为两个文件的格式相同。并在reducer中连接这些值。
ahy6op9u2#