创建hdfs目录时java.lang.NoSuchMethodError:org.apache.hadoop.ipc.RPC.getProxy

时间:2016-09-19 13:17:20

标签: hadoop hdfs

尝试创建HDFS目录时,

FileSystem.getConfig(config)抛出org.apache.hadoop.ipc.RPC.getProxy exception

config.addResource(new Path(String.format("%s/core-site.xml",TestProperties.HDFS_CONF_DIR)));
config.addResource(new Path(String.format("%s/hdfs-site.xml",TestProperties.HDFS_CONF_DIR)));
config.set("fs.hdfs.impl", org.apache.hadoop.hdfs.DistributedFileSystem.class.getName());
config.set("fs.file.impl", org.apache.hadoop.fs.LocalFileSystem.class.getName());
FileSystem dfs = FileSystem.get(config);

附上完整的堆栈跟踪:

  

java.lang.NoSuchMethodError:   org.apache.hadoop.ipc.RPC.getProxy(Ljava /郎/类; JLjava /净/的InetSocketAddress; Lorg /阿帕奇/ hadoop的/安全/ UserGroupInformation; Lorg /阿帕奇/ hadoop的/ CONF /配置; Ljavax /净/的SocketFactory; ILorg /阿帕奇/ hadoop的/ IO /重试/ RetryPolicy; Z)Lorg /阿帕奇/ hadoop的/ IPC / VersionedProtocol;     在   org.apache.hadoop.hdfs.DFSClient.createRPCNamenode(DFSClient.java:135)     在org.apache.hadoop.hdfs.DFSClient。(DFSClient.java:280)at   org.apache.hadoop.hdfs.DFSClient。(DFSClient.java:245)at at   org.apache.hadoop.hdfs.DistributedFileSystem.initialize(DistributedFileSystem.java:100)     在   org.apache.hadoop.fs.FileSystem.createFileSystem(FileSystem.java:2761)     在org.apache.hadoop.fs.FileSystem.access $ 200(FileSystem.java:99)at   org.apache.hadoop.fs.FileSystem $ Cache.getInternal(FileSystem.java:2795)     在org.apache.hadoop.fs.FileSystem $ Cache.get(FileSystem.java:2777)     在org.apache.hadoop.fs.FileSystem.get(FileSystem.java:386)at   org.apache.hadoop.fs.FileSystem.get(FileSystem.java:179)at at   org.apache.atlas.regression.util.HDFSUtil.createDirectory(HDFSUtil.java:46)     在   org.apache.atlas.regression.tests.FalconIntegrationTest.setUp(FalconIntegrationTest.java:43)

群集中的Hadoop版本是2.7.3,在pom.xml 2.7.3中。可能是什么问题?

0 个答案:

没有答案