Yes, I mean the server.compactSplitThread.compactionRequested(region,
getName());

in flushRegion, it will do the
server.compactSplitThread.compactionRequested(region,
getName());

*seems we don't need to do it again in the following logic (can you guys see
the lines in bold, **!flushRegion(biggestMemStoreRegion, true) and *
*
*
*    for (HRegion region : regionsToCompact) {
      server.compactSplitThread.compactionRequested(region, getName());
    }*
*
*
*
*
*regards*
macf


    if (*!flushRegion(biggestMemStoreRegion, true)*) {
        LOG.warn("Flush failed");
        break;
      }
      regionsToCompact.add(biggestMemStoreRegion);
    }
    for (HRegion region : regionsToCompact) {
      *server.compactSplitThread.compactionRequested(region, getName());*
    }

> > in flushRegion
> >
> >  private boolean flushRegion(final HRegion region, final boolean
> > emergencyFlush) {
> >    synchronized (this.regionsInQueue) {
> >      FlushQueueEntry fqe = this.regionsInQueue.remove(region);
> >      if (fqe != null && emergencyFlush) {
> >        // Need to remove from region from delay queue.  When NOT an
> >        // emergencyFlush, then item was removed via a flushQueue.poll.
> >        flushQueue.remove(fqe);
> >      }
> >      lock.lock();
> >    }
> >    try {
> >      if (region.flushcache()) {
> >        *server.compactSplitThread.compactionRequested(region,
getName());*
> >      }

On Mon, Jan 24, 2011 at 6:40 AM, Ted Yu <[email protected]> wrote:

> I think he was referring to this line:
>
> server.compactSplitThread.compactionRequested(region, getName());
>
> On Sun, Jan 23, 2011 at 10:52 AM, Stack <[email protected]> wrote:
>
> > Hello Mac Fang:  Which lines in the below?  Your colorizing didn't
> > come across in the mail.  Thanks, St.Ack
> >
> > On Sun, Jan 23, 2011 at 6:23 AM, mac fang <[email protected]> wrote:
> > > Hi, guys,
> > >
> > > see the below codes in* MemStoreFlusher.java*, i am not sure if those
> >  lines
> > > in orange are the same and looks like they are trying to do the same
> > logic.
> > > Are they redundant?
> > >
> > > regards
> > > macf
> > >
> > >    if (!flushRegion(biggestMemStoreRegion, true)) {
> > >        LOG.warn("Flush failed");
> > >        break;
> > >      }
> > >      regionsToCompact.add(biggestMemStoreRegion);
> > >    }
> > >    for (HRegion region : regionsToCompact) {
> > >      server.compactSplitThread.compactionRequested(region, getName());
> > >    }
> > >
> > > in flushRegion
> > >
> > >  private boolean flushRegion(final HRegion region, final boolean
> > > emergencyFlush) {
> > >    synchronized (this.regionsInQueue) {
> > >      FlushQueueEntry fqe = this.regionsInQueue.remove(region);
> > >      if (fqe != null && emergencyFlush) {
> > >        // Need to remove from region from delay queue.  When NOT an
> > >        // emergencyFlush, then item was removed via a flushQueue.poll.
> > >        flushQueue.remove(fqe);
> > >      }
> > >      lock.lock();
> > >    }
> > >    try {
> > >      if (region.flushcache()) {
> > >        server.compactSplitThread.compactionRequested(region,
> getName());
> > >      }
> > >
> >
>

Reply via email to