Browse Source

YARN-8208. Add log statement for Docker client configuration file at INFO level. Contributed by Yesha Vora

(cherry picked from commit 914d6b5cb143f4f9cadd9d689ea4e278383a6779)
Billie Rinaldi 7 years ago
parent
commit
b20f68ddaa

+ 1 - 0
hadoop-yarn-project/hadoop-yarn/hadoop-yarn-applications/hadoop-yarn-services/hadoop-yarn-services-core/src/main/java/org/apache/hadoop/yarn/service/utils/ServiceApiUtil.java

@@ -232,6 +232,7 @@ public class ServiceApiUtil {
     if (!StringUtils.isEmpty(dockerClientConfig)) {
     if (!StringUtils.isEmpty(dockerClientConfig)) {
       Path dockerClientConfigPath = new Path(dockerClientConfig);
       Path dockerClientConfigPath = new Path(dockerClientConfig);
       FileSystem fs = dockerClientConfigPath.getFileSystem(conf);
       FileSystem fs = dockerClientConfigPath.getFileSystem(conf);
+      LOG.info("The supplied Docker client config is " + dockerClientConfig);
       if (!fs.exists(dockerClientConfigPath)) {
       if (!fs.exists(dockerClientConfigPath)) {
         throw new IOException(
         throw new IOException(
             "The supplied Docker client config does not exist: "
             "The supplied Docker client config does not exist: "

+ 2 - 4
hadoop-yarn-project/hadoop-yarn/hadoop-yarn-common/src/main/java/org/apache/hadoop/yarn/util/DockerClientConfigHandler.java

@@ -118,10 +118,8 @@ public final class DockerClientConfigHandler {
                 tokenId.getKind(), new Text(registryUrl));
                 tokenId.getKind(), new Text(registryUrl));
         credentials.addToken(
         credentials.addToken(
             new Text(registryUrl + "-" + applicationId), token);
             new Text(registryUrl + "-" + applicationId), token);
-        if (LOG.isDebugEnabled()) {
-          LOG.debug("Token read from Docker client configuration file: "
-              + token.toString());
-        }
+        LOG.info("Token read from Docker client configuration file: "
+                + token.toString());
       }
       }
     }
     }
     return credentials;
     return credentials;