accumulo-notifications mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Josh Elser (JIRA)" <j...@apache.org>
Subject [jira] [Created] (ACCUMULO-3331) Dead/invalid code in TabletServer#verifyTabletInformation
Date Thu, 13 Nov 2014 18:23:33 GMT
Josh Elser created ACCUMULO-3331:
------------------------------------

             Summary: Dead/invalid code in TabletServer#verifyTabletInformation
                 Key: ACCUMULO-3331
                 URL: https://issues.apache.org/jira/browse/ACCUMULO-3331
             Project: Accumulo
          Issue Type: Improvement
          Components: tserver
    Affects Versions: 1.6.1, 1.5.2
            Reporter: Josh Elser
            Assignee: Josh Elser
            Priority: Trivial
             Fix For: 1.7.0


A couple of things: tabletsKeyValues is passed in but not returned -- the original map has
to be updated, can't assign a new map to the variable otherwise the caller won't see it.

Additionally, the caller always passes in a new map (never null). We should just assert that
to be non-null. Checking for a non-null map is nonsensical for the previous reason as well.

{code}
    // only populate map after success
    if (tabletsKeyValues == null) {
      tabletsKeyValues = tkv;
    } else {
      tabletsKeyValues.clear();
      tabletsKeyValues.putAll(tkv);
    }
{code}



--
This message was sent by Atlassian JIRA
(v6.3.4#6332)

Mime
View raw message