I am planning to store streaming weather data in HBase. My rowkey is: [5 letter city code][timestamp] where timestamp is [date][time as in HH:mm:ss.SSS] and I have just one column called "temperature". So sample data would look like:
NEWYO20131121080932123 32.4
NEWYO20131121081034342 34.6
NEWYO20131121081156424 31.8
NEWYO20131121081223532 24.9
SINGA20131121091142563 23.1
SANFR20131121091214763 22.1
I want to query data to return me temperature values in New York between 8:11 and 8:13 on 21st November (rows 3 and 4 should be returned)
How do I write a query for this using the Java API.
I came across Scan(byte[] startRow, byte[] stopRow)
, but I don't think that I can use that, since I don't know the exact rowkey while retrieving data (because of the seconds and the milliseconds at the end of the key)
(Is it possible to use regex for rowkeys?)