学习到 JavaAPI 操作HDFS系统时,在单元测试mkdir()报错误:
错误类型:java.lang.NoClassDefFoundError: org/apache/commons/collections/map/UnmodifiableMap
运行的代码位置:setup()函数里,configuration = new Configuration();
抱歉,刚开始学,请指教。
----------------------------------------------------------------------------------
更多错误提示:
java.lang.NoClassDefFoundError: org/apache/commons/collections/map/UnmodifiableMap
at org.apache.hadoop.conf.Configuration$DeprecationContext.<init>(Configuration.java:409)
at org.apache.hadoop.conf.Configuration.<clinit>(Configuration.java:449)
at HDFS.HDFSApp.setup(HDFSApp.java:29)
at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62)
at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
at java.lang.reflect.Method.invoke(Method.java:498)
……