How can i use the "Get File Checksum" in WebHDFS?

2013-04-22 Thread ??????PHP
When i request for "Get File Checksum" with WebHDFS, i got this:{"FileChecksum":{"algorithm":"MD5-of-0MD5-of-512CRC32","bytes":"020035b986d923acebaffa5b5c7f31c0cd00","length":28}} OK, but in the algorithm, there is MD5 and CRC32. How does this work? My client for We

Re:RES: I want to call HDFS REST api to upload a file using httplib.

2013-04-08 Thread ??????PHP
Really Thanks. But the returned URL is wrong. And the localhost is the real URL, as i tested successfully with curl using "localhost". Can anybody help me translate the curl to Python httplib? curl -i -X PUT -T "http://:/webhdfs/v1/?op=CREATE" I test it using python httplib, and receive the righ

I want to call HDFS REST api to upload a file using httplib.

2013-04-07 Thread ??????PHP
I want to call HDFS REST api to upload a file using httplib. My program created the file, but no content is in it. = Here is my code: import httplib conn=httplib.HTTPConnection("localhost:50070") conn.request("PUT","/webhdfs/v1/levi/4?op=C

Python httplib and WebHDFS

2013-03-27 Thread ??????PHP
For some reasons, i need use the Python httplib module instead of pycurl. Here is my code: import httplib import urllib params=urllib.urlencode({"@op":"CREATE","@user.name":"levi"}) headers={"Content-type": "application/x-www-form-urlencoded","Accept": "text/plain"} conn=httplib.HTTPConnection

Put file with WebHDFS, and can i put file by chunk with curl ?

2013-03-27 Thread ??????PHP
I want to put file to HDFS with curl, and more i need to put it by chunks. So, does somebody know if curl can upload file by chunk? Or ,who has work with WebHDFS by httplib? TIA Levi

?????? Put a file to HDFS with WebHDFS ?

2013-03-20 Thread ??????PHP
node.example.com:50070/tmp/motd Content-Length: 0 Server: Jetty(6.1.26) -- Good luck, Adam On Mar 19, 2013, at 11:19 PM, ken barclay wrote: > It didn't fail. If you hit the URL it returned, it will do the create. > > --- On Wed, 3/20/13, ??PHP wrote: > > From:

?????? Put a file to HDFS with WebHDFS ?

2013-03-20 Thread ??????PHP
ate. --- On Wed, 3/20/13, ??PHP wrote: From: ??PHP Subject: Put a file to HDFS with WebHDFS ? To: "user" Date: Wednesday, March 20, 2013, 3:24 AM 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:500