You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@storm.apache.org by srdo <gi...@git.apache.org> on 2018/05/16 11:50:47 UTC

[GitHub] storm pull request #2633: STORM-3028 HdfsSpout: handle empty file in case of...

Github user srdo commented on a diff in the pull request:

    https://github.com/apache/storm/pull/2633#discussion_r188594538
  
    --- Diff: external/storm-hdfs/src/main/java/org/apache/storm/hdfs/spout/HdfsSpout.java ---
    @@ -221,14 +221,18 @@ public void nextTuple() {
             while (true) {
                 try {
                     // 3) Select a new file if one is not open already
    +                boolean newReader = false;
                     if (reader == null) {
                         reader = pickNextFile();
                         if (reader == null) {
                             LOG.debug("Currently no new files to process under : " + sourceDirPath);
                             return;
                         } else {
                             fileReadCompletely = false;
    +                        newReader = true;
                         }
    +                } else {
    +                    newReader = false;
    --- End diff --
    
    Nit: This branch is a no op, newReader is already false


---