You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@hbase.apache.org by mail list <lo...@gmail.com> on 2015/03/23 12:03:40 UTC

How to put a row with an older timestamp and get it?


Begin forwarded message:

> From: mail list <lo...@gmail.com>
> Subject: How to put a row with an older timestamp and get it?
> Date: March 23, 2015 at 17:27:14 GMT+8
> To: user@hbase.apache.org
> 
> Hi ,all
> 
> Recently i encounter a situation like below:
> 
> 
> 
> That is:
> 
> After i delete a row with timestamp 2015, and then put a row with timestamp 2014,
> How can i get the later row?
> 
> 


Re: How to put a row with an older timestamp and get it?

Posted by Michael Segel <mi...@hotmail.com>.
Lets ask a better question… why? 

Are you trying to clean your data? In which case, by removing the row of ‘bad’ data, you lose your auditing. (But that will depend on if you need to audit your data, and how you’re auditing it…) 

Is the timestamp important? If so, why not capture it as an attribute of your data. 
This way you have the timestamp of the row, (hbase) and then the column. 

If you do this, you can capture both the timestamp associated with the data, and then the time it was entered in to your system.

Does that make sense? 

-Mike

> On Mar 23, 2015, at 9:05 AM, Ted Yu <yu...@gmail.com> wrote:
> 
> Can you check server log to see if major compaction completed before you issued the last put command ?
> 
> Cheers
> 
> On Mon, Mar 23, 2015 at 4:03 AM, mail list <louis.hust.ml@gmail.com <ma...@gmail.com>> wrote:
> 
> 
> Begin forwarded message:
> 
>> From: mail list <louis.hust.ml@gmail.com <ma...@gmail.com>>
>> Subject: How to put a row with an older timestamp and get it?
>> Date: March 23, 2015 at 17:27:14 GMT+8
>> To: user@hbase.apache.org <ma...@hbase.apache.org>
>> 
>> Hi ,all
>> 
>> Recently i encounter a situation like below:
>> 
>> 
>> 
>> That is:
>> 
>> After i delete a row with timestamp 2015, and then put a row with timestamp 2014,
>> How can i get the later row?
>> 
>> 
> 
> 

The opinions expressed here are mine, while they may reflect a cognitive thought, that is purely accidental. 
Use at your own risk. 
Michael Segel
michael_segel (AT) hotmail.com






Re: How to put a row with an older timestamp and get it?

Posted by Ted Yu <yu...@gmail.com>.
bq. flush table and the major compact

Please do the above (verify that major compaction finishes).

Cheers

On Mon, Mar 23, 2015 at 8:01 PM, mail list <lo...@gmail.com> wrote:

> Hi, Ted
>
> The major compact is not finished cause i can see the deleted row when
> scan with specified VERSION.
>
> Must I flush table and the major compact?
>
>
>
> On Mar 23, 2015, at 22:05, Ted Yu <yu...@gmail.com> wrote:
>
> > Can you check server log to see if major compaction completed before you
> issued the last put command ?
> >
> > Cheers
> >
> > On Mon, Mar 23, 2015 at 4:03 AM, mail list <lo...@gmail.com>
> wrote:
> >
> >
> > Begin forwarded message:
> >
> >> From: mail list <lo...@gmail.com>
> >> Subject: How to put a row with an older timestamp and get it?
> >> Date: March 23, 2015 at 17:27:14 GMT+8
> >> To: user@hbase.apache.org
> >>
> >> Hi ,all
> >>
> >> Recently i encounter a situation like below:
> >>
> >>
> >>
> >> That is:
> >>
> >> After i delete a row with timestamp 2015, and then put a row with
> timestamp 2014,
> >> How can i get the later row?
> >>
> >>
> >
> >
>
>

Re: How to put a row with an older timestamp and get it?

Posted by mail list <lo...@gmail.com>.
Hi, Ted

The major compact is not finished cause i can see the deleted row when scan with specified VERSION.

Must I flush table and the major compact?  



On Mar 23, 2015, at 22:05, Ted Yu <yu...@gmail.com> wrote:

> Can you check server log to see if major compaction completed before you issued the last put command ?
> 
> Cheers
> 
> On Mon, Mar 23, 2015 at 4:03 AM, mail list <lo...@gmail.com> wrote:
> 
> 
> Begin forwarded message:
> 
>> From: mail list <lo...@gmail.com>
>> Subject: How to put a row with an older timestamp and get it?
>> Date: March 23, 2015 at 17:27:14 GMT+8
>> To: user@hbase.apache.org
>> 
>> Hi ,all
>> 
>> Recently i encounter a situation like below:
>> 
>> 
>> 
>> That is:
>> 
>> After i delete a row with timestamp 2015, and then put a row with timestamp 2014,
>> How can i get the later row?
>> 
>> 
> 
> 


Re: How to put a row with an older timestamp and get it?

Posted by mail list <lo...@gmail.com>.
Hi Du, Jingcheng

It seems that flush table + major compact works.

So each time I have to flush table before major compact.

On Mar 24, 2015, at 10:41, Du, Jingcheng <ji...@intel.com> wrote:

> Hi,
> 
> Before you ran the compaction, did you flush the memstore for that table? I think the compaction only compacts the store files without memstore, just in my opinion.
> 
> Regards,
> Jingcheng
> 
> From: Ted Yu [mailto:yuzhihong@gmail.com]
> Sent: Monday, March 23, 2015 10:05 PM
> To: dev@hbase.apache.org
> Subject: Re: How to put a row with an older timestamp and get it?
> 
> Can you check server log to see if major compaction completed before you issued the last put command ?
> 
> Cheers
> 
> On Mon, Mar 23, 2015 at 4:03 AM, mail list <lo...@gmail.com>> wrote:
> 
> 
> Begin forwarded message:
> 
> 
> From: mail list <lo...@gmail.com>>
> Subject: How to put a row with an older timestamp and get it?
> Date: March 23, 2015 at 17:27:14 GMT+8
> To: user@hbase.apache.org<ma...@hbase.apache.org>
> 
> Hi ,all
> 
> Recently i encounter a situation like below:
> 
> [cid:CBF3F837-50B3-477F-AA2E-5E3FBB893873@qunarservers.com]
> 
> That is:
> 
> After i delete a row with timestamp 2015, and then put a row with timestamp 2014,
> How can i get the later row?
> 
> 
> 
> 


RE: How to put a row with an older timestamp and get it?

Posted by "Du, Jingcheng" <ji...@intel.com>.
Hi,

Before you ran the compaction, did you flush the memstore for that table? I think the compaction only compacts the store files without memstore, just in my opinion.

Regards,
Jingcheng

From: Ted Yu [mailto:yuzhihong@gmail.com]
Sent: Monday, March 23, 2015 10:05 PM
To: dev@hbase.apache.org
Subject: Re: How to put a row with an older timestamp and get it?

Can you check server log to see if major compaction completed before you issued the last put command ?

Cheers

On Mon, Mar 23, 2015 at 4:03 AM, mail list <lo...@gmail.com>> wrote:


Begin forwarded message:


From: mail list <lo...@gmail.com>>
Subject: How to put a row with an older timestamp and get it?
Date: March 23, 2015 at 17:27:14 GMT+8
To: user@hbase.apache.org<ma...@hbase.apache.org>

Hi ,all

Recently i encounter a situation like below:

[cid:CBF3F837-50B3-477F-AA2E-5E3FBB893873@qunarservers.com]

That is:

After i delete a row with timestamp 2015, and then put a row with timestamp 2014,
How can i get the later row?





Re: How to put a row with an older timestamp and get it?

Posted by Ted Yu <yu...@gmail.com>.
Can you check server log to see if major compaction completed before you
issued the last put command ?

Cheers

On Mon, Mar 23, 2015 at 4:03 AM, mail list <lo...@gmail.com> wrote:

>
>
> Begin forwarded message:
>
> *From: *mail list <lo...@gmail.com>
> *Subject: **How to put a row with an older timestamp and get it?*
> *Date: *March 23, 2015 at 17:27:14 GMT+8
> *To: *user@hbase.apache.org
>
> Hi ,all
>
> Recently i encounter a situation like below:
>
>
> That is:
>
> After i delete a row with timestamp 2015, and then put a row with
> timestamp 2014,
> How can i get the later row?
>
>
>
>