Search code examples
hbasedatabase-versioningnosql

HBase Column family max versions clobber?


If I have my column family to only keep one version, will every Put to the same row key clobber the existing version, or will it ignore my Put request?


Solution

  • Actually every phrase of your question is covered by appropriate HBase guide chapter. Also please see this chapter specifically for maximum number of versions. Here are special things to pay attention:

    • Actually version is nothing but column with different time stamp. Several puts with the same TS value will result only 1 cell with latest put result (despite they all have the same version).
    • If you put 2 different versions and then delete most recent of them you will see older one through Get. But if after put you will perform major compaction, you will really have only 1 version and delete removes latest one.
    • Think about major compaction as something that really removes version. Before major compact actually your versions exist. So doing 2 puts and asking for all available versions you will get 2 versions despite you have only 1 version configured. Until major compaction.