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 E7EF2110A7 for ; Sun, 14 Sep 2014 14:46:34 +0000 (UTC) Received: (qmail 50495 invoked by uid 500); 14 Sep 2014 14:46:34 -0000 Delivered-To: apmail-hadoop-yarn-issues-archive@hadoop.apache.org Received: (qmail 50396 invoked by uid 500); 14 Sep 2014 14:46: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 50089 invoked by uid 99); 14 Sep 2014 14:46:34 -0000 Received: from arcas.apache.org (HELO arcas.apache.org) (140.211.11.28) by apache.org (qpsmtpd/0.29) with ESMTP; Sun, 14 Sep 2014 14:46:34 +0000 Date: Sun, 14 Sep 2014 14:46:34 +0000 (UTC) From: "Naganarasimha G R (JIRA)" To: yarn-issues@hadoop.apache.org Message-ID: In-Reply-To: References: Subject: [jira] [Commented] (YARN-2546) REST API for application creation/submission is using strings for numeric & boolean values 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-2546?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=14133242#comment-14133242 ] Naganarasimha G R commented on YARN-2546: ----------------------------------------- Hi [~cdhaigh], You mean to say the REST API for is failing currently for creation / submission? > REST API for application creation/submission is using strings for numeric & boolean values > ------------------------------------------------------------------------------------------ > > Key: YARN-2546 > URL: https://issues.apache.org/jira/browse/YARN-2546 > Project: Hadoop YARN > Issue Type: Bug > Components: api > Affects Versions: 2.5.1 > Reporter: Doug Haigh > > When YARN responds with or accepts JSON, numbers & booleans are being represented as strings which can cause parsing problems. > Resource values look like > { > "application-id":"application_1404198295326_0001", > "maximum-resource-capability": > { > "memory":"8192", > "vCores":"32" > } > } > Instead of > { > "application-id":"application_1404198295326_0001", > "maximum-resource-capability": > { > "memory":8192, > "vCores":32 > } > } > When I POST to start a job, numeric values are represented as numbers: > "local-resources": > { > "entry": > [ > { > "key":"AppMaster.jar", > "value": > { > "resource":"hdfs://hdfs-namenode:9000/user/testuser/DistributedShell/demo-app/AppMaster.jar", > "type":"FILE", > "visibility":"APPLICATION", > "size": "43004", > "timestamp": "1405452071209" > } > } > ] > }, > Instead of > "local-resources": > { > "entry": > [ > { > "key":"AppMaster.jar", > "value": > { > "resource":"hdfs://hdfs-namenode:9000/user/testuser/DistributedShell/demo-app/AppMaster.jar", > "type":"FILE", > "visibility":"APPLICATION", > "size": 43004, > "timestamp": 1405452071209 > } > } > ] > }, > Similarly, Boolean values are also represented as strings: > "keep-containers-across-application-attempts":"false" > Instead of > "keep-containers-across-application-attempts":false -- This message was sent by Atlassian JIRA (v6.3.4#6332)