You are viewing a plain text version of this content. The canonical link for it is here.
Posted to hdfs-issues@hadoop.apache.org by "bianqi (Jira)" <ji...@apache.org> on 2020/05/26 03:44:00 UTC
[jira] [Updated] (HDFS-15376) Fix POST and PUT errors in httpfs
documentation
[ https://issues.apache.org/jira/browse/HDFS-15376?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]
bianqi updated HDFS-15376:
--------------------------
Description:
In the official Hadoop documentation, there is an exception when executing the following command.
{quote} {{curl -X POST 'http://httpfs-host:14000/webhdfs/v1/user/foo/bar?op=MKDIRS&user.name=foo'}} creates the HDFS {{/user/foo/bar}} directory.
{quote}
Command line returns results:
{quote} *{"RemoteException":{"message":"Invalid HTTP POST operation [MKDIRS]","exception":"IOException","javaClassName":"java.io.IOException"}}*
{quote}
I checked the source code and found that the way to create the file should use PUT to submit the form.
I modified to execute the command in PUT mode and got the result as follows
{quote} {{curl -X POST 'http://httpfs-host:14000/webhdfs/v1/user/foo/bar?op=MKDIRS&user.name=foo'}} creates the HDFS {{/user/foo/bar}} directory.
{quote}
Command line returns results:
{quote}{"boolean":true}
{quote}
At the same time the folder is created successfully.
was:
In the official Hadoop documentation, there is an exception when executing the following command.
{quote} {{curl -X POST 'http://httpfs-host:14000/webhdfs/v1/user/foo/bar?op=MKDIRS&user.name=foo'}} creates the HDFS {{/user/foo/bar}} directory.
{quote}
Command line returns results:
{quote} *{"RemoteException":{"message":"Invalid HTTP POST operation [MKDIRS]","exception":"IOException","javaClassName":"java.io.IOException"}}*
{quote}
I checked the source code and found that the way to create the file should use PUT to submit the form.
I modified to execute the command in PUT mode and got the result as follows
{quote} {{curl -X POST 'http://httpfs-host:14000/webhdfs/v1/user/foo/bar?op=MKDIRS&user.name=foo'}} creates the HDFS {{/user/foo/bar}} directory.
{quote}
Command line returns results:
{quote}*{"boolean":true}*
{quote}
At the same time the folder is created successfully.
> Fix POST and PUT errors in httpfs documentation
> -----------------------------------------------
>
> Key: HDFS-15376
> URL: https://issues.apache.org/jira/browse/HDFS-15376
> Project: Hadoop HDFS
> Issue Type: Improvement
> Components: httpfs
> Affects Versions: 3.2.1
> Reporter: bianqi
> Assignee: bianqi
> Priority: Major
>
> In the official Hadoop documentation, there is an exception when executing the following command.
> {quote} {{curl -X POST 'http://httpfs-host:14000/webhdfs/v1/user/foo/bar?op=MKDIRS&user.name=foo'}} creates the HDFS {{/user/foo/bar}} directory.
> {quote}
> Command line returns results:
> {quote} *{"RemoteException":{"message":"Invalid HTTP POST operation [MKDIRS]","exception":"IOException","javaClassName":"java.io.IOException"}}*
> {quote}
>
> I checked the source code and found that the way to create the file should use PUT to submit the form.
> I modified to execute the command in PUT mode and got the result as follows
> {quote} {{curl -X POST 'http://httpfs-host:14000/webhdfs/v1/user/foo/bar?op=MKDIRS&user.name=foo'}} creates the HDFS {{/user/foo/bar}} directory.
> {quote}
> Command line returns results:
> {quote}{"boolean":true}
> {quote}
> At the same time the folder is created successfully.
--
This message was sent by Atlassian Jira
(v8.3.4#803005)
---------------------------------------------------------------------
To unsubscribe, e-mail: hdfs-issues-unsubscribe@hadoop.apache.org
For additional commands, e-mail: hdfs-issues-help@hadoop.apache.org