この行の後とREDUCE_OUTPUT_RECORDS(もMAP_OUTPUT_RECORDS)は、これらのカウンタの値を取得することによって:と長い変数を設定するよりも、別の方法(簡単に)がある場合、ジョブを実行するのに必要な時間のために
long map_input_records = job.getCounters()
.findCounter("org.apache.hadoop.mapreduce.Task$Counter","MAP_INPUT_RECORDS")
.getValue();
long map_output_records = job.getCounters()
.findCounter("org.apache.hadoop.mapreduce.Task$Counter","MAP_OUTPUT_RECORDS")
.getValue();
long reduce_input_records = job.getCounters()
.findCounter("org.apache.hadoop.mapreduce.Task$Counter","REDUCE_INPUT_RECORDS")
.getValue();
long reduce_output_records = job.getCounters()
.findCounter("org.apache.hadoop.mapreduce.Task$Counter","REDUCE_OUTPUT_RECORDS")
.getValue();
を、私は知りません実行前と実行後の現在の時刻とその差分を取得します。