Return-Path: X-Original-To: apmail-flink-issues-archive@minotaur.apache.org Delivered-To: apmail-flink-issues-archive@minotaur.apache.org Received: from mail.apache.org (hermes.apache.org [140.211.11.3]) by minotaur.apache.org (Postfix) with SMTP id A5EE917745 for ; Mon, 19 Jan 2015 16:15:50 +0000 (UTC) Received: (qmail 16475 invoked by uid 500); 19 Jan 2015 16:15:52 -0000 Delivered-To: apmail-flink-issues-archive@flink.apache.org Received: (qmail 16431 invoked by uid 500); 19 Jan 2015 16:15:52 -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 16422 invoked by uid 99); 19 Jan 2015 16:15:52 -0000 Received: from nike.apache.org (HELO nike.apache.org) (192.87.106.230) by apache.org (qpsmtpd/0.29) with ESMTP; Mon, 19 Jan 2015 16:15:52 +0000 X-ASF-Spam-Status: No, hits=-2000.0 required=5.0 tests=ALL_TRUSTED,T_RP_MATCHES_RCVD X-Spam-Check-By: apache.org Received: from [140.211.11.3] (HELO mail.apache.org) (140.211.11.3) by apache.org (qpsmtpd/0.29) with SMTP; Mon, 19 Jan 2015 16:15:30 +0000 Received: (qmail 15503 invoked by uid 99); 19 Jan 2015 16:15:28 -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; Mon, 19 Jan 2015 16:15:28 +0000 Received: by git1-us-west.apache.org (ASF Mail Server at git1-us-west.apache.org, from userid 33) id 63EE9E0383; Mon, 19 Jan 2015 16:15:27 +0000 (UTC) From: tillrohrmann To: issues@flink.incubator.apache.org Reply-To: issues@flink.incubator.apache.org References: In-Reply-To: Subject: [GitHub] flink pull request: [FLINK-1295][FLINK-883] Allow to deploy 'job o... Content-Type: text/plain Message-Id: <20150119161527.63EE9E0383@git1-us-west.apache.org> Date: Mon, 19 Jan 2015 16:15:27 +0000 (UTC) X-Virus-Checked: Checked by ClamAV on apache.org Github user tillrohrmann commented on a diff in the pull request: https://github.com/apache/flink/pull/292#discussion_r23169293 --- Diff: flink-clients/src/main/java/org/apache/flink/client/CliFrontend.java --- @@ -860,8 +910,50 @@ protected Properties getYarnProperties() throws IOException { return yarnProperties; } - protected Client getClient(CommandLine line, ClassLoader classLoader) throws IOException { - return new Client(getJobManagerAddress(line), getGlobalConfiguration(), classLoader); + protected Client getClient(CommandLine line, ClassLoader classLoader, String programName) throws IOException { + String jmAddrString = getJobManagerAddressString(line); + InetSocketAddress jobManagerAddress = null; + if(jmAddrString.equals(YARN_DEPLOY_JOBMANAGER)) { + System.out.println("YARN cluster mode detected. Switching Log4j output to console"); + LogManager.getRootLogger().addAppender(new ConsoleAppender(new PatternLayout(DEFAULT_LOG4J_PATTERN_LAYOUT))); --- End diff -- Do we have to hardwire log4j into our code? That contradicts slf4j's purpose. Would be great if we could get rid of that. --- If your project is set up for it, you can reply to this email and have your reply appear on GitHub as well. If your project does not have this feature enabled and wishes so, or if the feature is enabled but not working, please contact infrastructure at infrastructure@apache.org or file a JIRA ticket with INFRA. ---