Skip to content

NIFI-4774: Allow user to choose which write-ahead log implementation …#2487

Closed
markap14 wants to merge 1 commit intoapache:masterfrom
markap14:NIFI-4774-2
Closed

NIFI-4774: Allow user to choose which write-ahead log implementation …#2487
markap14 wants to merge 1 commit intoapache:masterfrom
markap14:NIFI-4774-2

Conversation

@markap14
Copy link
Contributor

…should be used by the WriteAheadFlowFileRepository

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?
  • 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.

…should be used by the WriteAheadFlowFileRepository
Copy link
Contributor

@mattyb149 mattyb149 left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I left a couple of minor comments that I can take care of during merge, I'll be testing in the meantime and will give others in the community time to try this out as well.

private static final String FLOWFILE_REPOSITORY_DIRECTORY_PREFIX = "nifi.flowfile.repository.directory";
private static final String WRITE_AHEAD_LOG_IMPL = "nifi.flowfile.repository.wal.implementation";

// TODO: Update Admin Guide
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I think this TODO is DONE :)

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Yup, this is done :) If you get a chance to merge, please delete the comment.

numPartitions = 0;
checkpointExecutor = null;
flowFileRepositoryPath = null;
walImplementation = null;
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Should this be DEFAULT_WAL_IMPLEMENTATION?

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

It doesn't really matter what it's set to - that constructor will only be used for service loading and no method in the class will ever be called.

@mosermw
Copy link
Member

mosermw commented Mar 6, 2018

I tested this and I was able to switch back and forth between MinimalLockingWriteAheadLog and SequentialAccessWriteAheadLog. +1 from me.
It's best to make this switch while there are 0 flowfiles in the repository. With flowfiles in the system, going from MinimalLockingWAL to SequantialAccessWAL worked, but the opposite had some issues.

@mosermw
Copy link
Member

mosermw commented Mar 13, 2018

@mattyb149 and @markap14 with the 1.6.0 release approaching, do you think we've allowed enough time for review and testing? Is this good to go? Thanks.

@mattyb149
Copy link
Contributor

+1 LGTM, I tested switching back and forth and everything looks good. Thanks for the improvement! Merging to master

@asfgit asfgit closed this in d14229e Mar 13, 2018
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants