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 B386D17507 for ; Wed, 22 Oct 2014 00:23:34 +0000 (UTC) Received: (qmail 92501 invoked by uid 500); 22 Oct 2014 00:23:34 -0000 Delivered-To: apmail-hadoop-yarn-issues-archive@hadoop.apache.org Received: (qmail 92398 invoked by uid 500); 22 Oct 2014 00:23:34 -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 92066 invoked by uid 99); 22 Oct 2014 00:23:34 -0000 Received: from arcas.apache.org (HELO arcas.apache.org) (140.211.11.28) by apache.org (qpsmtpd/0.29) with ESMTP; Wed, 22 Oct 2014 00:23:34 +0000 Date: Wed, 22 Oct 2014 00:23:34 +0000 (UTC) From: "Phil D'Amore (JIRA)" To: yarn-issues@hadoop.apache.org Message-ID: In-Reply-To: References: Subject: [jira] [Created] (YARN-2723) rmadmin -replaceLabelsOnNode does not correctly parse port MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 7bit X-JIRA-FingerPrint: 30527f35849b9dde25b450d4833f0394 Phil D'Amore created YARN-2723: ---------------------------------- Summary: rmadmin -replaceLabelsOnNode does not correctly parse port Key: YARN-2723 URL: https://issues.apache.org/jira/browse/YARN-2723 Project: Hadoop YARN Issue Type: Bug Components: client Reporter: Phil D'Amore There is an off-by-one issue in RMAdminCLI.java (line 457): port = Integer.valueOf(nodeIdStr.substring(nodeIdStr.indexOf(":"))); should probably be: port = Integer.valueOf(nodeIdStr.substring(nodeIdStr.indexOf(":")+1)); Currently attempting to add a label to a node with a port specified looks like this: [yarn@ip-10-0-0-66 ~]$ yarn rmadmin -replaceLabelsOnNode node.example.com:45454,test-label replaceLabelsOnNode: For input string: ":45454" Usage: yarn rmadmin [-replaceLabelsOnNode [node1:port,label1,label2 node2:port,label1,label2]] It appears to be trying to parse the ':' as part of the integer because the substring index is off. -- This message was sent by Atlassian JIRA (v6.3.4#6332)