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

Signed-off-by: Tao Li <tomscut@apache.org>
This commit is contained in:
Viraj Jasani 2023-02-28 17:34:12 -08:00 committed by GitHub
parent bcc51ce2c5
commit 28d2753d2f
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
2 changed files with 4 additions and 2 deletions

View File

@ -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

View File

@ -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