Let me rephrase my question a bit: what common pattern of row key for time-series data? OpenTSDB schema is a common reference, but it's limited to per-metric time-series data.
Regards, Alex 2012/2/9 Alex Vasilenko <[email protected]> > Ted, > > Scan#setTimeRange filters columns, not rows, I think it's not optimal, > because all rows, including columns will be read. In case of > BinaryRangeComparator rows not in range will be filtered out earlier. > > Thanks, > Alexandr Vasilenko > > > 2012/2/9 Ted Yu <[email protected]> > >> Alex: >> Does the timestamp below reflect actual time ? >> If so, take a look at the following method (and its javadoc) in Scan.java: >> public Scan setTimeRange(long minStamp, long maxStamp) >> >> Cheers >> >> On Thu, Feb 9, 2012 at 11:08 AM, Alex Vasilenko <[email protected] >> >wrote: >> >> > Lars, >> > >> > But how it will behave, when I have salt at the beginning of the key to >> > properly shard table across regions? Imagine row key of format >> > salt:timestamp and rows goes like this: >> > ... >> > 1:15 >> > 1:16 >> > 1:17 >> > 1:23 >> > 2:3 >> > 2:5 >> > 2:12 >> > 2:15 >> > 2:19 >> > 2:25 >> > ... >> > >> > And I want to find all rows, that has second part (timestamp) in range >> > 15-25. What startKey and endKey should be used? >> > >> > Alexandr Vasilenko >> > Web Developer >> > Skype:menterr >> > mob: +38097-611-45-99 >> > >> > >> > 2012/2/9 lars hofhansl <[email protected]> >> > >> > > Sorry misunderstood your question. >> > > >> > > In that case you'd just use a scanner (see Scan.java) and set that >> > > startKey and the endKey. >> > > That will give you that range of keys and it do so efficiently, as it >> can >> > > seek forward to the startKey. >> > > >> > > -- Lars >> > > >> > > >> > > >> > > ________________________________ >> > > From: Alex Vasilenko <[email protected]> >> > > To: [email protected] >> > > Sent: Thursday, February 9, 2012 10:40 AM >> > > Subject: Re: row filter - binary comparator at certain range >> > > >> > > Lars, >> > > >> > > I meant range of row keys. BinaryPrefixComparator can be used in >> > > conjunction with RowFilter to filter by prefix. >> > > >> > > Alex >> > > >> > > 2012/2/9 lars hofhansl <[email protected]> >> > > >> > > > Note the BinaryPrefixComparator compares values (not keys). >> > > > Not sure that this is what you want, but you mention a "range of >> key". >> > > > >> > > > >> > > > For keys there are ColumnPrefixFilter and ColumnRangeFilter. >> > > > >> > > > >> > > > -- Lars >> > > > >> > > > >> > > > >> > > > ________________________________ >> > > > From: Alex Vasilenko <[email protected]> >> > > > To: [email protected] >> > > > Sent: Thursday, February 9, 2012 10:03 AM >> > > > Subject: row filter - binary comparator at certain range >> > > > >> > > > Hi all, >> > > > >> > > > I'm a brand new user of hbase and hadoop in general. Trying to >> evaluate >> > > > hbase for our needs. Question is: why there's >> BinaryPrefixComparator, >> > but >> > > > no BinaryRangeComparator, where you specify what range of key >> should be >> > > > compared. Are there any concerns about using it? >> > > > >> > > > Thanks, >> > > > Alexandr Vasilenko >> > > > >> > > >> > >> > >
