Github user yew1eb commented on a diff in the pull request:
https://github.com/apache/flink/pull/5712#discussion_r176047433
--- Diff: flink-yarn/src/main/java/org/apache/flink/yarn/Utils.java ---
@@ -351,16 +351,16 @@ static ContainerLaunchContext
createTaskExecutorContext(
require(yarnClientUsername != null, "Environment variable %s
not set", YarnConfigKeys.ENV_HADOOP_USER_NAME);
final String remoteKeytabPath =
env.get(YarnConfigKeys.KEYTAB_PATH);
- log.info("TM:remote keytab path obtained {}", remoteKeytabPath);
-
final String remoteKeytabPrincipal =
env.get(YarnConfigKeys.KEYTAB_PRINCIPAL);
- log.info("TM:remote keytab principal obtained {}",
remoteKeytabPrincipal);
-
final String remoteYarnConfPath =
env.get(YarnConfigKeys.ENV_YARN_SITE_XML_PATH);
- log.info("TM:remote yarn conf path obtained {}",
remoteYarnConfPath);
-
final String remoteKrb5Path =
env.get(YarnConfigKeys.ENV_KRB5_PATH);
- log.info("TM:remote krb5 path obtained {}", remoteKrb5Path);
+
+ if (log.isDebugEnabled()) {
--- End diff --
Sorry, I forgot to tell you that the `log.debug()` method internally calls
`islogEnabled()`.
You can see the `org.slf4j.Logger`'s log4j adapter class:
```
//org.slf4j.impl.Log4jLoggerAdapter.java
...
public void debug(String format, Object arg) {
if (logger.isDebugEnabled()) {
FormattingTuple ft = MessageFormatter.format(format, arg);
logger.log(FQCN, Level.DEBUG, ft.getMessage(), ft.getThrowable());
}
}
...
```
---