Hadoop FileSystem.getConf抛出java.util.NoSuchElementException

时间:2015-07-04 11:19:40

标签: java hadoop hdfs

我正在使用Hadoop-1.0.4并使用java api执行一些与文件系统相关的操作。它正常工作但有时我得到以下错误:

java.util.NoSuchElementException
at java.util.HashMap$HashIterator.nextEntry(HashMap.java:925)
at java.util.HashMap$KeyIterator.next(HashMap.java:956)
at org.apache.hadoop.security.UserGroupInformation.<init>(UserGroupInformation.java:430)
at org.apache.hadoop.security.UserGroupInformation.getCurrentUser(UserGroupInformation.java:452)
at org.apache.hadoop.fs.FileSystem$Cache$Key.<init>(FileSystem.java:1494)
at org.apache.hadoop.fs.FileSystem$Cache.get(FileSystem.java:1395)
at org.apache.hadoop.fs.FileSystem.get(FileSystem.java:254)
at org.apache.hadoop.fs.FileSystem.get(FileSystem.java:123)

我尝试谷歌搜索错误,并在此link中找到了类似的问题。但没有回答:(。任何帮助都会受到极大关注

以下是我收到此错误的代码段:

        Configuration conf=new Configuration();
        conf.set("fs.default.name", "hdfs://localhost:54310");
        FileSystem fs=FileSystem.get(conf);

1 个答案:

答案 0 :(得分:0)

link中的类似错误。检查其余组件的版本,并查找hadoop core 1.0.4信息,以了解您可以匹配的库。