Uploaded image for project: 'HBase'
  1. HBase
  2. HBASE-20509

Put List in HashSet directly without using addAll function to improve performance

    XMLWordPrintableJSON

Details

    • Reviewed

    Description

      https://docs.oracle.com/javase/7/docs/api/java/util/Collection.html

      change

      Set<ServerName> serverSet = new HashSet<>();
      serverSet.addAll(serverList);

      to

      Set<ServerName> serverSet = new HashSet<>(serverList);

      in

      ./hbase-server/src/main/java/org/apache/hadoop/hbase/favored/FavoredNodeAssignmentHelper.java

       

      Attachments

        1. HBASE-20509.v0.patch
          2 kB
          taiyinglee

        Activity

          People

            taiyinglee taiyinglee
            taiyinglee taiyinglee
            Votes:
            0 Vote for this issue
            Watchers:
            5 Start watching this issue

            Dates

              Created:
              Updated:
              Resolved: