You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@flume.apache.org by es...@apache.org on 2011/12/21 07:20:19 UTC
svn commit: r1221626 -
/incubator/flume/branches/flume-728/flume-ng-sinks/flume-hdfs-sink/src/main/java/org/apache/flume/sink/hdfs/HDFSFormatterFactory.java
Author: esammer
Date: Wed Dec 21 06:20:19 2011
New Revision: 1221626
URL: http://svn.apache.org/viewvc?rev=1221626&view=rev
Log:
FLUME-880: HDFSFormatterFactory is using == operator for String objects
(Jarek Jarcec Cecho via E. Sammer)
Modified:
incubator/flume/branches/flume-728/flume-ng-sinks/flume-hdfs-sink/src/main/java/org/apache/flume/sink/hdfs/HDFSFormatterFactory.java
Modified: incubator/flume/branches/flume-728/flume-ng-sinks/flume-hdfs-sink/src/main/java/org/apache/flume/sink/hdfs/HDFSFormatterFactory.java
URL: http://svn.apache.org/viewvc/incubator/flume/branches/flume-728/flume-ng-sinks/flume-hdfs-sink/src/main/java/org/apache/flume/sink/hdfs/HDFSFormatterFactory.java?rev=1221626&r1=1221625&r2=1221626&view=diff
==============================================================================
--- incubator/flume/branches/flume-728/flume-ng-sinks/flume-hdfs-sink/src/main/java/org/apache/flume/sink/hdfs/HDFSFormatterFactory.java (original)
+++ incubator/flume/branches/flume-728/flume-ng-sinks/flume-hdfs-sink/src/main/java/org/apache/flume/sink/hdfs/HDFSFormatterFactory.java Wed Dec 21 06:20:19 2011
@@ -33,12 +33,12 @@ public class HDFSFormatterFactory {
static final String hdfsTextFormat = "Text";
static FlumeFormatter getFormatter(String formatType) throws IOException {
- if (formatType == hdfsWritableFormat) {
+ if (formatType.equalsIgnoreCase(hdfsWritableFormat)) {
return new HDFSWritableFormatter();
- } else if (formatType == hdfsTextFormat) {
+ } else if (formatType.equalsIgnoreCase(hdfsTextFormat)) {
return new HDFSTextFormatter();
- } else
- throw new IOException("Incorrect formatter type");
+ } else {
+ throw new IOException("Incorrect formatter type: " + formatType);
+ }
}
-
}