From issues-return-159397-archive-asf-public=cust-asf.ponee.io@flink.apache.org Wed Mar 21 02:39:13 2018 Return-Path: X-Original-To: archive-asf-public@cust-asf.ponee.io Delivered-To: archive-asf-public@cust-asf.ponee.io Received: from mail.apache.org (hermes.apache.org [140.211.11.3]) by mx-eu-01.ponee.io (Postfix) with SMTP id 7986118064A for ; Wed, 21 Mar 2018 02:39:13 +0100 (CET) Received: (qmail 87631 invoked by uid 500); 21 Mar 2018 01:39:12 -0000 Mailing-List: contact issues-help@flink.apache.org; run by ezmlm Precedence: bulk List-Help: List-Unsubscribe: List-Post: List-Id: Reply-To: dev@flink.apache.org Delivered-To: mailing list issues@flink.apache.org Received: (qmail 87622 invoked by uid 99); 21 Mar 2018 01:39:12 -0000 Received: from git1-us-west.apache.org (HELO git1-us-west.apache.org) (140.211.11.23) by apache.org (qpsmtpd/0.29) with ESMTP; Wed, 21 Mar 2018 01:39:12 +0000 Received: by git1-us-west.apache.org (ASF Mail Server at git1-us-west.apache.org, from userid 33) id ABCBBF4E82; Wed, 21 Mar 2018 01:39:11 +0000 (UTC) From: yanghua To: issues@flink.apache.org Reply-To: issues@flink.apache.org References: In-Reply-To: Subject: [GitHub] flink pull request #5712: [FLINK-9011] YarnResourceManager spamming log file... Content-Type: text/plain Message-Id: <20180321013911.ABCBBF4E82@git1-us-west.apache.org> Date: Wed, 21 Mar 2018 01:39:11 +0000 (UTC) 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. ---