Review Board 1.7.22


Checkpoint deletion fails in TestEventQueueBackingStoreFactory

Review Request #11534 - Created May 30, 2013 and submitted

Roshan Naik
flume-1.4
FLUME-2057
Reviewers
Flume
flume-git
Closing streams after use in TestUtils.copyDecompressed()
Now TestEventQueueBackingStoreFactory tests pass on Windows.
flume-ng-channels/flume-file-channel/src/test/java/org/apache/flume/channel/file/TestUtils.java
Revision 563dbcc New Change
[20] 252 lines
[+20] [+] public static void forceCheckpoint(FileChannel channel) {
253
    return result;
253
    return result;
254
  }
254
  }
255
  public static void copyDecompressed(String resource, File output)
255
  public static void copyDecompressed(String resource, File output)
256
      throws IOException {
256
      throws IOException {
257
    URL input =  Resources.getResource(resource);
257
    URL input =  Resources.getResource(resource);
258
    ByteStreams.copy(new GZIPInputStream(input.openStream()),
258
    FileOutputStream fos = new FileOutputStream(output);
259
        new FileOutputStream(output));
259
    GZIPInputStream gzis = new GZIPInputStream(input.openStream());

    
   
260
    ByteStreams.copy(gzis, fos);

    
   
261
    fos.close();

    
   
262
    gzis.close();
260
  }
263
  }
261

    
   
264

   
262
  public static Context createFileChannelContext(String checkpointDir,
265
  public static Context createFileChannelContext(String checkpointDir,
263
      String dataDir, String backupDir, Map<String, String> overrides) {
266
      String dataDir, String backupDir, Map<String, String> overrides) {
264
    Context context = new Context();
267
    Context context = new Context();
[+20] [20] 33 lines
  1. flume-ng-channels/flume-file-channel/src/test/java/org/apache/flume/channel/file/TestUtils.java: Loading...