Repository: kafka
Updated Branches:
  refs/heads/trunk b62f8ea43 -> e90562fb1


MINOR: Fix FileStreamSourceTask to create the reader around System.in when 
using stdin as the input source.

Author: Ewen Cheslack-Postava <[email protected]>

Reviewers: Gwen Shapira

Closes #251 from ewencp/minor-fix-filestream-stdin-source


Project: http://git-wip-us.apache.org/repos/asf/kafka/repo
Commit: http://git-wip-us.apache.org/repos/asf/kafka/commit/e90562fb
Tree: http://git-wip-us.apache.org/repos/asf/kafka/tree/e90562fb
Diff: http://git-wip-us.apache.org/repos/asf/kafka/diff/e90562fb

Branch: refs/heads/trunk
Commit: e90562fb19996db901771ad9757d12b0a2f50f9e
Parents: b62f8ea
Author: Ewen Cheslack-Postava <[email protected]>
Authored: Mon Sep 28 05:46:09 2015 -0700
Committer: Gwen Shapira <[email protected]>
Committed: Mon Sep 28 05:46:09 2015 -0700

----------------------------------------------------------------------
 .../java/org/apache/kafka/copycat/file/FileStreamSourceTask.java    | 1 +
 1 file changed, 1 insertion(+)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/kafka/blob/e90562fb/copycat/file/src/main/java/org/apache/kafka/copycat/file/FileStreamSourceTask.java
----------------------------------------------------------------------
diff --git 
a/copycat/file/src/main/java/org/apache/kafka/copycat/file/FileStreamSourceTask.java
 
b/copycat/file/src/main/java/org/apache/kafka/copycat/file/FileStreamSourceTask.java
index 91292e9..cf71be3 100644
--- 
a/copycat/file/src/main/java/org/apache/kafka/copycat/file/FileStreamSourceTask.java
+++ 
b/copycat/file/src/main/java/org/apache/kafka/copycat/file/FileStreamSourceTask.java
@@ -52,6 +52,7 @@ public class FileStreamSourceTask extends SourceTask {
             stream = System.in;
             // Tracking offset for stdin doesn't make sense
             streamOffset = null;
+            reader = new BufferedReader(new InputStreamReader(stream));
         }
         topic = props.getProperty(FileStreamSourceConnector.TOPIC_CONFIG);
         if (topic == null)

Reply via email to