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 35EC2200C1E for ; Fri, 3 Feb 2017 00:36:03 +0100 (CET) Received: by cust-asf.ponee.io (Postfix) id 34815160B61; Thu, 2 Feb 2017 23:36:03 +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 5799D160B57 for ; Fri, 3 Feb 2017 00:36:02 +0100 (CET) Received: (qmail 44190 invoked by uid 500); 2 Feb 2017 23:36:01 -0000 Mailing-List: contact yarn-issues-help@hadoop.apache.org; run by ezmlm Precedence: bulk List-Help: List-Unsubscribe: List-Post: List-Id: Delivered-To: mailing list yarn-issues@hadoop.apache.org Received: (qmail 44179 invoked by uid 99); 2 Feb 2017 23:36:01 -0000 Received: from pnap-us-west-generic-nat.apache.org (HELO spamd4-us-west.apache.org) (209.188.14.142) by apache.org (qpsmtpd/0.29) with ESMTP; Thu, 02 Feb 2017 23:36:01 +0000 Received: from localhost (localhost [127.0.0.1]) by spamd4-us-west.apache.org (ASF Mail Server at spamd4-us-west.apache.org) with ESMTP id 0BDDDC03A4 for ; Thu, 2 Feb 2017 23:36:01 +0000 (UTC) X-Virus-Scanned: Debian amavisd-new at spamd4-us-west.apache.org X-Spam-Flag: NO X-Spam-Score: -1.199 X-Spam-Level: X-Spam-Status: No, score=-1.199 tagged_above=-999 required=6.31 tests=[KAM_ASCII_DIVIDERS=0.8, KAM_LAZY_DOMAIN_SECURITY=1, RP_MATCHES_RCVD=-2.999] autolearn=disabled Received: from mx1-lw-eu.apache.org ([10.40.0.8]) by localhost (spamd4-us-west.apache.org [10.40.0.11]) (amavisd-new, port 10024) with ESMTP id XiAYPu394C9q for ; Thu, 2 Feb 2017 23:35:59 +0000 (UTC) Received: from mailrelay1-us-west.apache.org (mailrelay1-us-west.apache.org [209.188.14.139]) by mx1-lw-eu.apache.org (ASF Mail Server at mx1-lw-eu.apache.org) with ESMTP id 822AC5FD9C for ; Thu, 2 Feb 2017 23:35:58 +0000 (UTC) Received: from jira-lw-us.apache.org (unknown [207.244.88.139]) by mailrelay1-us-west.apache.org (ASF Mail Server at mailrelay1-us-west.apache.org) with ESMTP id E7022E0436 for ; Thu, 2 Feb 2017 23:35:51 +0000 (UTC) Received: from jira-lw-us.apache.org (localhost [127.0.0.1]) by jira-lw-us.apache.org (ASF Mail Server at jira-lw-us.apache.org) with ESMTP id A624225290 for ; Thu, 2 Feb 2017 23:35:51 +0000 (UTC) Date: Thu, 2 Feb 2017 23:35:51 +0000 (UTC) From: "Andras Piros (JIRA)" To: yarn-issues@hadoop.apache.org Message-ID: In-Reply-To: References: Subject: [jira] [Comment Edited] (YARN-6125) The application attempt's diagnostic message should have a maximum size MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 7bit X-JIRA-FingerPrint: 30527f35849b9dde25b450d4833f0394 archived-at: Thu, 02 Feb 2017 23:36:03 -0000 [ https://issues.apache.org/jira/browse/YARN-6125?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=15850732#comment-15850732 ] Andras Piros edited comment on YARN-6125 at 2/2/17 11:35 PM: ------------------------------------------------------------- * {{ExpectedException.none()}} as factory method, and {{ExpectedException}} general usage description can be found [*here*|https://github.com/junit-team/junit4/wiki/exception-testing#expectedexception-rule]. Basically if you don't expect any {{Exception}} s to be thrown, you don't call {{expect()}}, {{expectMessage()}} or {{expectCause()}}. Yes, you can always test exceptional behavior w/ [*try-catch idiom*|https://github.com/junit-team/junit4/wiki/exception-testing#trycatch-idiom] instead of {{ExpectedException}} * got rid of {{Lists.newLinkedList()}} call * got rid of that {{final}} variable Posting the patch addressing those issues but not yet the truncate behavior. Talked to [~templedf] and [~yufeigu] offline about truncate characteristics, here is one possible solution: # when a message is being appended, and it doesn't fit into the buffer, trim message body to buffer size (minus header prefixes) preserving its head and add a prefix header telling users it's been partially truncated # when a message is being appended, and it fits into the buffer: ## past messages are deleted in FIFO order ## for all the ones deleted we put a common prefix header stating there have been messages left out ## for the last one truncated we trim the message body and add a prefix header stating part of its tail has been left out Some example scenarios, considering four consecutive {{append()}} calls w/ different messages each: # nothing truncated: {noformat} message1 this is a very long message that fits into the buffer message2 this is a lot shorter than the previour one message3 this is even shorter message4 the shortest one {noformat} # only the very last message has been partially truncated: {noformat} message1 this is a very long message that fits into the buffer message2 this is a lot shorter than the previour one message3 this is even shorter message4 this has been one that did not fit totally into the buffer... {noformat} # only the very first message has been partially truncated: {noformat} message1 this has been one that did not fit totally into the buffer... message2 this is a very long message that fits into the buffer message3 this is a lot shorter than the previour one message4 the shortest one {noformat} # the first several ones have been deleted, the previous one has been truncated partially: {noformat} message3 this has been one that did not fit totally into the buffer... message4 the shortest one {noformat} # all the previous ones have been deleted, plus the last one has been truncated: {noformat} message4 this has been one that did not fit totally into the buffer... {noformat} [~jlowe], [~kasha], [~vvasudev] what is your opinion about the proposal? was (Author: andras.piros): * {{ExpectedException.none()}} as factory method, and {{ExpectedException}} general usage description can be found [*here*|https://github.com/junit-team/junit4/wiki/exception-testing#expectedexception-rule]. Basically if you don't expect any {{Exception}} s to be thrown, you don't call {{expect()}}, {{expectMessage()}} or {{expectCause()}}. Yes, you can always test exceptional behavior w/ [*try-catch idiom*|https://github.com/junit-team/junit4/wiki/exception-testing#trycatch-idiom] instead of {{ExpectedException}} * got rid of {{Lists.newLinkedList()}} call * got rid of that {{final}} variable Posting the patch addressing those issues but not yet the truncate behavior. Talked to [~templedf] and [~yufeigu] offline about truncate characteristics, here is one possible solution: # when a message is being appended, and it doesn't fit into the buffer, trim message body to buffer size (minus header prefixes) preserving its head and add a prefix header telling users it's been partially truncated # when a message is being appended, and it fits into the buffer: ## past messages are truncated in FIFO order ## for all the ones truncated fully we put a common prefix header stating there have been messages left out ## for the last one truncated partially we trim the message body and add a prefix header stating it's been partially truncated Some example scenarios: # nothing truncated: {noformat} message1 this is a very long message that fits into the buffer message2 this is a lot shorter than the previour one message3 the shortest one {noformat} # only the very last message has been partially truncated: {noformat} message1 this is a very long message that fits into the buffer message2 this is a lot shorter than the previour one message3 the shortest one message4 this has been one that did not fit totally into the buffer... {noformat} # only the very first message has been partially truncated: {noformat} message1 this has been one that did not fit totally into the buffer... message2 this is a very long message that fits into the buffer message3 this is a lot shorter than the previour one message4 the shortest one {noformat} # the first several ones have been deleted, the previous one has been truncated partially: {noformat} message3 this has been one that did not fit totally into the buffer... message4 the shortest one {noformat} # all the previous ones have been deleted, plus the last one has been truncated: {noformat} message4 this has been one that did not fit totally into the buffer... {noformat} [~jlowe], [~kasha], [~vvasudev] what is your opinion about the proposal? > The application attempt's diagnostic message should have a maximum size > ----------------------------------------------------------------------- > > Key: YARN-6125 > URL: https://issues.apache.org/jira/browse/YARN-6125 > Project: Hadoop YARN > Issue Type: Improvement > Components: resourcemanager > Affects Versions: 2.7.0 > Reporter: Daniel Templeton > Assignee: Andras Piros > Priority: Critical > Fix For: 3.0.0-alpha3 > > Attachments: YARN-6125.000.patch, YARN-6125.001.patch, YARN-6125.002.patch > > > We've found through experience that the diagnostic message can grow unbounded. I've seen attempts that have diagnostic messages over 1MB. Since the message is stored in the state store, it's a bad idea to allow the message to grow unbounded. Instead, there should be a property that sets a maximum size on the message. > I suspect that some of the ZK state store issues we've seen in the past were due to the size of the diagnostic messages and not to the size of the classpath, as is the current prevailing opinion. > An open question is how best to prune the message once it grows too large. Should we > # truncate the tail, > # truncate the head, > # truncate the middle, > # add another property to make the behavior selectable, or > # none of the above? -- This message was sent by Atlassian JIRA (v6.3.15#6346) --------------------------------------------------------------------- To unsubscribe, e-mail: yarn-issues-unsubscribe@hadoop.apache.org For additional commands, e-mail: yarn-issues-help@hadoop.apache.org