[ 
https://issues.apache.org/jira/browse/FLUME-2744?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel
 ]

YuanXiaoLong updated FLUME-2744:
--------------------------------
    Attachment: ResettableFileInputStream.java

Line 210 - 226

BEFORE:
// there may be a partial character in the decoder buffer
    } else {
      incrPosition(delta, false);
      return -1;
    }

AFTER:
// there may be a partial character in the decoder buffer
    } else {
      // modify by xiaolong.yuanxl 2015-07-14
      if(isEndOfInput) {
        incrPosition(delta, false);
        logger.info("End of File.");
        return -1;//end of file
      }else{
        incrPosition(1, false);
        logger.warn("May have special characters.");
        buf.clear();
        buf.flip();
        refillBuf();
        return 32;
      }
    }



> ResettableFileInputStream ignore partial character instead of stop read file
> ----------------------------------------------------------------------------
>
>                 Key: FLUME-2744
>                 URL: https://issues.apache.org/jira/browse/FLUME-2744
>             Project: Flume
>          Issue Type: New Feature
>          Components: Sinks+Sources
>         Environment: centos 6 
>            Reporter: YuanXiaoLong
>              Labels: patch
>         Attachments: ResettableFileInputStream.java
>
>
> ResettableFileInputStream read lines from file , some partial char in the 
> file,
> replace them blank space instead of stop read file (return -1)



--
This message was sent by Atlassian JIRA
(v6.3.4#6332)

Reply via email to