问题1:我想找到MapReduce日志文件来检查hadoop源代码中某些变量的值。例如,MergeManagerImpl.java中的第208〜212行,它使用LOG.info
生成日志文件。我想检查ioSortFactor
的值,但是找不到日志文件。
// MergeManagerImpl.java
LOG.info("MergerManager: memoryLimit=" + memoryLimit + ", " +
"maxSingleShuffleLimit=" + maxSingleShuffleLimit + ", " +
"mergeThreshold=" + mergeThreshold + ", " +
"ioSortFactor=" + ioSortFactor + ", " +
"memToMemMergeOutputsThreshold="+
memToMemMergeOutputsThreshold);
问题2:我运行脚本test.sh
。任务完成后,目录userlog中的文件将被删除。如何防止文件被删除?
// test.sh
bin/yarn jar hadoop-mapreduce-examples-2.7.1.jar teragen -Dmapred.map.tasks=1 10000000 teraInput
bin/yarn jar hadoop-mapreduce-examples-2.7.1.jar terasort -Dmapred.reduce.tasks=1 teraInput teraOutput
bin/yarn jar hadoop-mapreduce-examples-2.7.1.jar teravalidate teraOutput teraValidate
hadoop版本:2.7.1
预期结果:(我可以从日志文件中检查变量ioSortFactor。)
16/12/03 23:33:53 INFO reduce.MergeManagerImpl: MergerManager: memoryLimit=334338464, maxSingleShuffleLimit=83584616, mergeThreshold=220663392, ioSortFactor=10, memToMemMergeOutputsThreshold=10