write hadoop application

1 InputFormat Class(related to inputsplit and RecordReader)

  (1) Object of log4j

  (2) Get inputsplits from the getsplits function, deal with each inputsplit in the createRecordReader function,

   and then return the object of RecordReader, at the same time, when initialize the RecordReader object,

   the inputsplit sended into createRecordReader is changed as a key value pair,and then as import for Mapper function.

2 Mapper class

3 Reducer class

4 Main

原文地址:https://www.cnblogs.com/ai464068163/p/1839592.html