hadoop机架感知不能加载类

我已经在core-site.xml配置文件中配置了net.topology.node.switch.mapping.impl。并把jar包放在了/opt/modules/hadoop-2.7.2/share/hadoop/common/lib目录。启动后出现如下错误。hadoop哪个目录可以启动时加载jar包呢?

java.lang.RuntimeException: java.lang.RuntimeException: java.lang.ClassNotFoundException: Class >com.learning.rackawareness.RackAwareness not found
at org.apache.hadoop.conf.Configuration.getClass(Configuration.java:2227)
at org.apache.hadoop.hdfs.server.blockmanagement.DatanodeManager.(DatanodeManager.java:208)
at org.apache.hadoop.hdfs.server.blockmanagement.BlockManager.(BlockManager.java:268)
at org.apache.hadoop.hdfs.server.namenode.FSNamesystem.(FSNamesystem.java:737)
at org.apache.hadoop.hdfs.server.namenode.SecondaryNameNode.initialize(SecondaryNameNode.java:246)
at org.apache.hadoop.hdfs.server.namenode.SecondaryNameNode.(SecondaryNameNode.java:192)
at org.apache.hadoop.hdfs.server.namenode.SecondaryNameNode.main(SecondaryNameNode.java:671)
Caused by: java.lang.RuntimeException: java.lang.ClassNotFoundException: Class >com.learning.rackawareness.RackAwareness not found
at org.apache.hadoop.conf.Configuration.getClass(Configuration.java:2195)
at org.apache.hadoop.conf.Configuration.getClass(Configuration.java:2219)
... 6 more
Caused by: java.lang.ClassNotFoundException: Class >com.learning.rackawareness.RackAwareness not found
at org.apache.hadoop.conf.Configuration.getClassByName(Configuration.java:2101)
at org.apache.hadoop.conf.Configuration.getClass(Configuration.java:2193)
... 7 more
2019-10-07 15:23:41,958 INFO org.apache.hadoop.hdfs.server.namenode.FSNamesystem: Stopping services started for active state
2019-10-07 15:23:41,970 INFO org.apache.hadoop.hdfs.server.namenode.SecondaryNameNode: SHUTDOWN_MSG:

1个回答

Csdn user default icon
上传中...
上传图片
插入图片
抄袭、复制答案,以达到刷声望分或其他目的的行为,在CSDN问答是严格禁止的,一经发现立刻封号。是时候展现真正的技术了!
立即提问