[
https://issues.apache.org/jira/browse/NIFI-1680?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=15290938#comment-15290938
]
ASF subversion and git services commented on NIFI-1680:
-------------------------------------------------------
Commit 2d03489ec5dbc56bcb0dbd7b694cdf030d2532a5 in nifi's branch
refs/heads/master from [~ozhurakousky]
[ https://git-wip-us.apache.org/repos/asf?p=nifi.git;h=2d03489 ]
NIFI-1296, NIFI-1680, NIFI-1764, NIFI-1837, NIFI-1827, NIFI-1699 implemented
new Kafka processors that leverage Kafka 0.9 API
- Improved StreamScanner for better performance
- Renamed StreamScanner to StreamDemarcator as suggested by Joe
- Added failure handling logic to ensure both processors can be reset to their
initial state (as if they were just started)
- Provided comprehensive test suite to validate various aspects of both Publish
and Consume from Kafka
- Added relevant javadocs
- Added initial additionalDetails docs
- Addressed NPE reported by NIFI-1764
- Life-cycle refactoring for the existing PutKafka to ensure producer restart
after errors
- Incorporated code changes contributed by Ralph Perko (see NIFI-1837)
- Addressed partition issue in RoundRobinPartitioner discussed in NIFI-1827
- Updated PropertyDescriptor descriptions to reflect their purpose
NIFI-1296 added @Ignore on some Kafka tests to improve test time
NIFI-1296 reworked tests to avoid dependency on embedded Kafka
NIFI-1296 fixed spelling error
NIFI-1296 fixed trailing whitespaces in non-java files
This closes #366
> Improve StreamScanner performance
> ---------------------------------
>
> Key: NIFI-1680
> URL: https://issues.apache.org/jira/browse/NIFI-1680
> Project: Apache NiFi
> Issue Type: Improvement
> Reporter: Oleg Zhurakousky
> Assignee: Oleg Zhurakousky
> Fix For: 1.0.0, 0.7.0
>
>
> We have several use cases where a content of a single FlowFile is split
> within a single cycle (i.e., _onTrigger()_). An example is PutKafka.
> Such splitting involves parsing of a content InputStream into chunks
> represented as byte[]. Currently we are using custom buffer
> (_org.apache.nifi.stream.io.util.StreamScanner_) to build byte[].
> There are several potential areas of improvement here:
> 1. Perform internal buffering instead of using ByteArrayInputStream and copy
> bytes into byte array(the bytes that are already in the buffer of
> ByteArrayInputStream)
> 2. The buffer itself is allocated on the heap. We can consider using
> DirectBuffer (as optional flag)
> 3. Consider buffer pool where new instance of StreamScanner can pool work
> buffer from such pol instead of allocating new one.
> The #1 is by far the most important as it shows (in my test environment) 6
> times performance improvement over the current implementation of
> StreamScanner and 1.5 times performance improvement over
> _java.io.BufferedReader_ which only supports implicit new line delimiter and
> was used only for comparison.
--
This message was sent by Atlassian JIRA
(v6.3.4#6332)