Hi Guys,
Need help with this.
My rowKey is stockName like GOOGLE, APPLE.
Columns are sorted as per timestamp and they include some set of data fields 
like price and size. So, data would be like 1. 9:31:00, $520, 100 shares 2. 
9:35:09, $530, 1000 shares 3. 9:45:39, $520, 500 shares
I want to search this column family using partition key timestamp.
For a rowkey, if I search for data on partition id 9:33:00 which does not 
actually exist in columns, I want to return the last value where data was 
present. In this case 9:31:00, $520, 100 shares, since the next partitionkey is 
9:35:09 which is greater than input value entered.
One obvious way would be iterating through each columns and storing last data, 
if new timestamp is greater than given timestamp then return the last data 
stored.
Is it any optimized way to achieve the same? Since columns are already sorted.
Thanks


Reply via email to