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 0BE97100DC for ; Tue, 27 Jan 2015 07:17:35 +0000 (UTC) Received: (qmail 9547 invoked by uid 500); 27 Jan 2015 07:17:35 -0000 Delivered-To: apmail-hadoop-yarn-issues-archive@hadoop.apache.org Received: (qmail 9490 invoked by uid 500); 27 Jan 2015 07:17:35 -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 9479 invoked by uid 99); 27 Jan 2015 07:17:35 -0000 Received: from arcas.apache.org (HELO arcas.apache.org) (140.211.11.28) by apache.org (qpsmtpd/0.29) with ESMTP; Tue, 27 Jan 2015 07:17:35 +0000 Date: Tue, 27 Jan 2015 07:17:35 +0000 (UTC) From: "Varun Saxena (JIRA)" To: yarn-issues@hadoop.apache.org Message-ID: In-Reply-To: References: Subject: [jira] [Commented] (YARN-3075) NodeLabelsManager implementation to retrieve label to node mapping 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-3075?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=14293090#comment-14293090 ] Varun Saxena commented on YARN-3075: ------------------------------------ [~leftnoteasy], for other review comments. bq. 2) getLabelsToNodes: When there's no NodeLabel associated with label, it's better print warn message. bq. 4) NodeLabel.getNodeIdInfo may not precise enough, rename to getAssociatedNode(Id)s? (or other name if you have) Ok. bq. 5) Also NodeLabel.getNodeIdInfo: I think we can assume NodeId will not changed (nobody calls NodeId.setHost/Port), so copy reference should be enough, agree? If yes, just return new HashSet(nodeIds). I had kept it like this because same NodeId will be shared across threads after call to CommonNodeLabelsManager#getLabelsToNodes completes. My major concern was there should be no repitition of an issue like YARN-2978 . But QueueInfo there had an underlying list. And in current code, there should be no call to setHost/Port, so we can change it like above. bq. You can use getLabelsByNode to get labels from Host-Node hierarchy. I am not sure why I added both host and nm labels in oldLabels but on the face of it, the pre-existing function can be used. Will change the code. 3) is related to this comment so getHostLabels can be removed as well. bq. 8) Add nodeId to Node to avoid loop like: Sorry didn't quite get as to what you mean by this. bq. 7) When a node/host has no label, it belongs to a special NodeLabel with key = CommonNodeLabelsManager.NO_LABEL. This is necessary because node without label can be considered as a "partition" as well. We need support it here (even if getLabelsToNode not return it now.). Support it in what sense ? > NodeLabelsManager implementation to retrieve label to node mapping > ------------------------------------------------------------------ > > Key: YARN-3075 > URL: https://issues.apache.org/jira/browse/YARN-3075 > Project: Hadoop YARN > Issue Type: Sub-task > Components: resourcemanager > Affects Versions: 2.7.0 > Reporter: Varun Saxena > Assignee: Varun Saxena > Attachments: YARN-3075.001.patch, YARN-3075.002.patch > > -- This message was sent by Atlassian JIRA (v6.3.4#6332)