hadoop-hdfs-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Harsh J <ha...@cloudera.com>
Subject Re: Specifying username using ClientProtocol
Date Wed, 01 Feb 2012 14:29:16 GMT
Yes but its not a client-usable, stable API class. The NameNode too is
a service, not a directly user-usable object. The interface changes
from release to release, and methods may get added/deprecated/removed
without us considering the user impact cause it isn't meant to be a
user class.

For all filesystem operations, limit to using only the
FileSystem/FileContext class.

But, what are you using the ClientProtocol for?

On Wed, Feb 1, 2012 at 7:51 PM, Michael Lok <fulat2k@gmail.com> wrote:
> Hi Harsh,
>
> Why do you consider ClientProtocol to be an unsupported and non-public
> class/interface?  Isn't that what the concrete Namenode class is based
> on?
>
>
> Thanks.
>
> On Wed, Feb 1, 2012 at 8:16 PM, Harsh J <harsh@cloudera.com> wrote:
>> Michael,
>>
>> These are non-public, unsupported classes you are trying to use here.
>> We'd not recommend doing that unless your goal was to experiment with
>> something at most.
>>
>> But to technically answer your question, you can get over this if you
>> disable permissions itself on the HDFS level. Impersonating the
>> superuser is not allowed. Or another alternative would be to add your
>> user to the designated HDFS supergroup, and elevate its rights that
>> way.
>>
>> On Tue, Jan 17, 2012 at 8:44 AM, Michael Lok <fulat2k@gmail.com> wrote:
>>> Hi folks,
>>>
>>> I'm trying to connect to a NameNode using Hadoop's RPC ClientProtocol
>>> class.  Code below:
>>>
>>> InetSocketAddress address = new InetSocketAddress("namenode", 9000);
>>>
>>> Configuration conf = new Configuration();
>>>
>>> ClientProtocol client =
>>>        (ClientProtocol) RPC.waitForProxy(ClientProtocol.class,
>>> ClientProtocol.versionID, address, conf);
>>>
>>> System.out.println(client.getStats());
>>>
>>> Unfortunately, my currently logged in user name is not the user who's
>>> configured on the server; hence the following exception:
>>>
>>> org.apache.hadoop.ipc.RemoteException:
>>> org.apache.hadoop.security.AccessControlException: Access denied for
>>> user mike. Superuser privilege is required
>>>
>>> Is there a configuration property key I can set in the configuration
>>> object to override the system username?
>>>
>>>
>>> Thanks.
>>
>>
>>
>> --
>> Harsh J
>> Customer Ops. Engineer
>> Cloudera | http://tiny.cloudera.com/about



-- 
Harsh J
Customer Ops. Engineer
Cloudera | http://tiny.cloudera.com/about

Mime
View raw message