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 669D2200B80 for ; Wed, 14 Sep 2016 09:54:23 +0200 (CEST) Received: by cust-asf.ponee.io (Postfix) id 65672160AB4; Wed, 14 Sep 2016 07:54: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 AE13C160AD5 for ; Wed, 14 Sep 2016 09:54:22 +0200 (CEST) Received: (qmail 62051 invoked by uid 500); 14 Sep 2016 07:54:21 -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 61586 invoked by uid 99); 14 Sep 2016 07:54:21 -0000 Received: from arcas.apache.org (HELO arcas) (140.211.11.28) by apache.org (qpsmtpd/0.29) with ESMTP; Wed, 14 Sep 2016 07:54:21 +0000 Received: from arcas.apache.org (localhost [127.0.0.1]) by arcas (Postfix) with ESMTP id E6CF52C0D5A for ; Wed, 14 Sep 2016 07:54:20 +0000 (UTC) Date: Wed, 14 Sep 2016 07:54:20 +0000 (UTC) From: "Jian He (JIRA)" To: yarn-issues@hadoop.apache.org Message-ID: In-Reply-To: References: Subject: [jira] [Commented] (YARN-5637) Changes in NodeManager to support Container upgrade and rollback/commit MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: quoted-printable X-JIRA-FingerPrint: 30527f35849b9dde25b450d4833f0394 archived-at: Wed, 14 Sep 2016 07:54:23 -0000 [ https://issues.apache.org/jira/browse/YARN-5637?page=3Dcom.atlassian.= jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=3D15489= 728#comment-15489728 ]=20 Jian He commented on YARN-5637: ------------------------------- Thanks Arun, some more comments: - Here, we could make reInitEvent.getResourceSet() be merged with existing = resourceSet.localizedResource upfront, so that both oldResourceSet and newR= esourceSet contain full copy of resources, rather than delta. Doing this, t= he logic of {{container.resourceSet =3D container.reInitContext.mergedResou= rceSet();}} will not needed. We can simply set it with {{container.resource= Set =3D reInitContext.newResoureSet}}, similar to what=E2=80=99s being done= for {{container.launchContext =3D reInitContext.newLaunchContext}} {code} return new ReInitializationContext(reInitEvent.getReInitLaunchContext(), =C2=A0=C2=A0=C2=A0 reInitEvent.getResourceSet(), container.getLaunchContext= (), =C2=A0=C2=A0=C2=A0 container.resourceSet, reInitEvent.getRetryFailureContex= t(),=20 =C2=A0=C2=A0=C2=A0 reInitEvent.isAutoCommit()); {code} - nit: the container.reInitContext!=3D null check is not needed. {code} if (container.reInitContext !=3D null=20 =C2=A0=C2=A0=C2=A0 && container.reInitContext.autoCommit) { {code} - I found the resourceSet is also not updated when rollback in RetryFailure= Transition, I also tried some refactoring, may be something like below: {code} ContainerRetryContext retryContext =3D container.containerRetryContex= t; int remainingAttempts =3D container.remainingRetryAttempts; if (container.reInitContext !=3D null) { retryContext =3D container.reInitContext.retryOnFailueContext; remainingAttempts =3D container.reInitContext.retryAttemptsRemainin= g; } if (shouldRetry(container.exitCode, retryContext,remainingAttempts)) = { // TODO state-store operation doRelaunch(container, container.remainingRetryAttempts, container.containerRetryContext.getRetryInterval()); } else if (container.canRollback()) { // rollback container.reInitContext =3D new ReInitializationContext( container.reInitContext.oldLaunchContext, container.reInitContext.oldResourceSet, null, null, container.containerRetryContext, true); new KilledExternallyForReInitTransition().transition(container, eve= nt); } else { // fail new ExitedWithFailureTransition(true).transition(container, event); return ContainerState.EXITED_WITH_FAILURE; } } public static boolean shouldRetry(int errorCode, ContainerRetryContext retryContext, int remainingRetryAttempts) { if (retryContext =3D=3D null) { return false; } ..... {code} - testContainerUpgradeRollbackDueToFailure: comment does not match code {code} // Wait for new processStartfile to be created while (!oldStartFile.exists() && timeoutSecs++ < 20) { {code} > Changes in NodeManager to support Container upgrade and rollback/commit > ----------------------------------------------------------------------- > > Key: YARN-5637 > URL: https://issues.apache.org/jira/browse/YARN-5637 > Project: Hadoop YARN > Issue Type: Sub-task > Reporter: Arun Suresh > Assignee: Arun Suresh > Attachments: YARN-5637.001.patch, YARN-5637.002.patch > > > YARN-5620 added support for re-initialization of Containers using a new l= aunch Context. > This JIRA proposes to use the above feature to support upgrade and subseq= uent rollback or commit of the upgrade. -- This message was sent by Atlassian JIRA (v6.3.4#6332) --------------------------------------------------------------------- To unsubscribe, e-mail: yarn-issues-unsubscribe@hadoop.apache.org For additional commands, e-mail: yarn-issues-help@hadoop.apache.org