Github user ctubbsii commented on a diff in the pull request:

    https://github.com/apache/accumulo/pull/229#discussion_r104833643
  
    --- Diff: core/src/main/java/org/apache/accumulo/core/file/rfile/RFile.java 
---
    @@ -1015,14 +1018,23 @@ public void init(SortedKeyValueIterator<Key,Value> 
source, Map<String,String> op
     
         }
     
    +    /**
    +     * @return map of locality group names to column families. The default 
locality group will have {@code null} for a name. RFile will only track up to
    +     *         {@value Writer#MAX_CF_IN_DLG} families for the default 
locality group. After this it will stop tracking. For the case where the 
default group has
    +     *         more thn {@value Writer#MAX_CF_IN_DLG} families an empty 
list of families is returned.
    +     * @see LocalityGroupUtil#seek(Reader, Range, String, Map)
    +     */
         public Map<String,ArrayList<ByteSequence>> getLocalityGroupCF() {
           Map<String,ArrayList<ByteSequence>> cf = new HashMap<>();
     
           for (LocalityGroupMetadata lcg : localityGroups) {
    -        ArrayList<ByteSequence> setCF = new ArrayList<>();
    +        ArrayList<ByteSequence> setCF;
     
    -        for (Entry<ByteSequence,MutableLong> entry : 
lcg.columnFamilies.entrySet()) {
    -          setCF.add(entry.getKey());
    +        if (lcg.columnFamilies == null) {
    +          Preconditions.checkState(lcg.isDefaultLG, " Group %s has null 
families. Only expect default locality group to have null families.", lcg.name);
    --- End diff --
    
    > Findbugs has found some nasty bugs. The false positives can be a little 
annoying, but I think its worth it.
    
    +1000


---
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 [email protected] or file a JIRA ticket
with INFRA.
---

Reply via email to