Indeed, HBase Client uses Long.MAX_VALUE to indicate server that timestamp should be replaced server-side.
> On 29 Apr 2020, at 16:04, zheng wang <18031...@qq.com> wrote: > > It seems like the Long.MAX_VALUE is a special value, if set it as the > timestamp , will be changed to current time. > > > > > > > ------------------ 原始邮件 ------------------ > 发件人: "Wellington Chevreuil"<wellington.chevre...@gmail.com > <mailto:wellington.chevre...@gmail.com>>; > 发送时间: 2020年4月29日(星期三) 下午5:41 > 收件人: "Hbase-User"<user@hbase.apache.org > <mailto:user@hbase.apache.org>>; > > 主题: Re: How to delete row with Long.MAX_VALUE timestamp > > > > That's expected behaviour [1]. If you are "travelling to the future", you > need to do a delete specifying Long.MAX_VALUE timestamp as the timestamp > optional parameter in the delete operation [2], if you don't specify > timestamp on the delete, it will assume current time for the delete marker, > which will be smaller than the Long.MAX_VALUE set to your cells, so scans > wouldn't filter it. > > [1] https://hbase.apache.org/book.html#version.delete > [2] > https://github.com/apache/hbase/blob/branch-1.4/hbase-client/src/main/java/org/apache/hadoop/hbase/client/Delete.java#L98 > > Em qua., 29 de abr. de 2020 às 08:57, Alexander Batyrshin > <0x62...@gmail.com> > escreveu: > > > Hello all, > > We had faced with strange situation: table has rows with Long.MAX_VALUE > > timestamp. > > These rows impossible to delete, because DELETE mutation uses > > System.currentTimeMillis() timestamp. > > Is there any way to delete these rows? > > We use HBase-1.4.10 > > > > Example: > > > > hbase(main):037:0> scan 'TRACET', { ROWPREFIXFILTER => > "\x0439d58wj434dd", > > RAW=>true, VERSIONS=>10} > > > ROW > COLUMN+CELL > > > \x0439d58wj434dd > column=d:_0, > > timestamp=9223372036854775807, value=x > > > > > > hbase(main):045:0* delete 'TRACET', "\x0439d58wj434dd", "d:_0" > > 0 row(s) in 0.0120 seconds > > > > hbase(main):046:0> scan 'TRACET', { ROWPREFIXFILTER => > "\x0439d58wj434dd", > > RAW=>true, VERSIONS=>10} > > > ROW > COLUMN+CELL > > > \x0439d58wj434dd > column=d:_0, > > timestamp=9223372036854775807, value=x > > > \x0439d58wj434dd > column=d:_0, > > timestamp=1588146570005, type=Delete > > > > > > hbase(main):047:0> delete 'TRACET', "\x0439d58wj434dd", "d:_0", > > 9223372036854775807 > > 0 row(s) in 0.0110 seconds > > > > hbase(main):048:0> scan 'TRACET', { ROWPREFIXFILTER => > "\x0439d58wj434dd", > > RAW=>true, VERSIONS=>10} > > > ROW > COLUMN+CELL > > > \x0439d58wj434dd > column=d:_0, > > timestamp=9223372036854775807, value=x > > > \x0439d58wj434dd > column=d:_0, > > timestamp=1588146678086, type=Delete > > > \x0439d58wj434dd > column=d:_0, > > timestamp=1588146570005, type=Delete > > > > > > > >