Get all rows from the last N days with HBase Get all rows from the last N days with HBase hadoop hadoop

Get all rows from the last N days with HBase


In HBase shell you can use TIMERANGE filter. Example from scan --help command:

hbase> scan 't1', {COLUMNS => 'c1', TIMERANGE => [1303668804, 1303668904]}

For java client, you can set timeRange on the scan object:

Scan s = new Scan();s.setTimeRange(1303668804L, 1303668904L);