[ 
https://issues.apache.org/jira/browse/HDFS-12209?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel
 ]

fatkun updated HDFS-12209:
--------------------------
    Description: 
The bug introduce from HDFS-7430 , the time is not same, one is monotonicMs and 
other is clock time. It should use Time.now() both

VolumeScanner.java
{code:java}
        long saveDelta = monotonicMs - curBlockIter.getLastSavedMs();
        if (saveDelta >= conf.cursorSaveMs) {
          LOG.debug("{}: saving block iterator {} after {} ms.",
                  this, curBlockIter, saveDelta);
          saveBlockIterator(curBlockIter);
        }
{code}

curBlockIter.getLastSavedMs() init here

FsVolumeImpl.java
{code:java}
    BlockIteratorState() {
      lastSavedMs = iterStartMs = Time.now();
      curFinalizedDir = null;
      curFinalizedSubDir = null;
      curEntry = null;
      atEnd = false;
    }
{code}



  was:
The bug introduce from HDFS-7430 , the time is not same, one is monotonicMs and 
other is clock time

VolumeScanner.java
{code:java}
        long saveDelta = monotonicMs - curBlockIter.getLastSavedMs();
        if (saveDelta >= conf.cursorSaveMs) {
          LOG.debug("{}: saving block iterator {} after {} ms.",
                  this, curBlockIter, saveDelta);
          saveBlockIterator(curBlockIter);
        }
{code}

curBlockIter.getLastSavedMs() init here

FsVolumeImpl.java
{code:java}
    BlockIteratorState() {
      lastSavedMs = iterStartMs = Time.now();
      curFinalizedDir = null;
      curFinalizedSubDir = null;
      curEntry = null;
      atEnd = false;
    }
{code}




> VolumeScanner scan cursor not save periodic
> -------------------------------------------
>
>                 Key: HDFS-12209
>                 URL: https://issues.apache.org/jira/browse/HDFS-12209
>             Project: Hadoop HDFS
>          Issue Type: Bug
>          Components: hdfs
>    Affects Versions: 2.6.0
>         Environment: cdh5.4.0
>            Reporter: fatkun
>
> The bug introduce from HDFS-7430 , the time is not same, one is monotonicMs 
> and other is clock time. It should use Time.now() both
> VolumeScanner.java
> {code:java}
>         long saveDelta = monotonicMs - curBlockIter.getLastSavedMs();
>         if (saveDelta >= conf.cursorSaveMs) {
>           LOG.debug("{}: saving block iterator {} after {} ms.",
>                   this, curBlockIter, saveDelta);
>           saveBlockIterator(curBlockIter);
>         }
> {code}
> curBlockIter.getLastSavedMs() init here
> FsVolumeImpl.java
> {code:java}
>     BlockIteratorState() {
>       lastSavedMs = iterStartMs = Time.now();
>       curFinalizedDir = null;
>       curFinalizedSubDir = null;
>       curEntry = null;
>       atEnd = false;
>     }
> {code}



--
This message was sent by Atlassian JIRA
(v6.4.14#64029)

---------------------------------------------------------------------
To unsubscribe, e-mail: hdfs-issues-unsubscr...@hadoop.apache.org
For additional commands, e-mail: hdfs-issues-h...@hadoop.apache.org

Reply via email to