[英]Error: Could not find or load main class org.apache.tez.dag.app.DAGAppMaster
I have installed tez and want to run the example like this我已经安装了 tez 并想像这样运行示例
hadoop jar tez-examples-0.10.1.jar orderedwordcount /input /output
but it's not work and the log is但它不起作用,日志是
Log Type: stderr
Log Upload Time: Thu May 12 13:19:25 +0800 2022
Log Length: 77
Error: Could not find or load main class org.apache.tez.dag.app.DAGAppMaster
Log Type: stdout
Log Upload Time: Thu May 12 13:19:25 +0800 2022
Log Length: 716
Heap
PSYoungGen total 17920K, used 921K [0x00000000eef00000, 0x00000000f0300000, 0x0000000100000000)
eden space 15360K, 6% used [0x00000000eef00000,0x00000000eefe67a8,0x00000000efe00000)
from space 2560K, 0% used [0x00000000f0080000,0x00000000f0080000,0x00000000f0300000)
to space 2560K, 0% used [0x00000000efe00000,0x00000000efe00000,0x00000000f0080000)
ParOldGen total 40960K, used 0K [0x00000000ccc00000, 0x00000000cf400000, 0x00000000eef00000)
object space 40960K, 0% used [0x00000000ccc00000,0x00000000ccc00000,0x00000000cf400000)
Metaspace used 2541K, capacity 4480K, committed 4480K, reserved 1056768K
class space used 283K, capacity 384K, committed 384K, reserved 1048576K
my_env.sh is my_env.sh 是
#JAVA_HOME
export JAVA_HOME=/opt/module/jdk1.8.0_331
export PATH=$PATH:$JAVA_HOME/bin
#HADOOP_HOME
export HADOOP_HOME=/opt/module/hadoop-3.3.2
export PATH=$PATH:$HADOOP_HOME/bin
export PATH=$PATH:$HADOOP_HOME/sbin
#HIVE_HOME
export HIVE_HOME=/opt/module/hive-3.1.3
export PATH=$PATH:$HIVE_HOME/bin
#MAVEN_HOME
export MAVEN_HOME=/opt/module/maven-3.8.5
export PATH=$PATH:$MAVEN_HOME/bin
#TEZ_HOME
export TEZ_HOME=/opt/module/tez-0.10.1
export HADOOP_CLASSPATH=${TEZ_HOME}/conf:${TEZ_HOME}/*:${TEZ_HOME}/lib/*
tez-site.xml is tez-site.xml 是
<?xml version="1.0" encoding="UTF-8"?>
<?xml-stylesheet type="text/xsl" href="configuration.xsl"?>
<configuration>
<property>
<name>tez.lib.uris</name>
<value>${fs.defaultFS}/apps/tez/tez-0.10.1.tar.gz</value>
</property>
<property>
<name>tez.use.cluster.hadoop-libs</name>
<value>false</value>
</property>
<property>
<name>tez.history.logging.service.class</name>
<value>org.apache.tez.dag.history.logging.ats.ATSHistoryLoggingService</value>
</property>
</configuration>
I have tried answer https://issues.apache.org/jira/browse/TEZ-3392 but it's not work.我已经尝试回答https://issues.apache.org/jira/browse/TEZ-3392但它不起作用。 Please help me in resolving this.Thanks in Advance!!!
请帮我解决这个问题。在此先感谢!!!
I had the similar error message with running tez example.我在运行 tez 示例时遇到了类似的错误消息。 The installation guide https://tez.apache.org/install.html is not so obious, but has some valueable notes.
安装指南https://tez.apache.org/install.html没有那么明显,但有一些有价值的说明。
Helpful was an application tracking page where from logs i found out that path in the container after decompress tez archive is incorrect.有用的是一个应用程序跟踪页面,我从日志中发现解压缩 tez 存档后容器中的路径不正确。 The whole archive is decompressed to the directory called ./tezlib and excerpt of CLASSPATH looks like that:
整个存档被解压缩到名为./tezlib的目录中,CLASSPATH 的摘录如下所示:
$PWD:$PWD/*:$PWD/tezlib/*:$PWD/tezlib/lib/*
but archive apache-tez-0.10.1-bin.tar.gz (on my HDFS in path /apps/apache-tez-0.10.1-bin.tar.gz) is decompressed inside a container to ./tezlib/apache-tez-0.10.1-bin.但是存档 apache-tez-0.10.1-bin.tar.gz(在我的 HDFS 上的路径 /apps/apache-tez-0.10.1-bin.tar.gz)在容器内解压缩到 ./tezlib/apache- tez-0.10.1-bin。
So, after several hours trial and error i resolved this issue in the following steps:因此,经过几个小时的反复试验,我通过以下步骤解决了这个问题:
tar -xf apache-tez-0.10.1-bin.tar.gz
tar -czf apache-tez-0.10.1-bin-nodir.tar.gz -C apache-tez-0.10.1-bin .
hdfs dfs -copyFromLocal apache-tez-0.10.1-bin-nodir.tar.gz /apps/
The second line above pack tez jars into an archive without parent directory.上面的第二行将 tez jar 打包到没有父目录的存档中。 After that tez example runs without error and finishes succeed.
之后 tez 示例运行没有错误并成功完成。
My tez-site.xml:我的 tez-site.xml:
<?xml version="1.0" encoding="UTF-8"?>
<?xml-stylesheet type="text/xsl" href="configuration.xsl"?>
<configuration>
<property>
<name>tez.lib.uris</name>
<value>${fs.defaultFS}/apps/apache-tez-0.10.1-bin-nodir.tar.gz</value>
</property>
<property>
<name>tez.use.cluster.hadoop-libs</name>
<value>true</value>
</property>
</configuration>
Of course there are propably another ways to manage this error with incorrect path to jars.当然,可能还有另一种方法可以通过不正确的 jar 路径来管理此错误。
I've tested that at hadoop 3.2.2 from bigtop distribution and tez 0.10.0/0.10.1.我已经在 bigtop 发行版和 tez 0.10.0/0.10.1 的 hadoop 3.2.2 上对其进行了测试。
I had solved my question by upload to hdfs an uncompressed tez package and change my tez-site.xml file.我通过将未压缩的 tez 包上传到 hdfs 并更改我的 tez-site.xml 文件解决了我的问题。
hadoop fs -put tez-0.10.1 /apps/tez
My changed tez-site.xml我更改的 tez-site.xml
The main different place is "tez.lib.uris"主要不同的地方是“tez.lib.uris”
<?xml version="1.0" encoding="UTF-8"?>
<?xml-stylesheet type="text/xsl" href="configuration.xsl"?>
<configuration>
<property>
<name>tez.lib.uris</name>
<value>${fs.defaultFS}/apps/tez/tez-0.10.1,${fs.defaultFS}/apps/tez/tez-0.10.1/lib</value>
</property>
<property>
<name>tez.use.cluster.hadoop-libs</name>
<value>false</value>
</property>
<property>
<name>tez.history.logging.service.class</name>
<value>org.apache.tez.dag.history.logging.ats.ATSHistoryLoggingService</value>
</property>
<property>
<name>tez.am.resource.memory.mb</name>
<value>1024</value>
</property>
<property>
<name>tez.am.resource.cpu.vcores</name>
<value>1</value>
</property>
</configuration>
声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.