[ 
https://issues.apache.org/jira/browse/NIFI-2876?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=15880554#comment-15880554
 ] 

ASF GitHub Bot commented on NIFI-2876:
--------------------------------------

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

    https://github.com/apache/nifi/pull/1214#discussion_r102725986
  
    --- Diff: 
nifi-commons/nifi-utils/src/main/java/org/apache/nifi/stream/io/util/TextLineDemarcator.java
 ---
    @@ -95,52 +71,61 @@ public OffsetInfo nextOffsetInfo() {
          *
          * @return offset info
          */
    -    public OffsetInfo nextOffsetInfo(byte[] startsWith) {
    +    public OffsetInfo nextOffsetInfo(byte[] startsWith) throws IOException 
{
    --- End diff --
    
    I'm not sure that i understand the concept here of passing in a `byte[] 
startsWith`. The method returns an OffsetInfo regardless. Whether or not it 
starts with some arbitrary byte array seems like a very separate concern. Seems 
like that should be externalized and let the caller check if it starts with 
some pattern... or offering a `startsWith(byte[])` method on OffsetInfo?


> Refactor TextLineDemarcator and StreamDemarcator into a common abstract class
> -----------------------------------------------------------------------------
>
>                 Key: NIFI-2876
>                 URL: https://issues.apache.org/jira/browse/NIFI-2876
>             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
(v6.3.15#6346)

Reply via email to