Uploaded image for project: 'Hadoop HDFS'
  1. Hadoop HDFS
  2. HDFS-14108

Performance improvement in BlockManager Data Structures

    XMLWordPrintableJSON

    Details

    • Type: Improvement
    • Status: Resolved
    • Priority: Minor
    • Resolution: Fixed
    • Affects Version/s: 3.2.0
    • Fix Version/s: 3.3.0
    • Component/s: hdfs
    • Labels:
      None

      Description

      1. Prefer ArrayList to LinkedList when simply adding/iterating
      2. Prefer HashSet to TreeSet when no ordering is required
      3. Other performance improvements
      4. Check style fixes

      https://stackoverflow.com/questions/322715/when-to-use-linkedlist-over-arraylist-in-java

          final Set<Node> excludedNodes = new HashSet<>();
          for(BlockReconstructionWork rw : reconWork){
            // Do no bother wasting time clearing out the collection, let GC do that work later
            excludedNodes.clear();
            // use {{addAll}} here
            for (DatanodeDescriptor dn : rw.getContainingNodes()) {
              excludedNodes.add(dn);
            }
      

        Attachments

        1. HDFS-14108.1.patch
          4 kB
          David Mollitor

          Activity

            People

            • Assignee:
              belugabehr David Mollitor
              Reporter:
              belugabehr David Mollitor
            • Votes:
              0 Vote for this issue
              Watchers:
              4 Start watching this issue

              Dates

              • Created:
                Updated:
                Resolved: