[ 
https://issues.apache.org/jira/browse/HBASE-6833?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=13458439#comment-13458439
 ] 

Elliott Clark commented on HBASE-6833:
--------------------------------------

Would taking a currentTimeMillis and the nanoTime at class instantiation allow 
us to create an always increasing wall clock time.

we would have a startNano and a startMilli

return startMili + toMilli(startNano - System.nanoTime());


That has the potential to drift a little bit from wall time but should still be 
pretty close.  And if we really need to stay close to wall time we can have a 
repeating timer that resets startMilli and startNano.
                
> [WINDOWS] Java Milisecond precision on Windows
> ----------------------------------------------
>
>                 Key: HBASE-6833
>                 URL: https://issues.apache.org/jira/browse/HBASE-6833
>             Project: HBase
>          Issue Type: Sub-task
>    Affects Versions: 0.96.0, 0.94.3
>            Reporter: Enis Soztutar
>            Assignee: Enis Soztutar
>              Labels: windows
>
> HBase relies on the system clock obtained by System.currentTimeMilis() to 
> supply the version, if it is not provided by the client in Put's and 
> Delete's. At HBASE-6832 and HBASE-6826, we discovered that on some platforms, 
> the milis clock might not be updated every milisecond, which might cause 
> unexpected behavior. We also did some preliminary analysis there.
> In this issue, we can further discuss and inspect whether it is a problem for 
> main target platforms and if so what can be done.

--
This message is automatically generated by JIRA.
If you think it was sent incorrectly, please contact your JIRA administrators
For more information on JIRA, see: http://www.atlassian.com/software/jira

Reply via email to