flume-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From esam...@apache.org
Subject svn commit: r1160490 - in /incubator/flume/branches/flume-728/flume-ng-core/src: main/java/org/apache/flume/durability/ test/java/org/apache/flume/durability/
Date Mon, 22 Aug 2011 23:06:53 GMT
Author: esammer
Date: Mon Aug 22 23:06:52 2011
New Revision: 1160490

URL: http://svn.apache.org/viewvc?rev=1160490&view=rev
Log:
- Extracted FileBasedWALWriter from FileBasedWALManager.

Added:
    incubator/flume/branches/flume-728/flume-ng-core/src/main/java/org/apache/flume/durability/FileBasedWALWriter.java
Modified:
    incubator/flume/branches/flume-728/flume-ng-core/src/main/java/org/apache/flume/durability/FileBasedWAL.java
    incubator/flume/branches/flume-728/flume-ng-core/src/main/java/org/apache/flume/durability/FileBasedWALManager.java
    incubator/flume/branches/flume-728/flume-ng-core/src/test/java/org/apache/flume/durability/TestFileBasedWALWriter.java

Modified: incubator/flume/branches/flume-728/flume-ng-core/src/main/java/org/apache/flume/durability/FileBasedWAL.java
URL: http://svn.apache.org/viewvc/incubator/flume/branches/flume-728/flume-ng-core/src/main/java/org/apache/flume/durability/FileBasedWAL.java?rev=1160490&r1=1160489&r2=1160490&view=diff
==============================================================================
--- incubator/flume/branches/flume-728/flume-ng-core/src/main/java/org/apache/flume/durability/FileBasedWAL.java
(original)
+++ incubator/flume/branches/flume-728/flume-ng-core/src/main/java/org/apache/flume/durability/FileBasedWAL.java
Mon Aug 22 23:06:52 2011
@@ -3,7 +3,6 @@ package org.apache.flume.durability;
 import java.io.File;
 import java.io.IOException;
 
-import org.apache.flume.durability.FileBasedWALManager.FileBasedWALWriter;
 import org.apache.flume.formatter.output.EventFormatter;
 import org.apache.flume.formatter.output.TextDelimitedOutputFormatter;
 import org.slf4j.Logger;

Modified: incubator/flume/branches/flume-728/flume-ng-core/src/main/java/org/apache/flume/durability/FileBasedWALManager.java
URL: http://svn.apache.org/viewvc/incubator/flume/branches/flume-728/flume-ng-core/src/main/java/org/apache/flume/durability/FileBasedWALManager.java?rev=1160490&r1=1160489&r2=1160490&view=diff
==============================================================================
--- incubator/flume/branches/flume-728/flume-ng-core/src/main/java/org/apache/flume/durability/FileBasedWALManager.java
(original)
+++ incubator/flume/branches/flume-728/flume-ng-core/src/main/java/org/apache/flume/durability/FileBasedWALManager.java
Mon Aug 22 23:06:52 2011
@@ -1,13 +1,6 @@
 package org.apache.flume.durability;
 
-import java.io.BufferedOutputStream;
 import java.io.File;
-import java.io.FileNotFoundException;
-import java.io.FileOutputStream;
-import java.io.IOException;
-
-import org.apache.flume.Event;
-import org.apache.flume.formatter.output.EventFormatter;
 
 public class FileBasedWALManager {
 
@@ -33,44 +26,4 @@ public class FileBasedWALManager {
     this.directory = directory;
   }
 
-  public static class FileBasedWALWriter {
-
-    private File file;
-    private BufferedOutputStream outputStream;
-    private EventFormatter formatter;
-
-    public void open() throws FileNotFoundException {
-      outputStream = new BufferedOutputStream(new FileOutputStream(file));
-    }
-
-    public void write(Event event) throws IOException {
-      outputStream.write(formatter.format(event));
-    }
-
-    public void close() throws IOException {
-      outputStream.close();
-    }
-
-    public void flush() throws IOException {
-      outputStream.flush();
-    }
-
-    public File getFile() {
-      return file;
-    }
-
-    public void setFile(File file) {
-      this.file = file;
-    }
-
-    public EventFormatter getFormatter() {
-      return formatter;
-    }
-
-    public void setFormatter(EventFormatter formatter) {
-      this.formatter = formatter;
-    }
-
-  }
-
 }

Added: incubator/flume/branches/flume-728/flume-ng-core/src/main/java/org/apache/flume/durability/FileBasedWALWriter.java
URL: http://svn.apache.org/viewvc/incubator/flume/branches/flume-728/flume-ng-core/src/main/java/org/apache/flume/durability/FileBasedWALWriter.java?rev=1160490&view=auto
==============================================================================
--- incubator/flume/branches/flume-728/flume-ng-core/src/main/java/org/apache/flume/durability/FileBasedWALWriter.java
(added)
+++ incubator/flume/branches/flume-728/flume-ng-core/src/main/java/org/apache/flume/durability/FileBasedWALWriter.java
Mon Aug 22 23:06:52 2011
@@ -0,0 +1,50 @@
+package org.apache.flume.durability;
+
+import java.io.BufferedOutputStream;
+import java.io.File;
+import java.io.FileNotFoundException;
+import java.io.FileOutputStream;
+import java.io.IOException;
+
+import org.apache.flume.Event;
+import org.apache.flume.formatter.output.EventFormatter;
+
+public class FileBasedWALWriter {
+
+  private File file;
+  private BufferedOutputStream outputStream;
+  private EventFormatter formatter;
+
+  public void open() throws FileNotFoundException {
+    outputStream = new BufferedOutputStream(new FileOutputStream(file));
+  }
+
+  public void write(Event event) throws IOException {
+    outputStream.write(formatter.format(event));
+  }
+
+  public void close() throws IOException {
+    outputStream.close();
+  }
+
+  public void flush() throws IOException {
+    outputStream.flush();
+  }
+
+  public File getFile() {
+    return file;
+  }
+
+  public void setFile(File file) {
+    this.file = file;
+  }
+
+  public EventFormatter getFormatter() {
+    return formatter;
+  }
+
+  public void setFormatter(EventFormatter formatter) {
+    this.formatter = formatter;
+  }
+
+}

Modified: incubator/flume/branches/flume-728/flume-ng-core/src/test/java/org/apache/flume/durability/TestFileBasedWALWriter.java
URL: http://svn.apache.org/viewvc/incubator/flume/branches/flume-728/flume-ng-core/src/test/java/org/apache/flume/durability/TestFileBasedWALWriter.java?rev=1160490&r1=1160489&r2=1160490&view=diff
==============================================================================
--- incubator/flume/branches/flume-728/flume-ng-core/src/test/java/org/apache/flume/durability/TestFileBasedWALWriter.java
(original)
+++ incubator/flume/branches/flume-728/flume-ng-core/src/test/java/org/apache/flume/durability/TestFileBasedWALWriter.java
Mon Aug 22 23:06:52 2011
@@ -6,7 +6,6 @@ import java.io.IOException;
 import junit.framework.Assert;
 
 import org.apache.flume.Event;
-import org.apache.flume.durability.FileBasedWALManager.FileBasedWALWriter;
 import org.apache.flume.event.SimpleEvent;
 import org.apache.flume.formatter.output.TextDelimitedOutputFormatter;
 import org.junit.After;



Mime
View raw message