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 <ha...@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 <fula...@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