hadoop 提交jar的运行 org.apache.hadoop.util.RunJar

tech2022-08-04  168

关于hadoop 提交jar的运行如下: 

1)https://www.cnblogs.com/admln/p/hadoop2-work-excute-submit.html

2) https://blog.csdn.net/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")

最新回复(0)