You are viewing a plain text version of this content. The canonical link for it is here.
Posted to issues@nifi.apache.org by markap14 <gi...@git.apache.org> on 2018/01/26 15:44:58 UTC

[GitHub] nifi pull request #2437: NIFI-4794: Updated event writers to avoid creating ...

GitHub user markap14 opened a pull request:

    https://github.com/apache/nifi/pull/2437

    NIFI-4794: Updated event writers to avoid creating a lot of byte[] by…

    … reusing buffers. Also removed synchronization on EventWriter when rolling over the writer and just moved the writing of the header to happen before making the writer available to any other threads. This reduces thread contention during rollover.
    
    Thank you for submitting a contribution to Apache NiFi.
    
    In order to streamline the review of the contribution we ask you
    to ensure the following steps have been taken:
    
    ### For all changes:
    - [ ] Is there a JIRA ticket associated with this PR? Is it referenced 
         in the commit message?
    
    - [ ] Does your PR title start with NIFI-XXXX where XXXX is the JIRA number you are trying to resolve? Pay particular attention to the hyphen "-" character.
    
    - [ ] Has your PR been rebased against the latest commit within the target branch (typically master)?
    
    - [ ] Is your initial contribution a single, squashed commit?
    
    ### For code changes:
    - [ ] Have you ensured that the full suite of tests is executed via mvn -Pcontrib-check clean install at the root nifi folder?
    - [ ] Have you written or updated unit tests to verify your changes?
    - [ ] If adding new dependencies to the code, are these dependencies licensed in a way that is compatible for inclusion under [ASF 2.0](http://www.apache.org/legal/resolved.html#category-a)? 
    - [ ] If applicable, have you updated the LICENSE file, including the main LICENSE file under nifi-assembly?
    - [ ] If applicable, have you updated the NOTICE file, including the main NOTICE file found under nifi-assembly?
    - [ ] If adding new Properties, have you added .displayName in addition to .name (programmatic access) for each of the new properties?
    
    ### For documentation related changes:
    - [ ] Have you ensured that format looks appropriate for the output in which it is rendered?
    
    ### Note:
    Please ensure that once the PR is submitted, you check travis-ci for build issues and submit an update to your PR as soon as possible.


You can merge this pull request into a Git repository by running:

    $ git pull https://github.com/markap14/nifi NIFI-4794

Alternatively you can review and apply these changes as the patch at:

    https://github.com/apache/nifi/pull/2437.patch

To close this pull request, make a commit to your master/trunk branch
with (at least) the following in the commit message:

    This closes #2437
    
----
commit 3bbd64bfebe81cb099a4b8017d839e591b3d9bc7
Author: Mark Payne <ma...@...>
Date:   2018-01-25T17:16:56Z

    NIFI-4794: Updated event writers to avoid creating a lot of byte[] by reusing buffers. Also removed synchronization on EventWriter when rolling over the writer and just moved the writing of the header to happen before making the writer available to any other threads. This reduces thread contention during rollover.

----


---

[GitHub] nifi issue #2437: NIFI-4794: Updated event writers to avoid creating a lot o...

Posted by mattyb149 <gi...@git.apache.org>.
Github user mattyb149 commented on the issue:

    https://github.com/apache/nifi/pull/2437
  
    +1 LGTM, ran unit tests and numerous flows on a running NiFi instance. I didn't do performance testing but did visually verify improvements in the code, and verified stability on the running instance. Thanks for the improvement! Merging to master


---

[GitHub] nifi pull request #2437: NIFI-4794: Updated event writers to avoid creating ...

Posted by asfgit <gi...@git.apache.org>.
Github user asfgit closed the pull request at:

    https://github.com/apache/nifi/pull/2437


---

[GitHub] nifi pull request #2437: NIFI-4794: Updated event writers to avoid creating ...

Posted by mattyb149 <gi...@git.apache.org>.
Github user mattyb149 commented on a diff in the pull request:

    https://github.com/apache/nifi/pull/2437#discussion_r166090089
  
    --- Diff: nifi-nar-bundles/nifi-provenance-repository-bundle/nifi-persistent-provenance-repository/src/main/java/org/apache/nifi/provenance/EncryptedSchemaRecordReader.java ---
    @@ -23,42 +23,29 @@
     import java.io.InputStream;
     import java.util.Collection;
     import java.util.Optional;
    -import java.util.concurrent.TimeUnit;
    +
     import org.apache.nifi.provenance.schema.LookupTableEventRecord;
     import org.apache.nifi.provenance.toc.TocReader;
     import org.apache.nifi.repository.schema.Record;
     import org.apache.nifi.stream.io.LimitingInputStream;
     import org.apache.nifi.stream.io.StreamUtils;
    -import org.apache.nifi.util.timebuffer.LongEntityAccess;
    -import org.apache.nifi.util.timebuffer.TimedBuffer;
    -import org.apache.nifi.util.timebuffer.TimestampedLong;
     import org.slf4j.Logger;
     import org.slf4j.LoggerFactory;
     
     public class EncryptedSchemaRecordReader extends EventIdFirstSchemaRecordReader {
         private static final Logger logger = LoggerFactory.getLogger(EncryptedSchemaRecordReader.class);
     
    -    private static final int DEFAULT_DEBUG_FREQUENCY = 1_000_000;
    --- End diff --
    
    Are changes to this file part of the PR? Doesn't seem like it. Or is it additional cleanup, or should it be restored?


---