Github user yanghua commented on a diff in the pull request:
https://github.com/apache/flink/pull/5712#discussion_r175969652
--- 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 --
@yew1eb , In a way, I agree with you. If there is just one
`log.debug('xxx')` and no string concatination, the `if (log.isDebugEnabled())`
is not necessary. But this case, there are four `log.debug()` call , and each
of them would do the same judgement inside the `debug` method. So wrapping a
outer judgement is performance reason.
---