hadoop-common-issues mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Yiqun Lin (JIRA)" <j...@apache.org>
Subject [jira] [Commented] (HADOOP-13933) Add haadmin -getAllServiceState option to get the HA state of all the NameNodes/ResourceManagers
Date Wed, 11 Jan 2017 10:29:58 GMT

    [ https://issues.apache.org/jira/browse/HADOOP-13933?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=15817926#comment-15817926
] 

Yiqun Lin commented on HADOOP-13933:
------------------------------------

Thanks [~surendrasingh] for the work on this. Only one trival comment, can you change {{OVerride}}
to {{Override}}?
{code}
       protected HAServiceTarget resolveTarget(String rmId) {
-        return haServiceTarget;
+        HAServiceTarget target = super.resolveTarget(rmId);
+        HAServiceTarget spy = Mockito.spy(target);
+        // OVerride the target to return our mock protocol
+        try {
+          Mockito.doReturn(haadmin).when(spy)
+              .getProxy(Mockito.<Configuration> any(), Mockito.anyInt());
+          Mockito.doReturn(false).when(spy).isAutoFailoverEnabled();
+        } catch (IOException e) {
+          throw new AssertionError(e); // mock setup doesn't really throw
+        }
+        return spy;
       }
     };
   }
{code}
+1 once addressed. Thanks.

> Add haadmin -getAllServiceState option to get the HA state of all the NameNodes/ResourceManagers
> ------------------------------------------------------------------------------------------------
>
>                 Key: HADOOP-13933
>                 URL: https://issues.apache.org/jira/browse/HADOOP-13933
>             Project: Hadoop Common
>          Issue Type: New Feature
>          Components: tools
>    Affects Versions: 2.7.1
>            Reporter: Surendra Singh Lilhore
>            Assignee: Surendra Singh Lilhore
>         Attachments: HADOOP-13933.002.patch, HADOOP-13933.003.patch, HADOOP-13933.003.patch,
HADOOP-13933.004.patch, HDFS-9559.01.patch
>
>
> Currently we have one command to get state of namenode.
> {code}
> ./hdfs haadmin -getServiceState <serviceId>
> {code}
> It will be good to have command which will give state of all the namenodes.



--
This message was sent by Atlassian JIRA
(v6.3.4#6332)

---------------------------------------------------------------------
To unsubscribe, e-mail: common-issues-unsubscribe@hadoop.apache.org
For additional commands, e-mail: common-issues-help@hadoop.apache.org


Mime
View raw message