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

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

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

    https://github.com/apache/nifi/pull/1295#discussion_r90784968
  
    --- Diff: 
nifi-nar-bundles/nifi-splunk-bundle/nifi-splunk-processors/src/main/java/org/apache/nifi/processors/splunk/PutSplunk.java
 ---
    @@ -185,7 +185,7 @@ public void process(final InputStream in) throws 
IOException {
             // if TCP and we don't end in a new line then add one
             final String protocol = context.getProperty(PROTOCOL).getValue();
             if (protocol.equals(TCP_VALUE.getValue())) {
    -            final byte[] buf = baos.getUnderlyingBuffer();
    +            final byte[] buf = baos.toByteArray();
    --- End diff --
    
    I think we need to get the buffer after we potentially change the newline.  
If we do this here then change the newline we won't see it since now we're 
getting a copy of the buffer instead of the actual underlying buffer.


> Consider deprecating org.apache.nifi.stream.io.ByteArrayOutputStream in favor 
> of jaba.io.ByteArrayOutputStream
> --------------------------------------------------------------------------------------------------------------
>
>                 Key: NIFI-3071
>                 URL: https://issues.apache.org/jira/browse/NIFI-3071
>             Project: Apache NiFi
>          Issue Type: Improvement
>    Affects Versions: 1.0.0
>            Reporter: Oleg Zhurakousky
>            Assignee: Mark Payne
>            Priority: Blocker
>             Fix For: 1.1.1
>
>
> I believe the "efficiency" statements need to be revisited. For example, 
> preliminary testing shows that there are no performance difference between 
> using the one provided with java.io.
>  



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

Reply via email to