[ https://issues.apache.org/jira/browse/HDFS-12654?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=16327000#comment-16327000 ]
Masatake Iwasaki commented on HDFS-12654: ----------------------------------------- Hi [~Nuke], could you explain the way to reproduce the issue? I got the same result for webhdfs and httpfs when I tested this on 3.1.0-SNAPSHOT. {noformat} $ curl -X POST -T README.txt -L -i "http://localhost:9870/webhdfs/v1/tmp/README.txt?op=APPEND" HTTP/1.1 100 Continue HTTP/1.1 404 Not Found Date: Tue, 16 Jan 2018 10:41:24 GMT Cache-Control: no-cache Expires: Tue, 16 Jan 2018 10:41:24 GMT Date: Tue, 16 Jan 2018 10:41:24 GMT Pragma: no-cache X-FRAME-OPTIONS: SAMEORIGIN Content-Type: application/json Transfer-Encoding: chunked {"RemoteException":{"exception":"FileNotFoundException","javaClassName":"java.io.FileNotFoundException","message":"File /tmp/README.txt not found."}}[centos@ip-172-32-1-195 hadoop-3.1.0-SNAPSHOT]$ {noformat} {noformat} $ curl -X POST -i --header "Content-Type:application/octet-stream" --data-binary @README.txt 'http://localhost:14000/webhdfs/v1/tmp/README.txt?op=APPEND&user.name=centos&data=true' HTTP/1.1 100 Continue HTTP/1.1 404 Not Found Date: Tue, 16 Jan 2018 10:42:17 GMT Cache-Control: no-cache Expires: Tue, 16 Jan 2018 10:42:17 GMT Date: Tue, 16 Jan 2018 10:42:17 GMT Pragma: no-cache Set-Cookie: hadoop.auth="u=centos&p=centos&t=simple-dt&e=1516135337720&s=ZDSoknG+/x/a6XnGLAVUyUBs6vE="; Path=/; HttpOnly Content-Type: application/json Transfer-Encoding: chunked {"RemoteException":{"message":"Failed to append to non-existent file \/tmp\/README.txt for client 127.0.0.1","exception":"FileNotFoundException","javaClassName":"java.io.FileNotFoundException"}} {noformat} > APPEND API call is different in HTTPFS and NameNode REST > -------------------------------------------------------- > > Key: HDFS-12654 > URL: https://issues.apache.org/jira/browse/HDFS-12654 > Project: Hadoop HDFS > Issue Type: Improvement > Components: hdfs, httpfs, namenode > Affects Versions: 2.6.0, 2.7.0, 2.8.0, 3.0.0-beta1 > Reporter: Andras Czesznak > Priority: Major > > The APPEND REST API call behaves differently in the NameNode REST and the > HTTPFS codes. The NameNode version creates the target file the new data being > appended to if it does not exist at the time of the call issued. The HTTPFS > version assumes the target file exists when APPEND is called and can append > only the new data but does not create the target file it doesn't exist. > The two implementations should be standardized, preferably the HTTPFS version > should be modified to execute an implicit CREATE if the target file does not > exist. -- This message was sent by Atlassian JIRA (v7.6.3#76005) --------------------------------------------------------------------- To unsubscribe, e-mail: hdfs-issues-unsubscr...@hadoop.apache.org For additional commands, e-mail: hdfs-issues-h...@hadoop.apache.org