flume-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From hshreedha...@apache.org
Subject svn commit: r1351964 - /incubator/flume/trunk/flume-ng-sinks/flume-hdfs-sink/src/main/java/org/apache/flume/sink/hdfs/HDFSWriterFactory.java
Date Wed, 20 Jun 2012 07:28:54 GMT
Author: hshreedharan
Date: Wed Jun 20 07:28:53 2012
New Revision: 1351964

URL: http://svn.apache.org/viewvc?rev=1351964&view=rev
Log:
FLUME-1290. HDFS Sink should accept fileType parameters of arbitrary case.

(Inder Singh via Hari Shreedharan)


Modified:
    incubator/flume/trunk/flume-ng-sinks/flume-hdfs-sink/src/main/java/org/apache/flume/sink/hdfs/HDFSWriterFactory.java

Modified: incubator/flume/trunk/flume-ng-sinks/flume-hdfs-sink/src/main/java/org/apache/flume/sink/hdfs/HDFSWriterFactory.java
URL: http://svn.apache.org/viewvc/incubator/flume/trunk/flume-ng-sinks/flume-hdfs-sink/src/main/java/org/apache/flume/sink/hdfs/HDFSWriterFactory.java?rev=1351964&r1=1351963&r2=1351964&view=diff
==============================================================================
--- incubator/flume/trunk/flume-ng-sinks/flume-hdfs-sink/src/main/java/org/apache/flume/sink/hdfs/HDFSWriterFactory.java
(original)
+++ incubator/flume/trunk/flume-ng-sinks/flume-hdfs-sink/src/main/java/org/apache/flume/sink/hdfs/HDFSWriterFactory.java
Wed Jun 20 07:28:53 2012
@@ -30,11 +30,11 @@ public class HDFSWriterFactory {
   }
 
   public HDFSWriter getWriter(String fileType) throws IOException {
-    if (fileType.equals(SequenceFileType)) {
+    if (fileType.equalsIgnoreCase(SequenceFileType)) {
       return new HDFSSequenceFile();
-    } else if (fileType.equals(DataStreamType)) {
+    } else if (fileType.equalsIgnoreCase(DataStreamType)) {
       return new HDFSDataStream();
-    } else if (fileType.equals(CompStreamType)) {
+    } else if (fileType.equalsIgnoreCase(CompStreamType)) {
       return new HDFSCompressedDataStream();
     } else {
       throw new IOException("File type " + fileType + " not supported");



Mime
View raw message