Hi.

Any idea if the getDiskStatus() function requires superuser rights?

Or it can work for any user?

Thanks.

2009/4/9 Aaron Kimball <aa...@cloudera.com>

> You can insert this propery into the jobconf, or specify it on the command
> line e.g.: -D hadoop.job.ugi=username,group,group,group.....
>
> - Aaron
>
> On Wed, Apr 8, 2009 at 7:04 AM, Brian Bockelman <bbock...@cse.unl.edu
> >wrote:
>
> > Hey Stas,
> >
> > What we do locally is apply the latest patch for this issue:
> > https://issues.apache.org/jira/browse/HADOOP-4368
> >
> > This makes getUsed (actually, it switches to FileSystem.getStatus) not a
> > privileged action.
> >
> > As far as specifying the user ... gee, I can't think of it off the top of
> > my head.  It's a variable you can insert into the JobConf, but I'd have
> to
> > poke around google or the code to remember which one (I try to not
> override
> > it if possible).
> >
> > Brian
> >
> >
> > On Apr 8, 2009, at 8:51 AM, Stas Oskin wrote:
> >
> >  Hi.
> >>
> >> Thanks for the explanation.
> >>
> >> Now for the easier part - how do I specify the user when connecting? :)
> >>
> >> Is it a config file level, or run-time level setting?
> >>
> >> Regards.
> >>
> >> 2009/4/8 Brian Bockelman <bbock...@cse.unl.edu>
> >>
> >>  Hey Stas,
> >>>
> >>> Did you try this as a privileged user?  There might be some permission
> >>> errors... in most of the released versions, getUsed() is only available
> >>> to
> >>> the Hadoop superuser.  It may be that the exception isn't propagating
> >>> correctly.
> >>>
> >>> Brian
> >>>
> >>>
> >>> On Apr 8, 2009, at 3:13 AM, Stas Oskin wrote:
> >>>
> >>> Hi.
> >>>
> >>>>
> >>>> I'm trying to use the API to get the overall used and free spaces.
> >>>>
> >>>> I tried this function getUsed(), but it always returns 0.
> >>>>
> >>>> Any idea?
> >>>>
> >>>> Thanks.
> >>>>
> >>>>
> >>>
> >>>
> >
>

Reply via email to