Re: How do I use java api to read data from secured hadoop cluster?

2014-06-24 Thread Liu, David
I mean to  read data from secured hdfs.


On Jun 25, 2014, at 6:14 AM, Liu, David liujion...@gmail.com wrote:

 Hi experts,
 
 Can anyone provide some example or api name to read data from secured hadoop 
 cluster?
 I have code like this which can read data from unsecured cluster, but when it 
 comes to secured one, authentication error will show.
 Configuration conf = new Configuration();
 FileSystem fs = FileSystem.get(URI.create(uri), conf);
 FSDataInputStream in = fs.open(new Path(uri));
 IOUtils.copy(in, System.out, 4096);
 
 Could anyone help me? Really Appreicate it.
 
 Thanks
 



Re: How do I use java api to read data from secured hadoop cluster?

2014-06-24 Thread Liu, David
By the way, I have kinit hadoop on the cluster, and hadoop fs -ls / works on 
the cluster. The code below is run on the cluster too.
On Jun 25, 2014, at 6:22 AM, Liu, David liujion...@gmail.com wrote:

 I mean to  read data from secured hdfs.
 
 
 On Jun 25, 2014, at 6:14 AM, Liu, David liujion...@gmail.com wrote:
 
 Hi experts,
 
 Can anyone provide some example or api name to read data from secured hadoop 
 cluster?
 I have code like this which can read data from unsecured cluster, but when 
 it comes to secured one, authentication error will show.
 Configuration conf = new Configuration();
 FileSystem fs = FileSystem.get(URI.create(uri), conf);
 FSDataInputStream in = fs.open(new Path(uri));
 IOUtils.copy(in, System.out, 4096);
 
 Could anyone help me? Really Appreicate it.
 
 Thanks