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 4AC59200B36 for ; Wed, 6 Jul 2016 21:40:13 +0200 (CEST) Received: by cust-asf.ponee.io (Postfix) id 494E1160A55; Wed, 6 Jul 2016 19:40:13 +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 8FACD160A73 for ; Wed, 6 Jul 2016 21:40:12 +0200 (CEST) Received: (qmail 86867 invoked by uid 500); 6 Jul 2016 19:40:11 -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 86834 invoked by uid 99); 6 Jul 2016 19:40:11 -0000 Received: from arcas.apache.org (HELO arcas) (140.211.11.28) by apache.org (qpsmtpd/0.29) with ESMTP; Wed, 06 Jul 2016 19:40:11 +0000 Received: from arcas.apache.org (localhost [127.0.0.1]) by arcas (Postfix) with ESMTP id 199FD2C02AD for ; Wed, 6 Jul 2016 19:40:11 +0000 (UTC) Date: Wed, 6 Jul 2016 19:40:11 +0000 (UTC) From: "Varun Saxena (JIRA)" To: yarn-issues@hadoop.apache.org Message-ID: In-Reply-To: References: Subject: [jira] [Comment Edited] (YARN-5302) Yarn Application log Aggreagation fails due to NM can not get correct HDFS delegation token II MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 7bit X-JIRA-FingerPrint: 30527f35849b9dde25b450d4833f0394 archived-at: Wed, 06 Jul 2016 19:40:13 -0000 [ https://issues.apache.org/jira/browse/YARN-5302?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=15364953#comment-15364953 ] Varun Saxena edited comment on YARN-5302 at 7/6/16 7:39 PM: ------------------------------------------------------------ I think changes here will be required irrespective of YARN-5175. Delaying creating folders(done inside initAppAggregator) is a better solution IMO because this takes care of the case where NM is shut down while updating the token in state store. Maybe we can store the apps for which initialization failed due to invalid token somewhere(maybe in NMContext) and process them on next HB. was (Author: varun_saxena): I think changes here will be required irrespective of YARN-5175. Delaying creating folders(done inside initAppAggregator) is a better solution IMO because this takes care of the case where NM is shut down while updating the token in state store. Maybe we can store the apps for which initialization failed due to invalid token somewhere(maybe in NMContext) and process them on next HB. > Yarn Application log Aggreagation fails due to NM can not get correct HDFS delegation token II > ---------------------------------------------------------------------------------------------- > > Key: YARN-5302 > URL: https://issues.apache.org/jira/browse/YARN-5302 > Project: Hadoop YARN > Issue Type: Bug > Components: yarn > Reporter: Xianyin Xin > Assignee: Xianyin Xin > Attachments: YARN-5032.001.patch, YARN-5032.002.patch, YARN-5302.003.patch, YARN-5302.004.patch > > > Different with YARN-5098, this happens at NM side. When NM recovers, credentials are read from NMStateStore. When initialize app aggregators, exception happens because of the overdue tokens. The app is a long running service. > {code:title=LogAggregationService.java} > protected void initAppAggregator(final ApplicationId appId, String user, > Credentials credentials, ContainerLogsRetentionPolicy logRetentionPolicy, > Map appAcls, > LogAggregationContext logAggregationContext) { > // Get user's FileSystem credentials > final UserGroupInformation userUgi = > UserGroupInformation.createRemoteUser(user); > if (credentials != null) { > userUgi.addCredentials(credentials); > } > ... > try { > // Create the app dir > createAppDir(user, appId, userUgi); > } catch (Exception e) { > appLogAggregator.disableLogAggregation(); > if (!(e instanceof YarnRuntimeException)) { > appDirException = new YarnRuntimeException(e); > } else { > appDirException = (YarnRuntimeException)e; > } > appLogAggregators.remove(appId); > closeFileSystems(userUgi); > throw appDirException; > } > {code} -- 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