You are viewing a plain text version of this content. The canonical link for it is here.
Posted to user@hbase.apache.org by Joe Pallas <pa...@cs.stanford.edu> on 2011/01/05 20:10:21 UTC

Replication and timestamps and timezones (oh my)

The wiki page for cluster replication <http://hbase.apache.org/docs/r0.89.20100924/replication.html> has a FAQ  at the bottom that says:

> Why do all clusters need to be in the same timezone?
> 
> Suppose an edit to cell X happens in a EST cluster, then 2 minutes later a new edits happens to the same cell in a PST cluster and that both clusters are in a master-master replication. The second edit is considered younger, so the first will always hide it while in fact the second is older.

That has to be wrong, doesn't it?  Timestamps would all be in UTC, so the local timezone is irrelevant.  Am I overlooking something obvious, and if not, can I trust the rest of this document?

Thanks.
joe


Re: Replication and timestamps and timezones (oh my)

Posted by Jean-Daniel Cryans <jd...@apache.org>.
Oh then I guess I was mistaken during all that time (makes a lot of
sense tho now that I think about it).

J-D

On Wed, Jan 5, 2011 at 11:41 AM, Joe Pallas <pa...@cs.stanford.edu> wrote:
>
> On Jan 5, 2011, at 11:17 AM, Jean-Daniel Cryans wrote:
>
>> Maybe it's not clear, by "need to be in the same timezone" it means
>> that the machines' configured timezone needs to be the same. So yes
>> they can be in different physical timezones but it will work if the
>> configured tz is UTC.
>
> Still confused.  Aren't timestamps generated by System.currentTimeMillis() or its equivalent?  That would represent UTC regardless of the configured timezone.
>
> joe
>
>

Re: Replication and timestamps and timezones (oh my)

Posted by Joe Pallas <pa...@cs.stanford.edu>.
On Jan 5, 2011, at 11:17 AM, Jean-Daniel Cryans wrote:

> Maybe it's not clear, by "need to be in the same timezone" it means
> that the machines' configured timezone needs to be the same. So yes
> they can be in different physical timezones but it will work if the
> configured tz is UTC.

Still confused.  Aren't timestamps generated by System.currentTimeMillis() or its equivalent?  That would represent UTC regardless of the configured timezone.

joe


Re: Replication and timestamps and timezones (oh my)

Posted by Jean-Daniel Cryans <jd...@apache.org>.
Maybe it's not clear, by "need to be in the same timezone" it means
that the machines' configured timezone needs to be the same. So yes
they can be in different physical timezones but it will work if the
configured tz is UTC.

J-D

On Wed, Jan 5, 2011 at 11:10 AM, Joe Pallas <pa...@cs.stanford.edu> wrote:
> The wiki page for cluster replication <http://hbase.apache.org/docs/r0.89.20100924/replication.html> has a FAQ  at the bottom that says:
>
>> Why do all clusters need to be in the same timezone?
>>
>> Suppose an edit to cell X happens in a EST cluster, then 2 minutes later a new edits happens to the same cell in a PST cluster and that both clusters are in a master-master replication. The second edit is considered younger, so the first will always hide it while in fact the second is older.
>
> That has to be wrong, doesn't it?  Timestamps would all be in UTC, so the local timezone is irrelevant.  Am I overlooking something obvious, and if not, can I trust the rest of this document?
>
> Thanks.
> joe
>
>