I am new to hadoop filesystem. I didn't find any helpful link on google related to Hadoop FileSystem.
I want to authenticate using Kerberose while using Hadoop FileSystem.
Sample Code :
Path src = new Path("C:\\testing\\a\\a.avro");
Path dest = new Path("webhdfs://aaaa:50070/dummy/dummy.avro");
WebHdfsFileSystem web = new WebHdfsFileSystem();
try {
Configuration conf = new Configuration();
conf.set("fs.default.name","webhdfs://aaaa:50070");
web.setConf(conf);
FileSystem fs = FileSystem.get(web.getConf());
fs.copyFromLocalFile(false,src,dest);
} catch (IOException e) {
e.printStackTrace();
}
}
How do i achieve kerberos authication with the above code? How to set principle and keytab values?