accumulo-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From phrocker <...@git.apache.org>
Subject [GitHub] accumulo pull request #229: ACCUMULO-4597 fixed bug in rfile-info
Date Wed, 08 Mar 2017 02:52:14 GMT
Github user phrocker commented on a diff in the pull request:

    https://github.com/apache/accumulo/pull/229#discussion_r104833952
  
    --- 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 --
    
     "There are many places that could have an NPE when there is a bug, we don't handle them
all with detailed error messages." 
    https://s-media-cache-ak0.pinimg.com/736x/88/15/5e/88155efa961948d0627e61236c7d1f2b.jpg


---
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