Github user mridulm commented on a diff in the pull request: https://github.com/apache/spark/pull/21178#discussion_r184625530 --- Diff: sql/hive-thriftserver/src/main/java/org/apache/hive/service/auth/HiveAuthFactory.java --- @@ -362,4 +371,34 @@ public static void verifyProxyAccess(String realUser, String proxyUser, String i } } + public static boolean needUgiLogin(UserGroupInformation ugi, String principal, String keytab) { + return null == ugi || !ugi.hasKerberosCredentials() || !ugi.getUserName().equals(principal) || + !keytab.equals(getKeytabFromUgi()); --- End diff -- `Object.equals` for keytab check ? I dont think we invoke this when `keytab` is null currently, but would be good to future proof this.
--- --------------------------------------------------------------------- To unsubscribe, e-mail: reviews-unsubscr...@spark.apache.org For additional commands, e-mail: reviews-h...@spark.apache.org