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 772BDCC7F for ; Fri, 1 Nov 2013 15:46:58 +0000 (UTC) Received: (qmail 98269 invoked by uid 500); 1 Nov 2013 15:45:45 -0000 Delivered-To: apmail-hadoop-yarn-issues-archive@hadoop.apache.org Received: (qmail 98073 invoked by uid 500); 1 Nov 2013 15:45:30 -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 97980 invoked by uid 99); 1 Nov 2013 15:45:23 -0000 Received: from arcas.apache.org (HELO arcas.apache.org) (140.211.11.28) by apache.org (qpsmtpd/0.29) with ESMTP; Fri, 01 Nov 2013 15:45:23 +0000 Date: Fri, 1 Nov 2013 15:45:23 +0000 (UTC) From: "Zhijie Shen (JIRA)" To: yarn-issues@hadoop.apache.org Message-ID: In-Reply-To: References: Subject: [jira] [Commented] (YARN-1123) [YARN-321] Adding ContainerReport and Protobuf implementation 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-1123?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=13811372#comment-13811372 ] Zhijie Shen commented on YARN-1123: ----------------------------------- The patch is almost good with some minor issues to address: * The javadoc of ContainerReport needs to be updated * ContainerReport class needs to be annotated as well * "this != null" is a bug. In addition, it's better to move "ContainerReportProtoOrBuilder p = viaProto ? proto : builder;" after "if{}" block, as it may not need to be executed. Same for the following getters. {code} + @Override + public Resource getAllocatedResource() { + ContainerReportProtoOrBuilder p = viaProto ? proto : builder; + if (this != null) { + return this.resource; + } + if (!p.hasResource()) { + return null; + } + this.resource = convertFromProtoFormat(p.getResource()); + return this.resource; + } {code} BTW, this patch should be clean to be directly applied to trunk. it seems to be unrelated that Jenkins failed to compile. We'd better kick another round of Jenkins test. > [YARN-321] Adding ContainerReport and Protobuf implementation > ------------------------------------------------------------- > > Key: YARN-1123 > URL: https://issues.apache.org/jira/browse/YARN-1123 > Project: Hadoop YARN > Issue Type: Sub-task > Reporter: Zhijie Shen > Assignee: Mayank Bansal > Attachments: YARN-1123-1.patch, YARN-1123-2.patch, YARN-1123-3.patch, YARN-1123-4.patch > > > Like YARN-978, we need some client-oriented class to expose the container history info. Neither Container nor RMContainer is the right one. -- This message was sent by Atlassian JIRA (v6.1#6144)