You are viewing a plain text version of this content. The canonical link for it is here.
Posted to user@zookeeper.apache.org by Benjamin Jaton <be...@gmail.com> on 2014/04/21 22:39:13 UTC
System clocks
Hello,
Do system clocks have to be the same across all the nodes?
Example:
Server A in the US
Server B in Japan
Server C in France
Do I have to set the same system time on all of them?
Any link to a documentation about that would be much appreciated.
Thanks!
Benjamin Jaton
Re: System clocks
Posted by Raúl Gutiérrez Segalés <rg...@itevenworks.net>.
On 21 April 2014 14:02, Raúl Gutiérrez Segalés <rg...@itevenworks.net> wrote:
>
> But your transactions would have different timestamps as the leader
changes timezone from one election to the next, no? Or are they all UTC?
So it seems that the timestamp for TxnHeaders comes from:
https://github.com/apache/zookeeper/blob/trunk/src/java/main/org/apache/zookeeper/server/ZooKeeperServer.java#L302
which is a call to System.currentTimeMillis, which is ms since the unix
epoch. So it is timezone independent.
-rgs
Re: System clocks
Posted by Raúl Gutiérrez Segalés <rg...@itevenworks.net>.
But your transactions would have different timestamps as the leader changes
timezone from one election to the next, no? Or are they all UTC?
-rgs
On 21 April 2014 13:54, Benjamin Jaton <be...@gmail.com> wrote:
> Thank you !
>
>
> On Mon, Apr 21, 2014 at 1:42 PM, Camille Fournier <camille@apache.org
> >wrote:
>
> > The timezone doesn't matter AFAIK.
> >
> > C
> >
> >
> > On Mon, Apr 21, 2014 at 4:39 PM, Benjamin Jaton <
> benjamin.jaton@gmail.com
> > >wrote:
> >
> > > Hello,
> > >
> > > Do system clocks have to be the same across all the nodes?
> > >
> > > Example:
> > > Server A in the US
> > > Server B in Japan
> > > Server C in France
> > >
> > > Do I have to set the same system time on all of them?
> > > Any link to a documentation about that would be much appreciated.
> > >
> > > Thanks!
> > > Benjamin Jaton
> > >
> >
>
Re: System clocks
Posted by Benjamin Jaton <be...@gmail.com>.
Thank you !
On Mon, Apr 21, 2014 at 1:42 PM, Camille Fournier <ca...@apache.org>wrote:
> The timezone doesn't matter AFAIK.
>
> C
>
>
> On Mon, Apr 21, 2014 at 4:39 PM, Benjamin Jaton <benjamin.jaton@gmail.com
> >wrote:
>
> > Hello,
> >
> > Do system clocks have to be the same across all the nodes?
> >
> > Example:
> > Server A in the US
> > Server B in Japan
> > Server C in France
> >
> > Do I have to set the same system time on all of them?
> > Any link to a documentation about that would be much appreciated.
> >
> > Thanks!
> > Benjamin Jaton
> >
>
Re: System clocks
Posted by Camille Fournier <ca...@apache.org>.
The timezone doesn't matter AFAIK.
C
On Mon, Apr 21, 2014 at 4:39 PM, Benjamin Jaton <be...@gmail.com>wrote:
> Hello,
>
> Do system clocks have to be the same across all the nodes?
>
> Example:
> Server A in the US
> Server B in Japan
> Server C in France
>
> Do I have to set the same system time on all of them?
> Any link to a documentation about that would be much appreciated.
>
> Thanks!
> Benjamin Jaton
>