Values and column names are expected to be Base64 encoded. - Andy
________________________________ From: Adam Silberstein <[email protected]> To: [email protected] Sent: Wednesday, July 29, 2009 1:27:19 PM Subject: rest calls using libcurl Hi, I'm writing my own C++ client for Hbase by making rest calls with libcurl. I have simple set and get working, but have some minor problems that I'm stuck on. One problem is that when I do a put with libcurl and then do a get of the record with the HBase Shell, the record's value is a series of back-slashed characters...e.g \357\277\275... The second problem is that when I do a get using libcurl, the value field is always cutoff by a couple of characters. The column name, which should have been "f1:c1" also appears as something seemingly random: ZjE6YzE= I'm guessing I'm doing something wrong with my curl http headers, or something like that. My curl calls and results are below. If anyone has any suggestions, that would be great. Thanks! Adam PUT: POST /api/t2/row/r8?column=f1:c1 HTTP/1.1 Host: *****:5555 Pragma: no-cache Accept: */* Content-Type: text/xml;charest=UTF-8 Content-Length: 97 <?xml version="1.0" encoding="UTF-8"?><column><name>f1:c1</name><value>123456789</value></co lumn> GET: GET /api/t2/row/r8 HTTP/1.1 Host: *****:5555 Pragma: no-cache Accept: */* Content-Type: text/xml;charest=UTF-8 RESULT FROM GET: <?xml version="1.0" encoding="UTF-8"?> <row> <count> 1 </count> <column> <name> ZjE6YzE= </name> <value> 12345678 </value> <timestamp> 1248898993641 </timestamp> </column> </row> RESULT FROM GET IN SHELL: hbase(main):001:0> get 't2', 'r8' COLUMN CELL f1:c1 timestamp=1248898993641, value=\357\277\275m\357\277\275
