Github user paul-rogers commented on a diff in the pull request:

    https://github.com/apache/drill/pull/870#discussion_r126839511
  
    --- Diff: 
contrib/storage-hive/core/src/main/java/org/apache/drill/exec/store/hive/HiveStoragePluginConfig.java
 ---
    @@ -66,4 +68,40 @@ public boolean equals(Object o) {
         return true;
       }
     
    +
    +  @Override
    +  public boolean enableSecurity() {
    +    return compareAndUpdateSecurityConfig("true");
    +  }
    +
    +  @Override
    +  public boolean disableSecurity() {
    +    return compareAndUpdateSecurityConfig("false");
    +  }
    +
    +  /**
    +   * Compare the newValue with current value of security setting for Hive 
Plugin
    +   *
    +   * @param newValue - new value for security setting.
    +   * @return true - if modified
    +   *         false - if not modified
    +   */
    +  public boolean compareAndUpdateSecurityConfig(String newValue) {
    --- End diff --
    
    The `compare` part is an implementation detail. Maybe just call it 
`updateSecurity()`.
    
    Then, passing in strings seems strange. Maybe pass in a boolean. Then, in 
this method, do `Boolean.toString()` to get the string value.
    
    Finally, why even bother to check fi the value exists? Why not just put the 
new value and return it (since it will be a boolean)?


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

Reply via email to