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 B56C2200D2E for ; Tue, 31 Oct 2017 15:10:05 +0100 (CET) Received: by cust-asf.ponee.io (Postfix) id B3FE1160BF9; Tue, 31 Oct 2017 14:10:05 +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 0CC271609EB for ; Tue, 31 Oct 2017 15:10:04 +0100 (CET) Received: (qmail 42334 invoked by uid 500); 31 Oct 2017 14:10:04 -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 42323 invoked by uid 99); 31 Oct 2017 14:10:04 -0000 Received: from pnap-us-west-generic-nat.apache.org (HELO spamd3-us-west.apache.org) (209.188.14.142) by apache.org (qpsmtpd/0.29) with ESMTP; Tue, 31 Oct 2017 14:10:04 +0000 Received: from localhost (localhost [127.0.0.1]) by spamd3-us-west.apache.org (ASF Mail Server at spamd3-us-west.apache.org) with ESMTP id 4E33A18440B for ; Tue, 31 Oct 2017 14:10:03 +0000 (UTC) X-Virus-Scanned: Debian amavisd-new at spamd3-us-west.apache.org X-Spam-Flag: NO X-Spam-Score: -99.202 X-Spam-Level: X-Spam-Status: No, score=-99.202 tagged_above=-999 required=6.31 tests=[KAM_ASCII_DIVIDERS=0.8, RP_MATCHES_RCVD=-0.001, SPF_PASS=-0.001, USER_IN_WHITELIST=-100] autolearn=disabled Received: from mx1-lw-eu.apache.org ([10.40.0.8]) by localhost (spamd3-us-west.apache.org [10.40.0.10]) (amavisd-new, port 10024) with ESMTP id CGfpwgB3lcMB for ; Tue, 31 Oct 2017 14:10:02 +0000 (UTC) Received: from mailrelay1-us-west.apache.org (mailrelay1-us-west.apache.org [209.188.14.139]) by mx1-lw-eu.apache.org (ASF Mail Server at mx1-lw-eu.apache.org) with ESMTP id B570860F4A for ; Tue, 31 Oct 2017 14:10:01 +0000 (UTC) Received: from jira-lw-us.apache.org (unknown [207.244.88.139]) by mailrelay1-us-west.apache.org (ASF Mail Server at mailrelay1-us-west.apache.org) with ESMTP id 05E3FE0662 for ; Tue, 31 Oct 2017 14:10:01 +0000 (UTC) Received: from jira-lw-us.apache.org (localhost [127.0.0.1]) by jira-lw-us.apache.org (ASF Mail Server at jira-lw-us.apache.org) with ESMTP id B247B212F9 for ; Tue, 31 Oct 2017 14:10:00 +0000 (UTC) Date: Tue, 31 Oct 2017 14:10:00 +0000 (UTC) From: "Sunil G (JIRA)" To: yarn-issues@hadoop.apache.org Message-ID: In-Reply-To: References: Subject: [jira] [Commented] (YARN-7119) yarn rmadmin -updateNodeResource should be updated for resource types MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 7bit X-JIRA-FingerPrint: 30527f35849b9dde25b450d4833f0394 archived-at: Tue, 31 Oct 2017 14:10:05 -0000 [ https://issues.apache.org/jira/browse/YARN-7119?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=16226845#comment-16226845 ] Sunil G commented on YARN-7119: ------------------------------- Thanks [~manirajv06@gmail.com]. Few comments # In {{parseResourceValue}}, we could avoid {{boolean alphabet}}. Here {{String units = resourceValue.substring(i);}}, units will be "" when there are no alphabets. # In {{isMandatoryResourcesAvailable}}, please use full variable names as possible. like resource, memoryResourceInformation etc. # {{Long value = memRI.getValue();}} could use primitive types # In {{parseCommandAndCreateResource}}, trim the parsed values # resourceTypesArr -> resourceTypesArray # Currently from cli, {code} ResourceInformation ri = ResourceInformation.newInstance(resName, ResourceUtils.getUnits(resValue), ResourceUtils.getValue(resValue)); {code} there are two calls to ResourceUtils to get units and value separate. So optimization done in ResourceUtils doesnt have impact. I think we could expect a String array from ResourceUtils and then use it in caller. Otherwise we have to fall into getUnits and getValue as separate logic itself for simplicity. # In test case {{teardown}}, wrong file is deleted. its not resource-types-4.xml # In testUpdateNodeResourceTypesWithoutMandatoryResources, could we confirm whether resource in memory is updated as MB in server # Please add some more comments in {{handleRefreshNodes}} to mention which all possible combination of resources are handled. This will help to understand below segment code faster {code} 937 } else if( (args.length == 3 && !args[2].contains("=") && 938 pattern.matcher(args[2]).matches()) || 939 (args.length == 4 && !args[2].contains("=") && 940 pattern.matcher(args[2]).matches()) ) { {code} > yarn rmadmin -updateNodeResource should be updated for resource types > --------------------------------------------------------------------- > > Key: YARN-7119 > URL: https://issues.apache.org/jira/browse/YARN-7119 > Project: Hadoop YARN > Issue Type: Sub-task > Components: nodemanager, resourcemanager > Affects Versions: YARN-3926 > Reporter: Daniel Templeton > Assignee: Manikandan R > Attachments: YARN-7119.001.patch, YARN-7119.002.patch, YARN-7119.002.patch > > -- This message was sent by Atlassian JIRA (v6.4.14#64029) --------------------------------------------------------------------- To unsubscribe, e-mail: yarn-issues-unsubscribe@hadoop.apache.org For additional commands, e-mail: yarn-issues-help@hadoop.apache.org