Uploaded image for project: 'HBase'
  1. HBase
  2. HBASE-15531 Favored Nodes Enhancements
  3. HBASE-17281

FN should use datanode port from hdfs configuration

    XMLWordPrintableJSON

Details

    • Sub-task
    • Status: Closed
    • Minor
    • Resolution: Fixed
    • None
    • 2.0.0
    • FavoredNodes
    • None

    Description

      Currently we use the ServerName port for providing favored node hints. We should use the DN port from hdfs-site.xml instead to avoid warning messages in region server logs. The warnings will be from this section of HDFS code, it moves across classes.

      https://github.com/apache/hadoop/blob/trunk/hadoop-hdfs-project/hadoop-hdfs-client/src/main/java/org/apache/hadoop/hdfs/DataStreamer.java#L1758

        private boolean[] getPinnings(DatanodeInfo[] nodes) {
          if (favoredNodes == null) {
            return null;
          } else {
            boolean[] pinnings = new boolean[nodes.length];
            HashSet<String> favoredSet = new HashSet<>(Arrays.asList(favoredNodes));
            for (int i = 0; i < nodes.length; i++) {
              pinnings[i] = favoredSet.remove(nodes[i].getXferAddrWithHostname());
              LOG.debug("{} was chosen by name node (favored={}).",
                  nodes[i].getXferAddrWithHostname(), pinnings[i]);
            }
            if (!favoredSet.isEmpty()) {
              // There is one or more favored nodes that were not allocated.
              LOG.warn("These favored nodes were specified but not chosen: "
                  + favoredSet + " Specified favored nodes: "
                  + Arrays.toString(favoredNodes));
      
            }
            return pinnings;
          }
        }
      

      Attachments

        1. HBASE-17281.master.001.patch
          8 kB
          Thiruvel Thirumoolan
        2. HBASE-17281.master.002.patch
          16 kB
          Thiruvel Thirumoolan
        3. HBASE-17281.master.003.patch
          10 kB
          Thiruvel Thirumoolan
        4. HBASE-17281.master.004.patch
          10 kB
          Thiruvel Thirumoolan
        5. HBASE-17281.master.005.patch
          9 kB
          Thiruvel Thirumoolan

        Issue Links

          Activity

            People

              thiruvel Thiruvel Thirumoolan
              thiruvel Thiruvel Thirumoolan
              Votes:
              0 Vote for this issue
              Watchers:
              5 Start watching this issue

              Dates

                Created:
                Updated:
                Resolved: