accumulo-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From ctubbsii <>
Subject [GitHub] accumulo pull request #229: ACCUMULO-4597 fixed bug in rfile-info
Date Wed, 08 Mar 2017 02:48:24 GMT
Github user ctubbsii commented on a diff in the pull request:
    --- Diff: core/src/main/java/org/apache/accumulo/core/file/rfile/ ---
    @@ -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.",;
    --- End diff --
    > Findbugs has found some nasty bugs. The false positives can be a little annoying,
but I think its worth it.

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

View raw message