hadoop-yarn-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Vinayakumar B <vinayakum...@apache.org>
Subject Re: How do I use java api to read data from secured hadoop cluster?
Date Wed, 25 Jun 2014 10:17:25 GMT
If kinit done in the machine and user, where your client program is
running, then no other changes required to your program.
BTW in your client configurations also need to have the authentication
method configured.

Regards,
Vinay


On Wed, Jun 25, 2014 at 5:20 AM, Liu, David <liujiong25@gmail.com> wrote:

> 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" <liujiong25@gmail.com> wrote:
>
> > I mean to  read data from secured hdfs.
> >
> >
> > On Jun 25, 2014, at 6:14 AM, "Liu, David" <liujiong25@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
> >>
> >
>
>


-- 
Regards,
Vinay

Mime
  • Unnamed multipart/alternative (inline, None, 0 bytes)
View raw message