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

Bharat Viswanadham edited comment on HDFS-11360 at 2/6/18 1:50 AM:
-------------------------------------------------------------------

Hi [~cltlfcjin]

//To find namenodes in the cluster

final Collection<URI> namenodes = DFSUtil.getNsServiceRpcUris(conf);
 If DFS_INTERNAL_NAMESERVICES_KEY is set, the above method returns only 
namenode that belong to this cluster.

 

As in your case it is not federated cluster, you can set 
dfs.internal.nameservices to avoid the above scenario you have mentioned.

As, DFSUtil.getInternalNsRpcUris(), calls getInternalNameServices(), which will 
return the value of dfs.internal.nameservices value if it is set, otherwise it 
will use dfs.nameservices and return all the nameservices. So, if 
dfs.internal.nameservices is set, it will only create one NameNodeConnector.

 

Could you please let me know if i am missing something here.


was (Author: bharatviswa):
Hi [~cltlfcjin]
 final Collection<URI> namenodes = DFSUtil.getNsServiceRpcUris(conf);
If DFS_INTERNAL_NAMESERVICES_KEY is set, the above namenodes only return the 
uri that belongs to its cluster.

 

As, DFSUtil.getInternalNsRpcUris(), calls getInternalNameServices(), which will 
return the above value if it is set, otherwise it will use dfs.nameservices and 
return all the nameservices. So, if dfs.internal.nameservices is set, it will 
only create one NameNodeConnector.

 

Could you please let me know if i am missing something here.

> HDFS balancer need a config to appoint to a decided nameservice
> ---------------------------------------------------------------
>
>                 Key: HDFS-11360
>                 URL: https://issues.apache.org/jira/browse/HDFS-11360
>             Project: Hadoop HDFS
>          Issue Type: Bug
>          Components: balancer &amp; mover
>    Affects Versions: 2.7.1
>            Reporter: Lantao Jin
>            Priority: Minor
>
> With distcp configuration, there are two or more "nameservices" setting in 
> hdfs-site.xml, for example:
> {code}
>     <property>
>         <name>dfs.nameservices</name>
>         <value>one-nn-ha,two-nn-ha</value>
>     </property>
> {code}
> If the HDFS Balancer also launches in that node, it will create two IPC 
> threads to connect both of NNs. And block removing both happens in this 
> Balancer. Although I didn't find any block removing between different 
> clusters, the behavior still became weird and unexpected.
> So the best way is adding a configuration that appoint to a decided 
> nameservice to launch. I can offer a patch. Any better ideal? 



--
This message was sent by Atlassian JIRA
(v7.6.3#76005)

---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]

Reply via email to