Return-Path: X-Original-To: apmail-hadoop-hdfs-issues-archive@minotaur.apache.org Delivered-To: apmail-hadoop-hdfs-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 6E24D9F57 for ; Mon, 17 Oct 2011 20:53:34 +0000 (UTC) Received: (qmail 60408 invoked by uid 500); 17 Oct 2011 20:53:34 -0000 Delivered-To: apmail-hadoop-hdfs-issues-archive@hadoop.apache.org Received: (qmail 60376 invoked by uid 500); 17 Oct 2011 20:53:34 -0000 Mailing-List: contact hdfs-issues-help@hadoop.apache.org; run by ezmlm Precedence: bulk List-Help: List-Unsubscribe: List-Post: List-Id: Reply-To: hdfs-issues@hadoop.apache.org Delivered-To: mailing list hdfs-issues@hadoop.apache.org Received: (qmail 60368 invoked by uid 99); 17 Oct 2011 20:53:34 -0000 Received: from nike.apache.org (HELO nike.apache.org) (192.87.106.230) by apache.org (qpsmtpd/0.29) with ESMTP; Mon, 17 Oct 2011 20:53:34 +0000 X-ASF-Spam-Status: No, hits=-2000.5 required=5.0 tests=ALL_TRUSTED,RP_MATCHES_RCVD X-Spam-Check-By: apache.org Received: from [140.211.11.116] (HELO hel.zones.apache.org) (140.211.11.116) by apache.org (qpsmtpd/0.29) with ESMTP; Mon, 17 Oct 2011 20:53:31 +0000 Received: from hel.zones.apache.org (hel.zones.apache.org [140.211.11.116]) by hel.zones.apache.org (Postfix) with ESMTP id E9A0830D6DB for ; Mon, 17 Oct 2011 20:53:10 +0000 (UTC) Date: Mon, 17 Oct 2011 20:53:10 +0000 (UTC) From: "Arpit Gupta (Commented) (JIRA)" To: hdfs-issues@hadoop.apache.org Message-ID: <1102734857.2085.1318884790958.JavaMail.tomcat@hel.zones.apache.org> In-Reply-To: <384058803.2044.1318884552083.JavaMail.tomcat@hel.zones.apache.org> Subject: [jira] [Commented] (HDFS-2458) webhdfs create call throws an error after the redirect if the file exists, we should throw a 403 before MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: quoted-printable X-JIRA-FingerPrint: 30527f35849b9dde25b450d4833f0394 X-Virus-Checked: Checked by ClamAV on apache.org [ https://issues.apache.org/jira/browse/HDFS-2458?page=3Dcom.atlassian.= jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=3D13129= 180#comment-13129180 ]=20 Arpit Gupta commented on HDFS-2458: ----------------------------------- Issue a create call using rest api's for a file that exists. Actual 1. received a 307 and on the redirected call received a 403 with the message {"RemoteException":{"exception":"RemoteException","javaClassName":"org.apac= he.hadoop.ipc.RemoteException","message":"java.io.IOException: failed to cr= eate file /tmp/webhdfs_data/file_that_exists.txt on client 127.0.0.1 either= because the filename is invalid or the file exists\n\tat org.apache.hadoop= .hdfs.server.namenode.FSNamesystem.startFileInternal(FSNamesystem.java:1237= )\n\tat org.apache.hadoop.hdfs.server.namenode.FSNamesystem.startFile(FSNam= esystem.java:1166)\n\tat org.apache.hadoop.hdfs.server.namenode.NameNode.cr= eate(NameNode.java:617)\n\tat sun.reflect.GeneratedMethodAccessor11.invoke(= Unknown Source)\n\tat sun.reflect.DelegatingMethodAccessorImpl.invoke(Deleg= atingMethodAccessorImpl.java:25)\n\tat java.lang.reflect.Method.invoke(Meth= od.java:597)\n\tat org.apache.hadoop.ipc.RPC$Server.call(RPC.java:563)\n\ta= t org.apache.hadoop.ipc.Server$Handler$1.run(Server.java:1388)\n\tat org.ap= ache.hadoop.ipc.Server$Handler$1.run(Server.java:1384)\n\tat java.security.= AccessController.doPrivileged(Native Method)\n\tat javax.security.auth.Subj= ect.doAs(Subject.java:396)\n\tat org.apache.hadoop.security.UserGroupInform= ation.doAs(UserGroupInformation.java:1059)\n\tat org.apache.hadoop.ipc.Serv= er$Handler.run(Server.java:1382)\n"}} If an error is going to be thrown in the create or append calls we should t= hrow it before the redirect if possible. =20 > webhdfs create call throws an error after the redirect if the file exists= , we should throw a 403 before > -------------------------------------------------------------------------= ------------------------------ > > Key: HDFS-2458 > URL: https://issues.apache.org/jira/browse/HDFS-2458 > Project: Hadoop HDFS > Issue Type: Bug > Affects Versions: 0.20.205.0 > Reporter: Arpit Gupta > Assignee: Tsz Wo (Nicholas), SZE > -- This message is automatically generated by JIRA. If you think it was sent incorrectly, please contact your JIRA administrato= rs: https://issues.apache.org/jira/secure/ContactAdministrators!default.jsp= a For more information on JIRA, see: http://www.atlassian.com/software/jira