Review Board 1.7.22


FLUME-1891. Fast replay runs even when checkpoint exists.

Review Request #9240 - Created Feb. 1, 2013 and submitted

Hari Shreedharan
FLUME-1891
Reviewers
Flume
flume-git
Fast replay is now run only if checkpoint file does not exist.
Added 2 unit tests to test for the case where checkpoint does not exist (or is corrupt) and where checkpoint exists.
flume-ng-channels/flume-file-channel/src/main/java/org/apache/flume/channel/file/FileChannel.java
Revision d921387 New Change
[20] 23 lines
[+20]
24
import java.util.Arrays;
24
import java.util.Arrays;
25
import java.util.concurrent.LinkedBlockingDeque;
25
import java.util.concurrent.LinkedBlockingDeque;
26
import java.util.concurrent.Semaphore;
26
import java.util.concurrent.Semaphore;
27
import java.util.concurrent.TimeUnit;
27
import java.util.concurrent.TimeUnit;
28

    
   
28

   

    
   
29
import com.google.common.annotations.VisibleForTesting;
29
import org.apache.flume.Channel;
30
import org.apache.flume.Channel;
30
import org.apache.flume.ChannelException;
31
import org.apache.flume.ChannelException;
31
import org.apache.flume.Context;
32
import org.apache.flume.Context;
32
import org.apache.flume.Event;
33
import org.apache.flume.Event;
33
import org.apache.flume.annotations.InterfaceAudience;
34
import org.apache.flume.annotations.InterfaceAudience;
[+20] [20] 349 lines
[+20] [+] protected BasicTransactionSemantics createTransaction() {
383
      log = null;
384
      log = null;
384
      queueRemaining = null;
385
      queueRemaining = null;
385
    }
386
    }
386
  }
387
  }
387

    
   
388

   

    
   
389
  @VisibleForTesting

    
   
390
  boolean didFastReplay() {

    
   
391
    return log.didFastReplay();

    
   
392
  }

    
   
393

   
388
  public boolean isOpen() {
394
  public boolean isOpen() {
389
    return open;
395
    return open;
390
  }
396
  }
391

    
   
397

   
392
  /**
398
  /**
[+20] [20] 214 lines
flume-ng-channels/flume-file-channel/src/main/java/org/apache/flume/channel/file/Log.java
Revision 8a4201c New Change
 
flume-ng-channels/flume-file-channel/src/test/java/org/apache/flume/channel/file/TestFileChannelRestart.java
Revision ea57cdb New Change
 
  1. flume-ng-channels/flume-file-channel/src/main/java/org/apache/flume/channel/file/FileChannel.java: Loading...
  2. flume-ng-channels/flume-file-channel/src/main/java/org/apache/flume/channel/file/Log.java: Loading...
  3. flume-ng-channels/flume-file-channel/src/test/java/org/apache/flume/channel/file/TestFileChannelRestart.java: Loading...