hi Brahma, Thanks so much for the pointers. I am able to achieve my goal by extending the help provided and proceed with the automated script I am trying to build. Shall share for common benefit after initial testing.
warm regards Devopam On Mon, Nov 3, 2014 at 1:40 PM, Brahma Reddy Battula < brahmareddy.batt...@huawei.com> wrote: > Yes, you can get, but you need to use two commands like following.. > > 1) Need to get nameservices > 2) dfs.ha.namenodes.${dfs.nameservices}. > > > [root@linux156 bin]# ./hdfs getconf -confKey dfs.nameservices > hacluster > [root@linux156 bin]# ./hdfs getconf -confKey dfs.ha.namenodes.hacluster > 100,101 > > > > > Thanks & Regards > Brahma Reddy Battula > > ________________________________________ > From: Devopam Mittra [devo...@gmail.com] > Sent: Monday, November 03, 2014 1:23 PM > To: common-dev@hadoop.apache.org > Subject: Re: unable to use hdfs haadmin -ns <nameserviceId> on HDP2.1 , > HDFS2.4.0.2.1 > > hi Brahma, > Thanks a lot for the clarification. > > This brings me to my next question: Is there a way I can systematically > retrieve the serviceId s using any CLI command , instead of reading it from > conf xmls ? > > > regards > Devopam > > > On Mon, Nov 3, 2014 at 12:51 PM, Brahma Reddy Battula < > brahmareddy.batt...@huawei.com> wrote: > > > Hi Mittra > > > > > > As far as I knew, "hdfs haadmin -ns" is not availble..(please someone can > > correct, If I am wrong..) > > > > > > Please check following help command for haadmin.. > > > > [root@linux bin]# ./hdfs haadmin > > No GC_PROFILE is given. Defaults to medium. > > Usage: DFSHAAdmin [-ns <nameserviceId>] > > [-transitionToActive <serviceId> [--forceactive]] > > [-transitionToStandby <serviceId>] > > [-failover [--forcefence] [--forceactive] <serviceId> <serviceId>] > > [-getServiceState <serviceId>] > > [-checkHealth <serviceId>] > > [-help <command>] > > > > > > Example: > > > > if your service id's are like nn1,nn2 > > > > then you can try like,, hdfs haadmin -getServiceState nn1. > > > > > > Thanks & Regards > > Brahma Reddy Battula > > ________________________________________ > > From: Devopam Mittra [devo...@gmail.com] > > Sent: Monday, November 03, 2014 10:33 AM > > To: common-dev@hadoop.apache.org > > Subject: unable to use hdfs haadmin -ns <nameserviceId> on HDP2.1 , > > HDFS2.4.0.2.1 > > > > hi All, > > I wanted to systematically probe and list all my namenode(s) via CLI. > > An easier way was to maintain a masters conf file , but I want to > > dynamically find the same leveraging the system metadata. > > > > In process of trying to find the same , I tried to use > > hdfs haadmin -ns ... but to my dismay the command always returns "Missing > > Command" on the console as if I am doing something syntactically wrong. > > > > I know my nameserviceId and I tried both capital letters and all small > > (just to be sure to not commit a silly mistake). > > > > Can you please help me in trying to figure out what I am doing wrong > here. > > > > > > -- > > Devopam Mittra > > Life and Relations are not binary > > > > > > -- > Devopam Mittra > Life and Relations are not binary > -- Devopam Mittra Life and Relations are not binary