PrepAway - Latest Free Exam Questions & Answers

Which of the following Column Family attribute settings would you set to do this?

For a given Column Family, you want to always retain at least one version, but expire all other
versions that are older than 5 days. Which of the following Column Family attribute settings would
you set to do this?

PrepAway - Latest Free Exam Questions & Answers

A.
LENGTH = 5, MIN_VERSIONS = 1

B.
TTL = 5, MIN_VERSIONS = 1

C.
TTL = 432000, MIN_VERSIONS = 1

D.
TTL = 432000, VERSIONS =1

Explanation:
* Time To Live (TTL)
ColumnFamilies can set a TTL length in seconds, and HBase will automatically delete rows once
the expiration time is reached. This applies to all versions of a row – even the current one. The TTL
time encoded in the HBase for the row is specified in UTC.
5 days is 43200 (5x24x60x60) seconds
* Minimum Number of Versions
Like maximum number of row versions, the minimum number of row versions to keep is configured
per column family via HColumnDescriptor. The default for min versions is 0, which means the
feature is disabled. The minimum number of row versions parameter is used together with the
time-to-live parameter and can be combined with the number of row versions parameter to allow
configurations such as “keep the last T minutes worth of data, at most N versions, but keep at
least M versions around” (where M is the value for minimum number of row versions, M<N). This
parameter should only be set when time-to-live is enabled for a column family and must be less
than the number of row versions.

Reference: HBase and Schema Design

PrepAway - Latest Free Exam Questions & Answers

One Comment on “Which of the following Column Family attribute settings would you set to do this?


Leave a Reply

Your email address will not be published. Required fields are marked *