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 0741F200BA1 for ; Mon, 17 Oct 2016 23:41:00 +0200 (CEST) Received: by cust-asf.ponee.io (Postfix) id 05C74160AE2; Mon, 17 Oct 2016 21:41:00 +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 4E1B0160AEC for ; Mon, 17 Oct 2016 23:40:59 +0200 (CEST) Received: (qmail 38467 invoked by uid 500); 17 Oct 2016 21:40:58 -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 38445 invoked by uid 99); 17 Oct 2016 21:40:58 -0000 Received: from arcas.apache.org (HELO arcas) (140.211.11.28) by apache.org (qpsmtpd/0.29) with ESMTP; Mon, 17 Oct 2016 21:40:58 +0000 Received: from arcas.apache.org (localhost [127.0.0.1]) by arcas (Postfix) with ESMTP id 591E52C4C72 for ; Mon, 17 Oct 2016 21:40:58 +0000 (UTC) Date: Mon, 17 Oct 2016 21:40:58 +0000 (UTC) From: "Wangda Tan (JIRA)" To: yarn-issues@hadoop.apache.org Message-ID: In-Reply-To: References: Subject: [jira] [Comment Edited] (YARN-5552) Add Builder methods for common yarn API records MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 7bit X-JIRA-FingerPrint: 30527f35849b9dde25b450d4833f0394 archived-at: Mon, 17 Oct 2016 21:41:00 -0000 [ https://issues.apache.org/jira/browse/YARN-5552?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=15583572#comment-15583572 ] Wangda Tan edited comment on YARN-5552 at 10/17/16 9:40 PM: ------------------------------------------------------------ Thanks [~Tao Jie]. Few minor comments from my side: 1) New added methods of AllocateResponse should be all @Private and @Unstable, we should not mark original write-methods of AllocateResponse to @Public at the beginning, the reason is AllocateResponse should be read-only by YARN app, no YARN app should set these fields. YARN services should take care of settings these fields of AllocateResponse. 2) Can we merge common sanity check logic of ContainerRequestBuilder#build and ContainerRequest#constructor? 3) For all new added write methods of builder, it's better to add a javadocs link-to reference original method. was (Author: leftnoteasy): Thanks [~Tao Jie]. Few minor comments from my side: 1) New added methods of AllocateResponse should be all @Private and @Unstable, we should not mark original write-methods of AllocateResponse to @Public at the beginning, the reason is AllocateResponse should be read-only, no YARN app should set these fields. 2) Can we merge common sanity check logic of ContainerRequestBuilder#build and ContainerRequest#constructor? 3) For all new added write methods of builder, it's better to add a javadocs link-to reference original method. > Add Builder methods for common yarn API records > ----------------------------------------------- > > Key: YARN-5552 > URL: https://issues.apache.org/jira/browse/YARN-5552 > Project: Hadoop YARN > Issue Type: Improvement > Reporter: Arun Suresh > Assignee: Tao Jie > Attachments: YARN-5552.000.patch, YARN-5552.001.patch, YARN-5552.002.patch, YARN-5552.003.patch, YARN-5552.004.patch, YARN-5552.005.patch > > > Currently yarn API records such as ResourceRequest, AllocateRequest/Respone as well as AMRMClient.ContainerRequest have multiple constructors / newInstance methods. This makes it very difficult to add new fields to these records. > It would probably be better if we had Builder classes for many of these records, which would make evolution of these records a bit easier. > (suggested by [~kasha]) -- 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