关于hadoop 提交jar的运行如下:
1)https://www.cnblogs.com/admln/p/hadoop2-work-excute-submit.html
2) https://blog.youkuaiyun.com/pzqingchong/article/details/77131004
注意: hadoop 3.x中, org.apache.hadoop.util.RunJar 的临时目录是通过 java.io.tmpdir 传入的,如下图所示。
File tmpDir = new File(System.getProperty("java.io.tmpdir"));
ensureDirectory(tmpDir);
final File workDir;
try {
workDir = File.createTempFile("hadoop-unjar", "", tmpDir);
} catch (IOException ioe) {
// If user has insufficient perms to write to tmpDir, default
// "Permission denied" message doesn't specify a filename.
System.err.println("Error creating temp dir in java.io.tmpdir "
+ tmpDir + " due to " + ioe.getMessage());
System.exit(-1);
return;
}
原来的老版本却是Configuration().get("hadoop.tmp.dir")

本文详细解析了Hadoop3.x中org.apache.hadoop.util.RunJar类的使用方法,特别是临时目录的设定方式,对比老版本的不同,并提供了具体的代码实现细节。
792

被折叠的 条评论
为什么被折叠?



