hadoop-common-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "小学园PHP" <xxy-...@qq.com>
Subject 回复:RE: Put a file to Hadoop with WebHDFS ?
Date Thu, 21 Mar 2013 01:18:00 GMT
Really Thanks. It works.

------------------ 原始邮件 ------------------
发件人: "Brahma Reddy Battula"<brahmareddy.battula@huawei.com>;
发送时间: 2013年3月20日(星期三) 中午12:00
收件人: "user@hadoop.apache.org"<user@hadoop.apache.org>; 

主题: RE: Put a file to Hadoop with WebHDFS ?

 you need to give the datanode http port,Like below
 curl -i -X PUT -T /home/levi/3 "http://localhost:50075/webhdfs/v1/levi/3?op=CREATE"
 Syntax for writing file using webhdfs:
 Create and Write to a File
 • Step 1: Submit a HTTP PUT request without automatically following redirects and
 without sending the file data
  curl -i -X PUT "http://<HOST>:<PORT>/webhdfs/v1/<PATH>?op=CREATE
  Step 2: Submit another HTTP PUT request using the URL in the Location header with
 the file data to be written
  curl -i -X PUT -T <LOCAL_FILE>
 From: 小学园PHP [xxy-php@qq.com]
 Sent: Wednesday, March 20, 2013 11:32 AM
 To: user
 Subject: Put a file to Hadoop with WebHDFS ?
  When i use the WebHDFS, i wanna put a file to Hadoop. my curl command:
 curl -i -X PUT -T /home/levi/3 "http://localhost:50070/webhdfs/v1/levi/3?op=CREATE"
 But i got a return:
  HTTP/1.1 100 Continue
 Content-Type: application/octet-stream
 Content-Length: 0
 Server: Jetty(6.1.26)
 OK, it failed.
 Do somebody know what has happened?
View raw message