oul*_*ekh 4 hadoop centos7 hadoop-2.7.2
我在centos 7上使用hadoop apache 2.7.1,我想通过使用webhdfs命令删除file(file1)。
curl -i -x DELETE "http://192.168.25.21:50070/webhdfs/v1/hadoophome/file1/?user.name=root&op=DELETE&recursive=true"
Run Code Online (Sandbox Code Playgroud)
但我收到此错误:
curl: (5) Could not resolve proxy: DELETE; Unknown error
Run Code Online (Sandbox Code Playgroud)
我编辑了bashrc文件,如下所示:
export http_proxy=""
export https_proxy=""
export ftp_proxy=""
Run Code Online (Sandbox Code Playgroud)
并获取文件以保存更改
source ~/.bashrc
Run Code Online (Sandbox Code Playgroud)
但是有同样的错误。
所以我试图在culr命令中没有设置代理
curl -i -x --noproxy localhost DELETE "http://192.168.25.21:50070/webhdfs/v1/hadoophome/file1/?user.name=root&op=DELETE&recursive=true"
Run Code Online (Sandbox Code Playgroud)
出现此错误:
curl: (5) Could not resolve proxy: --noproxy; Unknown error
Run Code Online (Sandbox Code Playgroud)
我应如何编辑以排除此代理?
谢谢。
-x代表代理。您应该使用它-X来指定请求方法。
所以命令是
curl -i -X DELETE "http://192.168.25.21:50070/webhdfs/v1/hadoophome/file1/?user.name=root&op=DELETE&recursive=true"
Run Code Online (Sandbox Code Playgroud)
有关选项,请参见curl(1)。
| 归档时间: |
|
| 查看次数: |
5482 次 |
| 最近记录: |