-
Notifications
You must be signed in to change notification settings - Fork 2.6k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
NIFI-12017 add ability to choose to output to single line for base32 base64 contents #8417
Conversation
FYI: @exceptionfactory @dan-s1 |
...dard-processors/src/main/java/org/apache/nifi/processors/standard/encoding/EncodingMode.java
Outdated
Show resolved
Hide resolved
Update nifi-nar-bundles/nifi-standard-bundle/nifi-standard-processors/src/main/java/org/apache/nifi/processors/standard/encoding/EncodingMode.java Co-authored-by: dan-s1 <dstieg1@gmail.com> Simplify if logic, simplify enum expression
7f97614
to
f07f292
Compare
@knguyen1 It looks like there are Checkstyle violations that must be corrected. |
@dan-s1 I just realised our change to
It's because we're using |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
The suggested changes addresses your latest question
...ifi-standard-processors/src/main/java/org/apache/nifi/processors/standard/EncodeContent.java
Outdated
Show resolved
Hide resolved
...ifi-standard-processors/src/main/java/org/apache/nifi/processors/standard/EncodeContent.java
Outdated
Show resolved
Hide resolved
Fixes backward-compatibility issue, earlier proc uses `base32`, `base64`, `hex`, etc. as string. Co-authored-by: dan-s1 <dstieg1@gmail.com>
...ifi-standard-processors/src/main/java/org/apache/nifi/processors/standard/EncodeContent.java
Outdated
Show resolved
Hide resolved
…/src/main/java/org/apache/nifi/processors/standard/EncodeContent.java Co-authored-by: dan-s1 <dstieg1@gmail.com>
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Hopefully we are getting closer. I still need to look over the unit tests but here are some formatting suggestions. Now with Junit5 none of the test methods need to be public so the public
modifier should be removed from the tests similar to the ones you added. In addition the standard in the code base is to have the @Test
annotation above the test method signature so most of the current suggestions are to align with that . Thanks!
...ifi-standard-processors/src/main/java/org/apache/nifi/processors/standard/EncodeContent.java
Outdated
Show resolved
Hide resolved
...ifi-standard-processors/src/main/java/org/apache/nifi/processors/standard/EncodeContent.java
Outdated
Show resolved
Hide resolved
...ifi-standard-processors/src/main/java/org/apache/nifi/processors/standard/EncodeContent.java
Outdated
Show resolved
Hide resolved
...standard-processors/src/test/java/org/apache/nifi/processors/standard/TestEncodeContent.java
Outdated
Show resolved
Hide resolved
...standard-processors/src/test/java/org/apache/nifi/processors/standard/TestEncodeContent.java
Outdated
Show resolved
Hide resolved
...standard-processors/src/test/java/org/apache/nifi/processors/standard/TestEncodeContent.java
Outdated
Show resolved
Hide resolved
...standard-processors/src/test/java/org/apache/nifi/processors/standard/TestEncodeContent.java
Outdated
Show resolved
Hide resolved
...standard-processors/src/test/java/org/apache/nifi/processors/standard/TestEncodeContent.java
Outdated
Show resolved
Hide resolved
...ifi-standard-processors/src/main/java/org/apache/nifi/processors/standard/EncodeContent.java
Outdated
Show resolved
Hide resolved
...standard-processors/src/test/java/org/apache/nifi/processors/standard/TestEncodeContent.java
Outdated
Show resolved
Hide resolved
...standard-processors/src/test/java/org/apache/nifi/processors/standard/TestEncodeContent.java
Show resolved
Hide resolved
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Further suggestions to refactor the multiple unit test into single parameterized tests.
...standard-processors/src/test/java/org/apache/nifi/processors/standard/TestEncodeContent.java
Outdated
Show resolved
Hide resolved
...standard-processors/src/test/java/org/apache/nifi/processors/standard/TestEncodeContent.java
Outdated
Show resolved
Hide resolved
...standard-processors/src/test/java/org/apache/nifi/processors/standard/TestEncodeContent.java
Outdated
Show resolved
Hide resolved
...standard-processors/src/test/java/org/apache/nifi/processors/standard/TestEncodeContent.java
Outdated
Show resolved
Hide resolved
...standard-processors/src/test/java/org/apache/nifi/processors/standard/TestEncodeContent.java
Outdated
Show resolved
Hide resolved
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
A few more things which should be changed.
...ifi-standard-processors/src/main/java/org/apache/nifi/processors/standard/EncodeContent.java
Outdated
Show resolved
Hide resolved
...ifi-standard-processors/src/main/java/org/apache/nifi/processors/standard/EncodeContent.java
Outdated
Show resolved
Hide resolved
...ifi-standard-processors/src/main/java/org/apache/nifi/processors/standard/EncodeContent.java
Outdated
Show resolved
Hide resolved
...ifi-standard-processors/src/main/java/org/apache/nifi/processors/standard/EncodeContent.java
Outdated
Show resolved
Hide resolved
...standard-processors/src/test/java/org/apache/nifi/processors/standard/TestEncodeContent.java
Outdated
Show resolved
Hide resolved
...standard-processors/src/test/java/org/apache/nifi/processors/standard/TestEncodeContent.java
Outdated
Show resolved
Hide resolved
...standard-processors/src/test/java/org/apache/nifi/processors/standard/TestEncodeContent.java
Outdated
Show resolved
Hide resolved
...standard-processors/src/test/java/org/apache/nifi/processors/standard/TestEncodeContent.java
Outdated
Show resolved
Hide resolved
...standard-processors/src/test/java/org/apache/nifi/processors/standard/TestEncodeContent.java
Outdated
Show resolved
Hide resolved
...ifi-standard-processors/src/main/java/org/apache/nifi/processors/standard/EncodeContent.java
Outdated
Show resolved
Hide resolved
Co-authored-by: dan-s1 <dstieg1@gmail.com>
@exceptionfactory When you get a chance can you please check things over to see if all necessary changes were made? Thanks! |
...ifi-standard-processors/src/main/java/org/apache/nifi/processors/standard/EncodeContent.java
Outdated
Show resolved
Hide resolved
...ifi-standard-processors/src/main/java/org/apache/nifi/processors/standard/EncodeContent.java
Outdated
Show resolved
Hide resolved
Co-authored-by: dan-s1 <dstieg1@gmail.com>
...ifi-standard-processors/src/main/java/org/apache/nifi/processors/standard/EncodeContent.java
Outdated
Show resolved
Hide resolved
Co-authored-by: dan-s1 <dstieg1@gmail.com>
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Thanks for the work on these new properties @knguyen1, and thanks for the feedback thus far @dan-s1.
The general capability is useful, but there are still several refinements needed to maintain backward compatibility. I also recommended a few documentation changes. One particular note is the Line Separator property, which seems unnecessary in general. Unless there is a strong reason to support either LF or CRLF, just using LF across the board seems simpler. Sometimes less is more when it comes to configuration, but feel free to provide more details.
...dard-processors/src/main/java/org/apache/nifi/processors/standard/encoding/EncodingMode.java
Outdated
Show resolved
Hide resolved
...dard-processors/src/main/java/org/apache/nifi/processors/standard/encoding/EncodingMode.java
Outdated
Show resolved
Hide resolved
...dard-processors/src/main/java/org/apache/nifi/processors/standard/encoding/EncodingType.java
Outdated
Show resolved
Hide resolved
...dard-processors/src/main/java/org/apache/nifi/processors/standard/encoding/EncodingType.java
Outdated
Show resolved
Hide resolved
...dard-processors/src/main/java/org/apache/nifi/processors/standard/encoding/EncodingType.java
Outdated
Show resolved
Hide resolved
...dard-processors/src/main/java/org/apache/nifi/processors/standard/encoding/EncodingType.java
Outdated
Show resolved
Hide resolved
...ifi-standard-processors/src/main/java/org/apache/nifi/processors/standard/EncodeContent.java
Outdated
Show resolved
Hide resolved
...ifi-standard-processors/src/main/java/org/apache/nifi/processors/standard/EncodeContent.java
Outdated
Show resolved
Hide resolved
...ifi-standard-processors/src/main/java/org/apache/nifi/processors/standard/EncodeContent.java
Outdated
Show resolved
Hide resolved
...ifi-standard-processors/src/main/java/org/apache/nifi/processors/standard/EncodeContent.java
Outdated
Show resolved
Hide resolved
Co-authored-by: David Handermann <exceptionfactory@apache.org>
ecc3263
to
229dc0c
Compare
Co-authored-by: David Handermann <exceptionfactory@apache.org>
…le-line-for-base32-base64-contents' of github.com:knguyen1/nifi into feat/NIFI-12017/add-ability-to-choose-to-output-to-single-line-for-base32-base64-contents
I fixed failing tests and build failures from the latest code review. Everything's passing now. @exceptionfactory I had to add this method: Latest is pending the resolution of comments regarding.
I have left those threads unresolved. |
...ifi-standard-processors/src/main/java/org/apache/nifi/processors/standard/EncodeContent.java
Outdated
Show resolved
Hide resolved
...ifi-standard-processors/src/main/java/org/apache/nifi/processors/standard/EncodeContent.java
Outdated
Show resolved
Hide resolved
Co-authored-by: dan-s1 <dstieg1@gmail.com>
...ifi-standard-processors/src/main/java/org/apache/nifi/processors/standard/EncodeContent.java
Outdated
Show resolved
Hide resolved
...ifi-standard-processors/src/main/java/org/apache/nifi/processors/standard/EncodeContent.java
Outdated
Show resolved
Hide resolved
Co-authored-by: dan-s1 <dstieg1@gmail.com>
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Thanks for updating the property values @knguyen1.
The last remaining item to change is the Encoded Content Line Separator
property. I recommend removing the property and using a hard-coded \n
value so that the behavior is the same regardless of the operating system on which NiFi is running.
...dard-processors/src/main/java/org/apache/nifi/processors/standard/encoding/EncodingMode.java
Outdated
Show resolved
Hide resolved
- Set positive integer validator for Encoded Line Length
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Thanks for working through the feedback @knguyen1. After one more runtime review, I adjusted the new properties to be required, since the default values align with current behavior. I also set the Encoded Line Length
property to use the Positive Integer Validator, ensuring that the value will never be zero or lower.
With these changes, I plan to merge soon, pending one more successful build.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Thanks again for taking the time to work through all the feedback @knguyen1! +1 merging
Thanks for the reviews as well @dan-s1! |
Summary
NIFI-12017
Tracking
Please complete the following tracking steps prior to pull request creation.
Issue Tracking
Pull Request Tracking
NIFI-00000
NIFI-00000
Pull Request Formatting
main
branchVerification
Please indicate the verification steps performed prior to pull request creation.
Build
mvn clean install -P contrib-check
Licensing
LICENSE
andNOTICE
filesDocumentation