Github user mridulm commented on a diff in the pull request:

    https://github.com/apache/spark/pull/21178#discussion_r185404453
  
    --- Diff: 
sql/hive-thriftserver/src/main/java/org/apache/hive/service/auth/HiveAuthFactory.java
 ---
    @@ -92,7 +95,26 @@ public String getAuthName() {
       public static final String HS2_PROXY_USER = "hive.server2.proxy.user";
       public static final String HS2_CLIENT_TOKEN = "hiveserver2ClientToken";
     
    -  public HiveAuthFactory(HiveConf conf) throws TTransportException {
    +  private static Field keytabFile = null;
    +  private static Method getKeytab = null;
    +  static {
    +    Class<?> clz = UserGroupInformation.class;
    +    try {
    +      keytabFile = clz.getDeclaredField("keytabFile");
    +      keytabFile.setAccessible(true);
    +    } catch (NoSuchFieldException nfe) {
    +      keytabFile = null;
    --- End diff --
    
    nit: We should include a debug message (not INFO) indicating the exception.
    Same for getKeytab below.
    
    This will help debug in case the signatures of these private methods 
changes later, and we are not sure what is happening.


---

---------------------------------------------------------------------
To unsubscribe, e-mail: reviews-unsubscr...@spark.apache.org
For additional commands, e-mail: reviews-h...@spark.apache.org

Reply via email to