static final Scanner getDataTableScanner ( final TSDB tsdb , final long start_id , final long end_id ) throws HBaseException { final short metric_width = TSDB . metrics_width ( ) ; final byte [ ] start_row = Arrays . copyOfRange ( Bytes . fromLong ( start_id ) , 8 - metric_width , 8 ) ; final byte [ ] end_row = Arrays . copyOfRange ( Bytes . fromLong ( end_id ) , 8 - metric_width , 8 ) ; final Scanner scanner = tsdb . getClient ( ) . newScanner ( tsdb . dataTable ( ) ) ; scanner . setStartKey ( start_row ) ; scanner . setStopKey ( end_row ) ; scanner . setFamily ( TSDB . FAMILY ( ) ) ; return scanner ; }
Returns a scanner set to iterate over a range of metrics in the main tsdb - data table .