zhoujinsong commented on code in PR #3377: URL: https://github.com/apache/amoro/pull/3377#discussion_r1895211603
########## amoro-common/src/main/java/org/apache/amoro/table/TableMetaStore.java: ########## @@ -407,13 +407,15 @@ public UserGroupInformation getUGI() { return ugi; } - private void constructKerberosUgi() throws IOException, KrbException { + private void constructKerberosUgi() throws Exception { Path confPath = generateKrbConfPath(); String krbConfFile = saveConfInPath(confPath, KRB_CONF_FILE_NAME, krbConf); String keyTabFile = saveConfInPath(confPath, KEY_TAB_FILE_NAME, krbKeyTab); System.clearProperty(HADOOP_USER_PROPERTY); System.setProperty(KRB5_CONF_PROPERTY, krbConfFile); - sun.security.krb5.Config.refresh(); + Class<?> classRef = Class.forName("sun.security.krb5.Config"); Review Comment: Maybe we can create a static variable to store this method reference rather than construct it every time. Besides, it is not required to have `sun.security.krb5.Config` in classpath, so if it is not existed, we can skip the refresh calling. -- 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. To unsubscribe, e-mail: commits-unsubscr...@amoro.apache.org For queries about this service, please contact Infrastructure at: us...@infra.apache.org