Код: Выделить всё
Configuration conf = new Configuration(true);
conf.addResource(new File("core-site.xml").toURI().toURL());
conf.addResource(new File("hdfs-site.xml").toURI().toURL());
conf.addResource(new File("mapred-site.xml").toURI().toURL());
FileSystem hdfs = FileSystem.get(conf);
boolean isExists = hdfs.exists(source);
Код: Выделить всё
java.io.IOException: Couldn't create proxy provider class org.apache.hadoop.hdfs.server.namenode.ha.ConfiguredFailoverProxyProvider
at org.apache.hadoop.hdfs.server.namenode.ha.ConfiguredFailoverProxyProvider.(ConfiguredFailoverProxyProvider.java:93)
at sun.reflect.NativeConstructorAccessorImpl.newInstance0(Native Method)
at sun.reflect.NativeConstructorAccessorImpl.newInstance(NativeConstructorAccessorImpl.java:62)
Подробнее здесь: https://stackoverflow.com/questions/293 ... enode-ha-c
Мобильная версия