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 801D210FDD for ; Thu, 7 Nov 2013 23:35:19 +0000 (UTC) Received: (qmail 31814 invoked by uid 500); 7 Nov 2013 23:35:19 -0000 Delivered-To: apmail-hadoop-yarn-issues-archive@hadoop.apache.org Received: (qmail 31784 invoked by uid 500); 7 Nov 2013 23:35:19 -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 31747 invoked by uid 99); 7 Nov 2013 23:35:19 -0000 Received: from arcas.apache.org (HELO arcas.apache.org) (140.211.11.28) by apache.org (qpsmtpd/0.29) with ESMTP; Thu, 07 Nov 2013 23:35:19 +0000 Date: Thu, 7 Nov 2013 23:35:19 +0000 (UTC) From: "Chen He (JIRA)" To: yarn-issues@hadoop.apache.org Message-ID: In-Reply-To: References: Subject: [jira] [Commented] (YARN-691) Invalid NaN values in Hadoop REST API JSON response 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-691?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=13816792#comment-13816792 ] Chen He commented on YARN-691: ------------------------------ Please assign to me ! > Invalid NaN values in Hadoop REST API JSON response > --------------------------------------------------- > > Key: YARN-691 > URL: https://issues.apache.org/jira/browse/YARN-691 > Project: Hadoop YARN > Issue Type: Bug > Components: resourcemanager > Affects Versions: 0.23.6, 2.0.4-alpha > Reporter: Kendall Thrapp > > I've been occasionally coming across instances where Hadoop's Cluster Applications REST API (http://hadoop.apache.org/docs/r0.23.6/hadoop-yarn/hadoop-yarn-site/ResourceManagerRest.html#Cluster_Applications_API) has returned JSON that PHP's json_decode function failed to parse. I've tracked the syntax error down to the presence of the unquoted word NaN appearing as a value in the JSON. For example: > "progress":NaN, > NaN is not part of the JSON spec, so its presence renders the whole JSON string invalid. Hadoop needs to return something other than NaN in this case -- perhaps an empty string or the quoted string "NaN". -- This message was sent by Atlassian JIRA (v6.1#6144)