You are viewing a plain text version of this content. The canonical link for it is here.
Posted to issues@nifi.apache.org by GitBox <gi...@apache.org> on 2020/02/28 21:38:02 UTC

[GitHub] [nifi] jtstorck commented on a change in pull request #4102: NIFI-7025: Adds Kerberos Password to Hive/Hive_1_1/Hive3 components

jtstorck commented on a change in pull request #4102: NIFI-7025: Adds Kerberos Password to Hive/Hive_1_1/Hive3 components
URL: https://github.com/apache/nifi/pull/4102#discussion_r385934166
 
 

 ##########
 File path: nifi-nar-bundles/nifi-extension-utils/nifi-hadoop-utils/src/main/java/org/apache/nifi/processors/hadoop/AbstractHadoopProcessor.java
 ##########
 @@ -563,8 +558,8 @@ protected UserGroupInformation getUserGroupInformation() {
     /*
      * Overridable by subclasses in the same package, mainly intended for testing purposes to allow verification without having to set environment variables.
      */
-    String getAllowExplicitKeytabEnvironmentVariable() {
-        return System.getenv(ALLOW_EXPLICIT_KEYTAB);
+    boolean isAllowExplicitKeytab() {
+        return Boolean.parseBoolean(System.getenv(ALLOW_EXPLICIT_KEYTAB));
 
 Review comment:
   Boolean.parseBoolean(String s) doesn't throw an exception.  It'll return false unless the string passed to it, ignoring case, equals "true".  It doesn't do any trimming, just takes the given string and evaluates it:
   ```java
       public static boolean parseBoolean(String s) {
           return ((s != null) && s.equalsIgnoreCase("true"));
       }
   ```

----------------------------------------------------------------
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
 
For queries about this service, please contact Infrastructure at:
users@infra.apache.org


With regards,
Apache Git Services