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?
Asked
Active
Viewed 177 times
1 Answers
1
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.

Roman Nikitchenko
- 12,800
- 7
- 74
- 110
-
1The chapter says that "excess versions are removed during major compactions," but it doesn't say which versions these are. Are they the newest? Oldest? – Samuel Jul 28 '14 at 12:48
-
Oldest of course unless you delete newest before compaction :-). – Roman Nikitchenko Jul 28 '14 at 14:08