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

Kihwal Lee commented on HADOOP-14607:
-------------------------------------

{code:java}
@Override // NameNodeMXBean
  public String getLiveNodes() {
    final Map<String, Map<String,Object>> info =
      new HashMap<String, Map<String,Object>>();
    final List<DatanodeDescriptor> live = new ArrayList<DatanodeDescriptor>();
    blockManager.getDatanodeManager().fetchDatanodes(live, null, false);
    for (DatanodeDescriptor node : live) {
      ImmutableMap.Builder<String, Object> innerinfo =
          ImmutableMap.<String,Object>builder();
      innerinfo
          .put("infoAddr", node.getInfoAddr())
          .put("infoSecureAddr", node.getInfoSecureAddr())
          .put("xferaddr", node.getXferAddr())
          .put("lastContact", getLastContact(node))
          .put("usedSpace", getDfsUsed(node))
          .put("adminState", node.getAdminState().toString())
          .put("nonDfsUsedSpace", node.getNonDfsUsed())
          .put("capacity", node.getCapacity())
          .put("numBlocks", node.numBlocks())
          .put("version", node.getSoftwareVersion())
 ....
{code}

{{FSNamesystem.java:7108}} corresponds to {{.put("version", 
node.getSoftwareVersion())}}. The software version is supposed to be set on 
registration.

> NPE while getting list of live nodes via jmx
> --------------------------------------------
>
>                 Key: HADOOP-14607
>                 URL: https://issues.apache.org/jira/browse/HADOOP-14607
>             Project: Hadoop Common
>          Issue Type: Bug
>    Affects Versions: 2.7.3
>            Reporter: Kihwal Lee
>
> I saw this back in February during an upgrade.  A namenode was restarted and 
> all nodes registered, but some didn't block reported. Clicking datanodes tab 
> in the web UI wasn't working, but other UI components were working. This got 
> resolved later on its own.



--
This message was sent by Atlassian JIRA
(v6.4.14#64029)

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

Reply via email to