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

Jean-Daniel Cryans commented on HBASE-730:
------------------------------------------

bq. Why have a nextPeriod? Why not just have a setPeriod?

In context :
{code}
public void sleep(final long startTime) {
    if (this.stop.get()) {
      return;
    }
    long now = System.currentTimeMillis();
    long waitTime = this.period - (now - startTime);
    if (waitTime > this.period) {
      LOG.warn("Calculated wait time > " + this.period +
        "; setting to this.period: " + System.currentTimeMillis() + ", " +
        startTime);
    }
    if (waitTime > 0) {
      try {
        Thread.sleep(waitTime);
        long slept = System.currentTimeMillis() - now;
        if (slept > (10 * this.period)) {
          LOG.warn("We slept " + slept + "ms, ten times longer than scheduled: 
" +
            this.period);
        }
      } catch(InterruptedException iex) {
        // We we interrupted because we're meant to stop?  If not, just
        // continue ignoring the interruption
        if (this.stop.get()) {
          return;
        }
      }
    }
    if(this.nextPeriod != this.period)
      this.period = this.nextPeriod;
  }
{code}

I'm not too sure of what would happen if the period is changed during the 
execution of this method.

> On startup, rinse STARTCODE and SERVER from .META.
> --------------------------------------------------
>
>                 Key: HBASE-730
>                 URL: https://issues.apache.org/jira/browse/HBASE-730
>             Project: Hadoop HBase
>          Issue Type: Improvement
>            Reporter: stack
>            Assignee: Jean-Daniel Cryans
>             Fix For: 0.2.0
>
>         Attachments: hbase-730-v1.patch
>
>
> Look into what it would take purging startcode and server from .META. on 
> startup.  It might make startup run faster.  In particular, Clint Morgan was 
> asking for faster startup.  Below is from a reply.  The +1 is from JK.
> > > Looking at code, we have the concept of an 'initial' scan.  I
> > > wonder if things would run faster for you if on the initial
> > > scan we just cleared all SERVER and STARTCODE entries in
> > > .META. rather than wait on regionserver reports?
> +1

-- 
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.

Reply via email to