Przeglądaj źródła

HADOOP-18645. Provide keytab file key name with ServiceStateException (#5433)

Signed-off-by: Tao Li <tomscut@apache.org>
Viraj Jasani 2 lat temu
rodzic
commit
28d2753d2f

+ 2 - 1
hadoop-common-project/hadoop-common/src/main/java/org/apache/hadoop/security/SecurityUtil.java

@@ -314,7 +314,8 @@ public final class SecurityUtil {
     
     String keytabFilename = conf.get(keytabFileKey);
     if (keytabFilename == null || keytabFilename.length() == 0) {
-      throw new IOException("Running in secure mode, but config doesn't have a keytab");
+      throw new IOException(
+          "Running in secure mode, but config doesn't have a keytab for key: " + keytabFileKey);
     }
 
     String principalConfig = conf.get(userNameKey, System

+ 2 - 1
hadoop-hdfs-project/hadoop-hdfs-rbf/src/test/java/org/apache/hadoop/hdfs/server/federation/router/TestRouterWithSecureStartup.java

@@ -56,7 +56,8 @@ public class TestRouterWithSecureStartup {
   @Test
   public void testStartupWithoutKeytab() throws Exception {
     testCluster(DFS_ROUTER_KEYTAB_FILE_KEY,
-        "Running in secure mode, but config doesn't have a keytab");
+        "Running in secure mode, but config doesn't have a keytab for "
+            + "key: dfs.federation.router.keytab.file");
   }
 
   @Test