[
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: [email protected]
For additional commands, e-mail: [email protected]