I created a HBase table via Java API and added data via a Put. I can also read the data in Java with a corresponding Get. The HBase documentation says that a cell value also can be read by using a GET request e.g. in browser, see documentation.
The following request works for me, which returns the whole row:
http://my_hbase_url:12345/dm-table/exampleRow/family:html?v=1
The result is an xml and looks following:
<CellSet>
<Row key="ZXhhbXBsZVJvdw==">
<Cell column="ZmFtaWx5Omh0bWw=" timestamp="1466667016879">PGh0bWw+Li4uTXkgSFRNTC4uLjwvaHRtbD4=</Cell>
</Row>
</CellSet>
If you have a look at the timestamp it is 1466667016879
, but when I call
http://my_hbase_url:12345/dm-table/exampleRow/family:html/1466667016879
I get a not found
result! Also the Java code works and gives me this timestamp:
HTable table = new HTable(config, TABLE_NAME.getBytes());
Get g = new Get("exampleRow".getBytes());
g.setTimeStamp(1466667016879L);
Result r = table.get(g);
System.out.println("Timestamp: " + r.rawCells()[0].getTimestamp());
byte[] value = r.getValue(CF_DEFAULT.getBytes(), "html".getBytes());
String valueStr = new String(value);
System.out.println("GET: " + valueStr);
this prints:
Timestamp: 1466667016879
GET: <html>...My HTML...</html>
So timestamp does exist, but the http GET request won't work with the timestamp, can someone help?
family:html
. Is it for HBase 2.0 only? – Whitefret