accumulo-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From ivakegg <...@git.apache.org>
Subject [GitHub] accumulo pull request #275: ACCUMULO-4667 Reworked the LocalityGroupIterator...
Date Mon, 17 Jul 2017 19:10:33 GMT
Github user ivakegg commented on a diff in the pull request:

    https://github.com/apache/accumulo/pull/275#discussion_r127797510
  
    --- Diff: core/src/main/java/org/apache/accumulo/core/util/LocalityGroupUtil.java ---
    @@ -50,16 +52,16 @@
     
       // private static final Logger log = Logger.getLogger(ColumnFamilySet.class);
     
    -  public static final Set<ByteSequence> EMPTY_CF_SET = Collections.emptySet();
    +  public static final Set<ByteSequence> EMPTY_CF_SET = ImmutableSet.of();
     
       public static Set<ByteSequence> families(Collection<Column> columns) {
         if (columns.size() == 0)
           return EMPTY_CF_SET;
    -    Set<ByteSequence> result = new HashSet<>(columns.size());
    +    Builder<ByteSequence> builder = ImmutableSet.builder();
         for (Column col : columns) {
    -      result.add(new ArrayByteSequence(col.getColumnFamily()));
    +      builder.add(new ArrayByteSequence(col.getColumnFamily()));
         }
    -    return result;
    +    return builder.build();
    --- End diff --
    
    I will look into that, although I am hoping that this can be backported to 1.8.2 as well.


---
If your project is set up for it, you can reply to this email and have your
reply appear on GitHub as well. If your project does not have this feature
enabled and wishes so, or if the feature is enabled but not working, please
contact infrastructure at infrastructure@apache.org or file a JIRA ticket
with INFRA.
---

Mime
View raw message