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

Íñigo Goiri commented on HDFS-15016:
------------------------------------

Right now, we have DataNodes that change subclusters.
The Router is just returning a random one so it can be that is returning a dead 
one.

It could just do something like:
{code}
    for (Entry<FederationNamespaceInfo, DatanodeInfo[]> entry :
        results.entrySet()) {
      FederationNamespaceInfo ns = entry.getKey();
      DatanodeInfo[] result = entry.getValue();
      for (DatanodeInfo node : result) {
        String nodeId = node.getXferAddr();
        if (!datanodesMap.containsKey(nodeId) ||
            node.getLastUpdate() > datanodesMap.get(nodeId).getLastUpdate()) {
          // Add the subcluster as a suffix to the network location
          node.setNetworkLocation(
              NodeBase.PATH_SEPARATOR_STR + ns.getNameserviceId() +
              node.getNetworkLocation());
          datanodesMap.put(nodeId, node);
        } else {
          LOG.debug("{} is in multiple subclusters", nodeId);
        }
      }
    }
{code}

> RBF: getDatanodeReport() should return the latest update
> --------------------------------------------------------
>
>                 Key: HDFS-15016
>                 URL: https://issues.apache.org/jira/browse/HDFS-15016
>             Project: Hadoop HDFS
>          Issue Type: Improvement
>            Reporter: Íñigo Goiri
>            Priority: Major
>
> Currently, when the Router calls getDatanodeReport() (or 
> getDatanodeStorageReport()) and the DN is in multiple clusters, it just takes 
> the one that comes first. It should consider the latest update.



--
This message was sent by Atlassian Jira
(v8.3.4#803005)

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

Reply via email to