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 31E7A200BDB for ; Mon, 12 Dec 2016 17:28:00 +0100 (CET) Received: by cust-asf.ponee.io (Postfix) id 30B78160B1A; Mon, 12 Dec 2016 16:28:00 +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 7F39A160B2A for ; Mon, 12 Dec 2016 17:27:59 +0100 (CET) Received: (qmail 55413 invoked by uid 500); 12 Dec 2016 16:27:58 -0000 Mailing-List: contact hdfs-issues-help@hadoop.apache.org; run by ezmlm Precedence: bulk List-Help: List-Unsubscribe: List-Post: List-Id: Delivered-To: mailing list hdfs-issues@hadoop.apache.org Received: (qmail 55341 invoked by uid 99); 12 Dec 2016 16:27:58 -0000 Received: from arcas.apache.org (HELO arcas) (140.211.11.28) by apache.org (qpsmtpd/0.29) with ESMTP; Mon, 12 Dec 2016 16:27:58 +0000 Received: from arcas.apache.org (localhost [127.0.0.1]) by arcas (Postfix) with ESMTP id 738DF2C03E3 for ; Mon, 12 Dec 2016 16:27:58 +0000 (UTC) Date: Mon, 12 Dec 2016 16:27:58 +0000 (UTC) From: "John Zhuge (JIRA)" To: hdfs-issues@hadoop.apache.org Message-ID: In-Reply-To: References: Subject: [jira] [Updated] (HDFS-10684) WebHDFS DataNode calls fail without parameter createparent MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 7bit X-JIRA-FingerPrint: 30527f35849b9dde25b450d4833f0394 archived-at: Mon, 12 Dec 2016 16:28:00 -0000 [ https://issues.apache.org/jira/browse/HDFS-10684?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ] John Zhuge updated HDFS-10684: ------------------------------ Attachment: HDFS-10684.004.patch Patch 004: * Move added tests into a new method {{testDatanodeCreateMissingParameter}} to avoid checkstyle error > WebHDFS DataNode calls fail without parameter createparent > ---------------------------------------------------------- > > Key: HDFS-10684 > URL: https://issues.apache.org/jira/browse/HDFS-10684 > Project: Hadoop HDFS > Issue Type: Bug > Components: webhdfs > Affects Versions: 2.7.1 > Reporter: Samuel Low > Assignee: John Zhuge > Priority: Blocker > Labels: compatibility, webhdfs > Attachments: HDFS-10684.001-branch-2.patch, HDFS-10684.002-branch-2.patch, HDFS-10684.003.patch, HDFS-10684.004.patch > > > Optional boolean parameters that are not provided in the URL cause the WebHDFS create file command to fail. > curl -i -X PUT "http://hadoop-primarynamenode:50070/webhdfs/v1/tmp/test1234?op=CREATE&overwrite=false" > Response: > HTTP/1.1 307 TEMPORARY_REDIRECT > Cache-Control: no-cache > Expires: Fri, 15 Jul 2016 04:10:13 GMT > Date: Fri, 15 Jul 2016 04:10:13 GMT > Pragma: no-cache > Expires: Fri, 15 Jul 2016 04:10:13 GMT > Date: Fri, 15 Jul 2016 04:10:13 GMT > Pragma: no-cache > Content-Type: application/octet-stream > Location: http://hadoop-datanode1:50075/webhdfs/v1/tmp/test1234?op=CREATE&namenoderpcaddress=hadoop-primarynamenode:8020&overwrite=false > Content-Length: 0 > Server: Jetty(6.1.26) > Following the redirect: > curl -i -X PUT -T MYFILE "http://hadoop-datanode1:50075/webhdfs/v1/tmp/test1234?op=CREATE&namenoderpcaddress=hadoop-primarynamenode:8020&overwrite=false" > Response: > HTTP/1.1 100 Continue > HTTP/1.1 400 Bad Request > Content-Type: application/json; charset=utf-8 > Content-Length: 162 > Connection: close > {"RemoteException":{"exception":"IllegalArgumentException","javaClassName":"java.lang.IllegalArgumentException","message":"Failed to parse \"null\" to Boolean."}} > The problem can be circumvented by providing both "createparent" and "overwrite" parameters. > However, this is not possible when I have no control over the WebHDFS calls, e.g. Ambari and Hue have errors due to this. -- This message was sent by Atlassian JIRA (v6.3.4#6332) --------------------------------------------------------------------- To unsubscribe, e-mail: hdfs-issues-unsubscribe@hadoop.apache.org For additional commands, e-mail: hdfs-issues-help@hadoop.apache.org