[
https://issues.apache.org/jira/browse/FLUME-2215?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel
]
Alexandre Dutra updated FLUME-2215:
-----------------------------------
Attachment: FLUME-2215-1-README.txt
FLUME-2215-1.patch
FLUME-2215-0-README.txt
FLUME-2215-0.patch
I am attaching two patches against the current trunk that fix the bug.
# FLUME-2215-0.patch solves the issue with minimal changes;
# FLUME-2215-1.patch solves the issue in a more ambitious way.
Note to reviewers:
# Please _DO NOT_ apply both patches simultaneously, they are intended to be
applied alternatively;
# Please read files FLUME-2215-0-README.txt and FLUME-2215-1-README.txt for
guidelines and review instructions for both patches.
> ResettableFileInputStream can't support ucs-4 character
> --------------------------------------------------------
>
> Key: FLUME-2215
> URL: https://issues.apache.org/jira/browse/FLUME-2215
> Project: Flume
> Issue Type: Bug
> Affects Versions: v1.5.0
> Reporter: syntony liu
> Priority: Critical
> Attachments: FLUME-2215-0-README.txt, FLUME-2215-0.patch,
> FLUME-2215-1-README.txt, FLUME-2215-1.patch
>
>
> ResettableFileInputStream.java:readChar() not handle ucs-4 character. it need
> 2 charBuf. it cause an unexpected termination。
> a temporary solution:
> if (res.isOverflow() && !charBuf.hasRemaining()){
> logger.warn("decoder ucs-4 at postion: {}" , buf.position());
> tmpBuf.clear();
> res = decoder.decode(buf, tmpBuf, isEndOfInput);
> incrPosition( buf.position() - start, false);
> return '?';
> }
--
This message was sent by Atlassian JIRA
(v6.1.5#6160)