我正在使用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);