tephra-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From poornachandra <...@git.apache.org>
Subject [GitHub] incubator-tephra pull request #28: TEPHRA-210 Get table specific properties ...
Date Thu, 26 Jan 2017 01:25:07 GMT
Github user poornachandra commented on a diff in the pull request:

    https://github.com/apache/incubator-tephra/pull/28#discussion_r97917171
  
    --- Diff: tephra-hbase-compat-1.1-base/src/main/java/org/apache/tephra/hbase/coprocessor/TransactionProcessor.java
---
    @@ -140,29 +143,37 @@ public void start(CoprocessorEnvironment e) throws IOException {
             ttlByFamily.put(columnDesc.getName(), ttl);
           }
     
    -      this.allowEmptyValues = env.getConfiguration().getBoolean(TxConstants.ALLOW_EMPTY_VALUES_KEY,
    -                                                                TxConstants.ALLOW_EMPTY_VALUES_DEFAULT);
    +      String allowEmptyValuesFromTableDesc = tableDesc.getValue(TxConstants.ALLOW_EMPTY_VALUES_KEY);
    +      Configuration conf = getConfiguration(env);
    +      boolean allowEmptyValuesFromConfig = (conf != null) ?
    +        conf.getBoolean(TxConstants.ALLOW_EMPTY_VALUES_KEY, TxConstants.ALLOW_EMPTY_VALUES_DEFAULT)
:
    +        TxConstants.ALLOW_EMPTY_VALUES_DEFAULT;
    +
    +      // If the property is not present in the tableDescriptor, get it from the Configuration
    +      this.allowEmptyValues = (allowEmptyValuesFromTableDesc != null) ?
    --- End diff --
    
    It might help readability if we move reading `allowEmptyValues` into a private method


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