hbase-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Terry Siu <Terry....@datasphere.com>
Subject Retrieving scanner URL via REST (Stargate)
Date Fri, 17 Jun 2011 23:40:22 GMT
I'm having difficulty figuring out why I am unable to a get a scanner URL programmatically
via the org.apache.hadoop.hbase.rest.client.Client. I followed the instructions on the Stargate
wiki by starting up a jetty servlet container and verified a few GET operations which succeeded.
I then executed the following at the command line:

curl -H "Content-Type: text/xml" -d '<Scanner batch="100"/>' http://localhost:8080/Property/scanner

which properly returned me the expected 201 code and the location URL for the scanner. However,
when I tried to duplicate the above 'curl' in Java, I keep receiving a HTTP 400 code. Here's
my code to issue the scanner request:

                                Cluster cluster = new Cluster();
                                cluster.add( "localhost", 8080 );

                                Client client = new Client( cluster );

                                Response resp = client.put( "/Property/scanner", "text/xml",
                                                                "<Scanner batch=\"100\">".getBytes()

                                System.out.println( resp.getCode() );

Only the header "Content-Length" appears, the location value is null, and my response body
is empty. Is there anything glaringly obvious that I'm doing wrong. Don't think this matters,
but I'm running in pseudo-distributed mode off of trunk (as I'm also playing with coprocessors).


  • Unnamed multipart/alternative (inline, None, 0 bytes)
View raw message