From yarn-issues-return-47757-apmail-hadoop-yarn-issues-archive=hadoop.apache.org@hadoop.apache.org Thu Feb 12 16:17:12 2015 Return-Path: X-Original-To: apmail-hadoop-yarn-issues-archive@minotaur.apache.org Delivered-To: apmail-hadoop-yarn-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 74B8917DA0 for ; Thu, 12 Feb 2015 16:17:12 +0000 (UTC) Received: (qmail 52185 invoked by uid 500); 12 Feb 2015 16:17:12 -0000 Delivered-To: apmail-hadoop-yarn-issues-archive@hadoop.apache.org Received: (qmail 52137 invoked by uid 500); 12 Feb 2015 16:17:12 -0000 Mailing-List: contact yarn-issues-help@hadoop.apache.org; run by ezmlm Precedence: bulk List-Help: List-Unsubscribe: List-Post: List-Id: Reply-To: yarn-issues@hadoop.apache.org Delivered-To: mailing list yarn-issues@hadoop.apache.org Received: (qmail 52121 invoked by uid 99); 12 Feb 2015 16:17:12 -0000 Received: from arcas.apache.org (HELO arcas.apache.org) (140.211.11.28) by apache.org (qpsmtpd/0.29) with ESMTP; Thu, 12 Feb 2015 16:17:12 +0000 Date: Thu, 12 Feb 2015 16:17:12 +0000 (UTC) From: "Junping Du (JIRA)" To: yarn-issues@hadoop.apache.org Message-ID: In-Reply-To: References: Subject: [jira] [Commented] (YARN-2079) Recover NonAggregatingLogHandler state upon nodemanager restart MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 7bit X-JIRA-FingerPrint: 30527f35849b9dde25b450d4833f0394 [ https://issues.apache.org/jira/browse/YARN-2079?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=14318461#comment-14318461 ] Junping Du commented on YARN-2079: ---------------------------------- Thanks [~jlowe] for updating the patch! The patch looks fine in overall. However, a small bug need to be fixed here: In NonAggregatingLogHandler.java, {code} + private void recover() throws IOException { + if (stateStore.canRecover()) { ... + long deleteDelayMsec = now - proto.getDeletionTime(); ... + sched.schedule(logDeleter, deleteDelayMsec, TimeUnit.MILLISECONDS); + } + } + } {code} I think proto.getDeletionTime() is the original deletion time, so left milliseconds to delete should be: proto.getDeletionTime() - now. If this value is minus, then we should set 0 instead. In addition, do we want to handle RejectedExecutionException in schedule with following the same practice as other places, e.g. handle(LogHandlerEvent event)? {code} catch (RejectedExecutionException e) { // Handling this event in local thread before starting threads // or after calling sched.shutdownNow(). logDeleter.run(); } {code} Other looks fine to me. > Recover NonAggregatingLogHandler state upon nodemanager restart > --------------------------------------------------------------- > > Key: YARN-2079 > URL: https://issues.apache.org/jira/browse/YARN-2079 > Project: Hadoop YARN > Issue Type: Sub-task > Components: nodemanager > Affects Versions: 2.4.0 > Reporter: Jason Lowe > Assignee: Jason Lowe > Attachments: YARN-2079.002.patch, YARN-2079.patch > > > The state of NonAggregatingLogHandler needs to be persisted so logs are properly deleted across a nodemanager restart. -- This message was sent by Atlassian JIRA (v6.3.4#6332)