diff --git a/CHANGES.txt b/CHANGES.txt index a919023b5c4..3b526656860 100644 --- a/CHANGES.txt +++ b/CHANGES.txt @@ -22,6 +22,8 @@ Release 0.21.0 - Unreleased HBASE-1808 [stargate] fix how columns are specified for scanners HBASE-1828 CompareFilters are broken from client-side HBASE-1836 test of indexed hbase broken + HBASE-1838 [javadoc] Add javadoc to Delete explaining behavior when no + timestamp provided IMPROVEMENTS HBASE-1760 Cleanup TODOs in HTable diff --git a/src/java/org/apache/hadoop/hbase/client/Delete.java b/src/java/org/apache/hadoop/hbase/client/Delete.java index b48f21e6302..7fc407b3fb4 100644 --- a/src/java/org/apache/hadoop/hbase/client/Delete.java +++ b/src/java/org/apache/hadoop/hbase/client/Delete.java @@ -51,11 +51,16 @@ import org.apache.hadoop.hbase.util.Bytes; * {@link #deleteColumn(byte [],byte [],long) deleteColumn} * for each column version to delete. *

- * Specifying timestamps calling constructor, deleteFamily, and deleteColumns - * will delete all versions with a timestamp less than or equal to that - * specified. Specifying a timestamp to deleteColumn will delete versions - * only with a timestamp equal to that specified. - *

The timestamp passed to the constructor is only used ONLY for delete of + * Specifying timestamps, deleteFamily and deleteColumns will delete all + * versions with a timestamp less than or equal to that passed. If no + * timestamp is specified, an entry is added with a timestamp of 'now' + * where 'now' is the servers's System.currentTimeMillis(). + * Specifying a timestamp to the deleteColumn method will + * delete versions only with a timestamp equal to that specified. + * If no timestamp is passed to deleteColumn, internally, it figures the + * most recent cell's timestamp and adds a delete at that timestamp; i.e. + * it deletes the most recently added cell. + *

The timestamp passed to the constructor is used ONLY for delete of * rows. For anything less -- a deleteColumn, deleteColumns or * deleteFamily -- then you need to use the method overrides that take a * timestamp. The constructor timestamp is not referenced. @@ -356,4 +361,4 @@ public class Delete implements Writable { } } } -} \ No newline at end of file +}