-Re: Examples of Multi Get and Multi Put using Stargate (JSON)
Vandana Ayyalasomayajula 2013-05-14, 18:00
Thanks Suraj for the pointer.
I have the following in my data file:
and there seem to no examples of multi-put anywhere. I searched the code for unit tests and there seem to be none.
On May 14, 2013, at 10:15 AM, Suraj Varma wrote:
> *Moving your post to user mailing list.*
> Here are more examples: http://wiki.apache.org/hadoop/Hbase/HbaseRest
> For your curl calls, escape your ampersands, else it is interpreted by your
> shell as a command to run in the background.
> curl -v -H "Accept: application/json"
> For your PUT call, usually this error is thrown if your file contents don't
> match your Content-Type. Check again if your file is indeed formatted
> correctly. From the HbaseRest link above:
> - HTTP 200 (OK) if the column(s) could successfully be saved. HTTP 415
> (Unsupported Media Type) if the query string column options do not match
> the Content-type header, or if the binary data of either octet-stream or
> Multipart/related is unreadable
> On Tue, May 14, 2013 at 9:04 AM, Vandana Ayyalasomayajula <
> [EMAIL PROTECTED]> wrote:
>> Hi All,
>> I am trying to find some examples involving multi-get and multi-put using
>> stargate but couldn't get any.
>> I am following this page:
>> For multi-put, I tried the following:
>> curl -v -X PUT -H "Accept: application/json"
>> http://hostname:9999/testjson/false-row-key --data @./data.txt
>> * About to connect() to hostname port 9999 (#0)
>> * Trying 188.8.131.52... connected
>> * Connected to hostname (184.108.40.206) port 9999 (#0)
>>> PUT /testjson/row3 HTTP/1.1
>>> User-Agent: curl/7.21.4 (universal-apple-darwin11.0) libcurl/7.21.4
>> OpenSSL/0.9.8r zlib/1.2.5
>>> Host: hostname:9999
>>> Accept: application/json
>>> Content-Length: 271
>>> Content-Type: application/x-www-form-urlencoded
>> < HTTP/1.1 415 Unsupported Media Type
>> < Content-Length: 0
>> * Connection #0 to host hostname left intact
>> * Closing connection #0
>> For multi-get I tried the following:
>> curl -v -H "Accept: application/json"
>> The above command only returns the first row.
>> If somebody has used the above operations successfully using REST, it
>> would be of great help to
>> share the details.