Return-Path: X-Original-To: apmail-hadoop-hdfs-user-archive@minotaur.apache.org Delivered-To: apmail-hadoop-hdfs-user-archive@minotaur.apache.org Received: from mail.apache.org (hermes.apache.org [140.211.11.3]) by minotaur.apache.org (Postfix) with SMTP id C9EC598EB for ; Wed, 1 Feb 2012 14:30:05 +0000 (UTC) Received: (qmail 6136 invoked by uid 500); 1 Feb 2012 14:30:04 -0000 Delivered-To: apmail-hadoop-hdfs-user-archive@hadoop.apache.org Received: (qmail 6008 invoked by uid 500); 1 Feb 2012 14:30:03 -0000 Mailing-List: contact hdfs-user-help@hadoop.apache.org; run by ezmlm Precedence: bulk List-Help: List-Unsubscribe: List-Post: List-Id: Reply-To: hdfs-user@hadoop.apache.org Delivered-To: mailing list hdfs-user@hadoop.apache.org Received: (qmail 6000 invoked by uid 99); 1 Feb 2012 14:30:03 -0000 Received: from nike.apache.org (HELO nike.apache.org) (192.87.106.230) by apache.org (qpsmtpd/0.29) with ESMTP; Wed, 01 Feb 2012 14:30:03 +0000 X-ASF-Spam-Status: No, hits=-0.7 required=5.0 tests=RCVD_IN_DNSWL_LOW,SPF_PASS X-Spam-Check-By: apache.org Received-SPF: pass (nike.apache.org: domain of harsh@cloudera.com designates 209.85.210.51 as permitted sender) Received: from [209.85.210.51] (HELO mail-pz0-f51.google.com) (209.85.210.51) by apache.org (qpsmtpd/0.29) with ESMTP; Wed, 01 Feb 2012 14:29:57 +0000 Received: by dady9 with SMTP id y9so977977dad.38 for ; Wed, 01 Feb 2012 06:29:36 -0800 (PST) Received: by 10.68.73.106 with SMTP id k10mr60997235pbv.35.1328106576323; Wed, 01 Feb 2012 06:29:36 -0800 (PST) MIME-Version: 1.0 Received: by 10.142.72.17 with HTTP; Wed, 1 Feb 2012 06:29:16 -0800 (PST) In-Reply-To: References: From: Harsh J Date: Wed, 1 Feb 2012 19:59:16 +0530 Message-ID: Subject: Re: Specifying username using ClientProtocol To: hdfs-user@hadoop.apache.org Content-Type: text/plain; charset=ISO-8859-1 Content-Transfer-Encoding: quoted-printable X-Virus-Checked: Checked by ClamAV on apache.org 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 wrote: > Hi Harsh, > > Why do you consider ClientProtocol to be an unsupported and non-public > class/interface? =A0Isn't that what the concrete Namenode class is based > on? > > > Thanks. > > On Wed, Feb 1, 2012 at 8:16 PM, Harsh J 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 wrote: >>> Hi folks, >>> >>> I'm trying to connect to a NameNode using Hadoop's RPC ClientProtocol >>> class. =A0Code below: >>> >>> InetSocketAddress address =3D new InetSocketAddress("namenode", 9000); >>> >>> Configuration conf =3D new Configuration(); >>> >>> ClientProtocol client =3D >>> =A0 =A0 =A0 =A0(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 --=20 Harsh J Customer Ops. Engineer Cloudera | http://tiny.cloudera.com/about