nifi-issues mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "ASF GitHub Bot (JIRA)" <>
Subject [jira] [Commented] (NIFI-2876) Refactor TextLineDemarcator and StreamDemarcator into a common abstract class
Date Tue, 14 Feb 2017 18:50:41 GMT


ASF GitHub Bot commented on NIFI-2876:

Github user alopresto commented on a diff in the pull request:
    --- Diff: nifi-commons/nifi-utils/src/main/java/org/apache/nifi/stream/io/util/
    @@ -150,7 +126,15 @@ public OffsetInfo nextOffsetInfo(byte[] startsWith) {
             return offsetInfo;
    -    private int isEol(byte currentByte, int currentIndex) {
    +    /**
    +     * Checks if the 'currentByte' signifies the end of the text line (EOL);
    +     * that is if the current byte's value is '\n' or '\r'. When the
    +     * 'currentByte' is '\r' it will also check for the following byte to see if
    +     * it's '\n'. The returned integer value of this operation signifies how
    +     * many bytes represent the EOL and could only ever be 1 or 2 (if
    --- End diff --
    It could also be `0` to indicate it is not the end of line, correct?

> Refactor TextLineDemarcator and StreamDemarcator into a common abstract class
> -----------------------------------------------------------------------------
>                 Key: NIFI-2876
>                 URL:
>             Project: Apache NiFi
>          Issue Type: Improvement
>            Reporter: Oleg Zhurakousky
>            Assignee: Oleg Zhurakousky
>            Priority: Minor
>             Fix For: 1.2.0
> Based on the work that has been performed as part of the NIFI-2851 we now have a new
class with a significantly faster logic to perform demarcation of the InputStream (TextLineDemarcator).
This new class's initial starting point was the existing LineDemarcator. They both now share
~60-70% of common code which would be important to extract into a common abstract class as
well as incorporate the new (faster) demarcation logic int StreamDemarcator.

This message was sent by Atlassian JIRA

View raw message