Details
-
Improvement
-
Status: Resolved
-
Minor
-
Resolution: Fixed
-
None
-
None
-
None
-
Reviewed
Description
Thanks to Jerry and Chia-Ping Tsai's comments to correct my wrong understanding.
The following documentation says that by default(when the timestamp is not specified for Put or Delete), system uses the server's currentTimeMillis.
1. In chapter 27.2.4 Put
Doing a put always creates a new version of a cell, at a certain timestamp. By default the system uses the server’s currentTimeMillis, ...
2. In chapter 27.2.5 Delete
Deletes work by creating tombstone markers. For example, let’s suppose we want to delete a row. For this you can specify a version, or else by default the currentTimeMillis is used....
It seems not consistent with the code. Because in the client side's code, when timestamp is not specified, HConstants.LATEST_TIMESTAMP is used, which is Long.MAX_VALUE, rather than System.currentTimeMillis().
However, the documentation is correct, because on the server side, timestamp of Put cell with HConstants.LATEST_TIMESTAMP will be replaced with server's currentTimeMillis.
So we decide to add more comments to HConstants.LATEST_TIMESTAMP to help the new comers steer clear of the confusion.