Return-Path: X-Original-To: archive-asf-public-internal@cust-asf2.ponee.io Delivered-To: archive-asf-public-internal@cust-asf2.ponee.io Received: from cust-asf.ponee.io (cust-asf.ponee.io [163.172.22.183]) by cust-asf2.ponee.io (Postfix) with ESMTP id 7E636200B7E for ; Tue, 6 Sep 2016 15:44:23 +0200 (CEST) Received: by cust-asf.ponee.io (Postfix) id 7D25C160AAD; Tue, 6 Sep 2016 13:44:23 +0000 (UTC) Delivered-To: archive-asf-public@cust-asf.ponee.io Received: from mail.apache.org (hermes.apache.org [140.211.11.3]) by cust-asf.ponee.io (Postfix) with SMTP id CCA3A160ABF for ; Tue, 6 Sep 2016 15:44:22 +0200 (CEST) Received: (qmail 59920 invoked by uid 500); 6 Sep 2016 13:44:21 -0000 Mailing-List: contact yarn-dev-help@hadoop.apache.org; run by ezmlm Precedence: bulk List-Help: List-Unsubscribe: List-Post: List-Id: Delivered-To: mailing list yarn-dev@hadoop.apache.org Received: (qmail 59906 invoked by uid 99); 6 Sep 2016 13:44:21 -0000 Received: from arcas.apache.org (HELO arcas) (140.211.11.28) by apache.org (qpsmtpd/0.29) with ESMTP; Tue, 06 Sep 2016 13:44:21 +0000 Received: from arcas.apache.org (localhost [127.0.0.1]) by arcas (Postfix) with ESMTP id 6DE002C1B7B for ; Tue, 6 Sep 2016 13:44:21 +0000 (UTC) Date: Tue, 6 Sep 2016 13:44:21 +0000 (UTC) From: "Aleksandr Balitsky (JIRA)" To: yarn-dev@hadoop.apache.org Message-ID: In-Reply-To: References: Subject: [jira] [Created] (YARN-5619) Provide way to limit MRJob's stdout/stderr size MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 7bit X-JIRA-FingerPrint: 30527f35849b9dde25b450d4833f0394 archived-at: Tue, 06 Sep 2016 13:44:23 -0000 Aleksandr Balitsky created YARN-5619: ---------------------------------------- Summary: Provide way to limit MRJob's stdout/stderr size Key: YARN-5619 URL: https://issues.apache.org/jira/browse/YARN-5619 Project: Hadoop YARN Issue Type: Improvement Components: log-aggregation, nodemanager Affects Versions: 2.7.0 Reporter: Aleksandr Balitsky Priority: Minor We can run job with huge amount of stdout/stderr and causing undesired consequence. There is already a Jira which is been open for while now: https://issues.apache.org/jira/browse/YARN-2231 The possible solution is to redirect Stdout's and Stderr's output to log4j in YarnChild.java main method via commands: System.setErr( new PrintStream( new LoggingOutputStream( , Level.ERROR ), true)); System.setOut( new PrintStream( new LoggingOutputStream( , Level.INFO ), true)); In this case System.out and System.err will be redirected to log4j logger with appropriate appender that will direct output to stderr or stdout files with needed size limitation. Advantages of such solution: - it allows us to restrict file sizes during job execution. Disadvantages: - It will work only for MRs jobs. - logs are stored in memory and are flushed on disk only after job's finishing (syslog works the same way) - we can loose logs if container will be killed or failed. Is it appropriate solution for solving this problem, or is there something better? -- This message was sent by Atlassian JIRA (v6.3.4#6332) --------------------------------------------------------------------- To unsubscribe, e-mail: yarn-dev-unsubscribe@hadoop.apache.org For additional commands, e-mail: yarn-dev-help@hadoop.apache.org