The number of cells returned to the client are
normally filtered based on the table configuration; however, when using the RAW
=> true parameter, you can retrieve all of the versions kept by HBase, unless
there was a major compaction or a flush to disk event in meanwhile.
Create a table with a single column family:
create 't1', 'f1'
Configure it to retain a maximum version count of 3:
Perform 4 puts:
Scan with RAW=>true. I used VERSIONS as 100 for a catch-all. It could have been anything greater than 3 (number of versions set previously). Unless specified, only the latest version is returned by scan command.
When deciding the number of versions to retain,
it is best to treat that number as the minimum version count available at a
given time and not as a given constant. Until a flush to disk and a major
compaction, number of versions available is higher than the configured for the