java - No FileSystem for scheme: webhdfs -
i'm building client pushes data hdfs. because hdfs inside cluster behind firewall use httpfs proxy access it. client exits ioexception
when try read/write hdfs. message no filesystem scheme: webhdfs
. code simple
string hdfsuri = "webhdfs://myhttpfshost:14000/"; configuration configuration = new configuration(); filesystem hdfs = filesystem.get(new uri(hdfsuri), configuration);
it crashes in last line. i'm building maven 3.0.4 , added hadoop-client dependency 2.2.0 project. accessing via curl
on command line works fine.
any ideas why failing?
similar this question on had add following code prior doing fs activities:
configuration.set("fs.webhdfs.impl", org.apache.hadoop.hdfs.web.webhdfsfilesystem.class.getname());
i don't know why, there seems wrong maven build process... works.
Comments
Post a Comment