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

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_r90785153
  
    --- 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 --
    
    actually i don't think it will break it.  however, we should take care to 
ensure we only create the buffer copy one time when we don't have to add the 
newline and twice when we do . Right now it would get done twice always as 
shown here
    
      
https://github.com/apache/nifi/blob/70ede6ecd97d344d9883a859dd4974141cba4224/nifi-nar-bundles/nifi-splunk-bundle/nifi-splunk-processors/src/main/java/org/apache/nifi/processors/splunk/PutSplunk.java#L188
    
    and here 
      
https://github.com/apache/nifi/blob/70ede6ecd97d344d9883a859dd4974141cba4224/nifi-nar-bundles/nifi-splunk-bundle/nifi-splunk-processors/src/main/java/org/apache/nifi/processors/splunk/PutSplunk.java#L201
    
    
    Thanks


> 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