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 4ECD7200C5B for ; Thu, 27 Apr 2017 14:57:10 +0200 (CEST) Received: by cust-asf.ponee.io (Postfix) id 4D712160B98; Thu, 27 Apr 2017 12:57:10 +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 94437160BA7 for ; Thu, 27 Apr 2017 14:57:09 +0200 (CEST) Received: (qmail 14748 invoked by uid 500); 27 Apr 2017 12:57:08 -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 14667 invoked by uid 99); 27 Apr 2017 12:57:08 -0000 Received: from pnap-us-west-generic-nat.apache.org (HELO spamd3-us-west.apache.org) (209.188.14.142) by apache.org (qpsmtpd/0.29) with ESMTP; Thu, 27 Apr 2017 12:57:08 +0000 Received: from localhost (localhost [127.0.0.1]) by spamd3-us-west.apache.org (ASF Mail Server at spamd3-us-west.apache.org) with ESMTP id 3E2CD188C40 for ; Thu, 27 Apr 2017 12:57:08 +0000 (UTC) X-Virus-Scanned: Debian amavisd-new at spamd3-us-west.apache.org X-Spam-Flag: NO X-Spam-Score: -100.002 X-Spam-Level: X-Spam-Status: No, score=-100.002 tagged_above=-999 required=6.31 tests=[RP_MATCHES_RCVD=-0.001, SPF_PASS=-0.001, USER_IN_WHITELIST=-100] autolearn=disabled Received: from mx1-lw-us.apache.org ([10.40.0.8]) by localhost (spamd3-us-west.apache.org [10.40.0.10]) (amavisd-new, port 10024) with ESMTP id OGlbdta3mZgH for ; Thu, 27 Apr 2017 12:57:07 +0000 (UTC) Received: from mailrelay1-us-west.apache.org (mailrelay1-us-west.apache.org [209.188.14.139]) by mx1-lw-us.apache.org (ASF Mail Server at mx1-lw-us.apache.org) with ESMTP id F3ED55FCCB for ; Thu, 27 Apr 2017 12:57:05 +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 846B6E0D5C for ; Thu, 27 Apr 2017 12:57:05 +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 8ADB221DF1 for ; Thu, 27 Apr 2017 12:57:04 +0000 (UTC) Date: Thu, 27 Apr 2017 12:57:04 +0000 (UTC) From: "Hudson (JIRA)" To: yarn-issues@hadoop.apache.org Message-ID: In-Reply-To: References: Subject: [jira] [Commented] (YARN-6455) Enhance the timelinewriter.flush() race condition fix MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 7bit X-JIRA-FingerPrint: 30527f35849b9dde25b450d4833f0394 archived-at: Thu, 27 Apr 2017 12:57:10 -0000 [ https://issues.apache.org/jira/browse/YARN-6455?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=15986558#comment-15986558 ] Hudson commented on YARN-6455: ------------------------------ SUCCESS: Integrated in Jenkins build Hadoop-trunk-Commit #11639 (See [https://builds.apache.org/job/Hadoop-trunk-Commit/11639/]) YARN-6455. Enhance the timelinewriter.flush() race condition fix (Haibo (varunsaxena: rev 793bbf216dc6d44ea57c778037bd461513fa6078) * (edit) hadoop-yarn-project/hadoop-yarn/hadoop-yarn-server/hadoop-yarn-server-timelineservice/src/main/java/org/apache/hadoop/yarn/server/timelineservice/collector/TimelineCollector.java * (edit) hadoop-yarn-project/hadoop-yarn/hadoop-yarn-server/hadoop-yarn-server-timelineservice/src/main/java/org/apache/hadoop/yarn/server/timelineservice/collector/AppLevelTimelineCollector.java > Enhance the timelinewriter.flush() race condition fix > ----------------------------------------------------- > > Key: YARN-6455 > URL: https://issues.apache.org/jira/browse/YARN-6455 > Project: Hadoop YARN > Issue Type: Sub-task > Components: yarn > Affects Versions: 3.0.0-alpha2 > Reporter: Haibo Chen > Assignee: Haibo Chen > Fix For: YARN-5355, YARN-5355-branch-2, 3.0.0-alpha3 > > Attachments: YARN-6455.00.patch > > > YARN-6376 fixes timelinewriter.flush() race condition among concurrent putEntities() calls and periodical flush by TimelineCollectorManager by synchronizing on the writer object. > Synchronizing on the writer is still a little brittle there, because there is a getWriter method which lets callers access the writer without synchronizing on it. AppLevelTimelineCollector#AppLevelAggregator#agregate() does this in line 152: getWriter().write(...) In this case it doesn't flush, but if that were to be added, that would re-introduce the race fixed in YARN-6376. > Instead of exposing the writer, perhaps it would be better to have the sub-classes call #putEntities instead. It defers to the private writeTimelineEntities which does the same work to get the context: > TimelineCollectorContext context = getTimelineEntityContext(); -- 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