简体   繁体   English

在边缘节点中运行hadoop jar命令

[英]Running hadoop jar command in edge Node

I am new to hadoop and have below question(s) on running hadoop jar command from edgeNode( http://www.dummies.com/programming/big-data/hadoop/edge-nodes-in-hadoop-clusters/ ). 我是hadoop的新手,并且从edgeNode( http://www.dummies.com/programming/big-data/hadoop/edge-nodes-in-hadoop-clusters/ )中运行hadoop jar命令时遇到以下问题。 hadoop jar ${JAR_FILE} {CLASS_NAMEWithPackage} . hadoop jar ${JAR_FILE} {CLASS_NAMEWithPackage} Have below Question(s) 有以下问题

  1. After running above command why the jar is extracted in Djava.io.tmpdir dir in edgeNode ? 运行上述命令后,为什么将jar提取到edgeNode的Djava.io.tmpdir dir中? Every time I run this command I get a directory something like hadoop-unjar7637059002474165348 in temp dir,that has extracted jar.Is this expected? 每次我运行此命令时,我都会在temp目录中找到一个类似于hadoop-unjar7637059002474165348的目录,该目录已提取jar。这是预期的吗? I was thinking hadoop jar submits whole jar to yarn but I could not understand why it is extracted in temp folder ? 我以为hadoop jar将整个jar提交给纱线,但我不明白为什么将其提取到temp文件夹中?
  2. After extracting the jar in edge Node,does the program expected to remove the extracted jar directory.In this case hadoop-unjar7637059002474165348 ? 在边缘节点中提取jar之后,程序是否希望删除提取的jar目录。在这种情况下,hadoop-unjar7637059002474165348?

Thanks! 谢谢!

You can probably look at here and this question for why your jars are extracted in the edge node (client node) when you run the hadoop jar command. 您可能会在这里看到此问题,以及为什么运行hadoop jar命令时为何在边缘节点(客户端节点)中提取jar的问题。 It's to support the 'jar-within-jar' idea while running your jar from the client node. 这是为了从客户端节点运行jar时支持“ jar-within-jar”的想法。 Pushing jars to HDFS, yarn and all those happens after that but, before these happens, your jar has to be executed to begin with, right? 将罐子推到HDFS,纱线上,所有这些之后都会发生,但是在发生这些事情之前,必须先执行罐子,对吧? In your case, you might have jar-within-jar or you might not, but the concept is supported. 在您的情况下,您可能有jar-within-jar,也可能没有,但是支持该概念。

About the auto delete, probably it's not auto deleted. 关于自动删除,可能不是自动删除。

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM