You are viewing a plain text version of this content. The canonical link for it is here.
Posted to issues@nifi.apache.org by "knguyen1 (via GitHub)" <gi...@apache.org> on 2023/11/16 14:15:02 UTC
[PR] NIFI 12017 add ability to choose to output to single line for base32 base64 contents [nifi]
knguyen1 opened a new pull request, #8038:
URL: https://github.com/apache/nifi/pull/8038
<!-- Licensed to the Apache Software Foundation (ASF) under one or more -->
<!-- contributor license agreements. See the NOTICE file distributed with -->
<!-- this work for additional information regarding copyright ownership. -->
<!-- The ASF licenses this file to You under the Apache License, Version 2.0 -->
<!-- (the "License"); you may not use this file except in compliance with -->
<!-- the License. You may obtain a copy of the License at -->
<!-- http://www.apache.org/licenses/LICENSE-2.0 -->
<!-- Unless required by applicable law or agreed to in writing, software -->
<!-- distributed under the License is distributed on an "AS IS" BASIS, -->
<!-- WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -->
<!-- See the License for the specific language governing permissions and -->
<!-- limitations under the License. -->
# Summary
[NIFI-12017](https://issues.apache.org/jira/browse/NIFI-12017)
# Tracking
Please complete the following tracking steps prior to pull request creation.
### Issue Tracking
- [x ] [Apache NiFi Jira](https://issues.apache.org/jira/browse/NIFI) issue created
### Pull Request Tracking
- [x] Pull Request title starts with Apache NiFi Jira issue number, such as `NIFI-00000`
- [x] Pull Request commit message starts with Apache NiFi Jira issue number, as such `NIFI-00000`
### Pull Request Formatting
- [x] Pull Request based on current revision of the `main` branch
- [x] Pull Request refers to a feature branch with one commit containing changes
# Verification
Please indicate the verification steps performed prior to pull request creation.
### Build
- [x] Build completed using `mvn clean install -P contrib-check`
- [x] JDK 21
### Licensing
- [x] New dependencies are compatible with the [Apache License 2.0](https://apache.org/licenses/LICENSE-2.0) according to the [License Policy](https://www.apache.org/legal/resolved.html)
- [x] New dependencies are documented in applicable `LICENSE` and `NOTICE` files
### Documentation
- [x] Documentation formatting appears as expected in rendered files
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: issues-unsubscribe@nifi.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
Re: [PR] NIFI-12017 add ability to choose to output to single line for base32 base64 contents [nifi]
Posted by "dan-s1 (via GitHub)" <gi...@apache.org>.
dan-s1 commented on code in PR #8038:
URL: https://github.com/apache/nifi/pull/8038#discussion_r1439066743
##########
nifi-nar-bundles/nifi-standard-bundle/nifi-standard-processors/src/main/java/org/apache/nifi/processors/standard/EncodeContent.java:
##########
@@ -55,27 +59,105 @@
@CapabilityDescription("Encode or decode the contents of a FlowFile using Base64, Base32, or hex encoding schemes")
public class EncodeContent extends AbstractProcessor {
- public static final String ENCODE_MODE = "Encode";
- public static final String DECODE_MODE = "Decode";
-
- public static final String BASE64_ENCODING = "base64";
- public static final String BASE32_ENCODING = "base32";
- public static final String HEX_ENCODING = "hex";
+ public static final AllowableValue ENCODE_MODE = new AllowableValue("encode", "Encode", "Sets the operation mode to 'encode'.");
+ public static final AllowableValue DECODE_MODE = new AllowableValue("decode", "Decode", "Sets the operation mode to 'decoding'.");
+
+ public static final AllowableValue BASE64_ENCODING = new AllowableValue("base64", "Base64", "Sets the encoding type to 'Base64'.");
+ public static final AllowableValue BASE32_ENCODING = new AllowableValue("base32", "Base32", "Sets the encoding type to 'Base32'.");
+ public static final AllowableValue HEX_ENCODING = new AllowableValue("hex", "Hexadecimal", "Sets the encoding type to 'Hexadecimal'.");
+
+ /**
+ * Represents an allowable value that indicates the encoded FlowFile content should be output as a single line.
+ * When this value is set, the encoded content will not contain any line breaks or newlines, ensuring
+ * that the entire content is presented in a single, continuous line.
+ * <p>
+ * This value is particularly useful in scenarios where multiline output is not desired or could lead to issues,
+ * such as in certain data formats or when interfacing with systems that expect single-line input.
+ * </p>
+ */
+ static final AllowableValue SINGLE_LINE_OUTPUT_TRUE = new AllowableValue("true", "True", "The encoded FlowFile content will be output as a single line.");
+
+
+ /**
+ * Represents an allowable value that indicates the encoded FlowFile content should be output as multiple lines.
+ * When this value is set, the encoded content will include appropriate line breaks or newlines, breaking
+ * the content into separate lines as required.
+ * <p>
+ * This setting is useful in scenarios where multi-line formatting is necessary or preferred, such as for
+ * improved readability, adherence to specific data formats, or compatibility with systems and tools that
+ * process multi-line input.
+ * </p>
+ */
+ static final AllowableValue SINGLE_LINE_OUTPUT_FALSE = new AllowableValue("false", "False", "The encoded FlowFile content will be output as a multiple lines.");
public static final PropertyDescriptor MODE = new PropertyDescriptor.Builder()
.name("Mode")
.description("Specifies whether the content should be encoded or decoded")
.required(true)
.allowableValues(ENCODE_MODE, DECODE_MODE)
- .defaultValue(ENCODE_MODE)
+ .defaultValue(ENCODE_MODE.getValue())
.build();
public static final PropertyDescriptor ENCODING = new PropertyDescriptor.Builder()
.name("Encoding")
.description("Specifies the type of encoding used")
.required(true)
.allowableValues(BASE64_ENCODING, BASE32_ENCODING, HEX_ENCODING)
- .defaultValue(BASE64_ENCODING)
+ .defaultValue(BASE64_ENCODING.getValue())
+ .build();
+
+ // A Boolean property descriptor that allows the user
+ // to choose if the output to encoded FlowFile content should be to a single line or multiple lines.
Review Comment:
```suggestion
```
The description has this already making this comment unnecessary.
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: issues-unsubscribe@nifi.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
Re: [PR] NIFI-12017 add ability to choose to output to single line for base32 base64 contents [nifi]
Posted by "knguyen1 (via GitHub)" <gi...@apache.org>.
knguyen1 commented on PR #8038:
URL: https://github.com/apache/nifi/pull/8038#issuecomment-1947152587
I opened the PR at: https://github.com/apache/nifi/pull/8417 @exceptionfactory
I didn't see a button to re-open this one.
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: issues-unsubscribe@nifi.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
Re: [PR] NIFI-12017 add ability to choose to output to single line for base32 base64 contents [nifi]
Posted by "knguyen1 (via GitHub)" <gi...@apache.org>.
knguyen1 commented on code in PR #8038:
URL: https://github.com/apache/nifi/pull/8038#discussion_r1491467598
##########
nifi-nar-bundles/nifi-standard-bundle/nifi-standard-processors/src/main/java/org/apache/nifi/processors/standard/EncodeContent.java:
##########
@@ -112,11 +194,27 @@ public void onTrigger(final ProcessContext context, final ProcessSession session
return;
}
- final boolean encode = context.getProperty(MODE).getValue().equalsIgnoreCase(ENCODE_MODE);
+ // Decide if we should fail on 0-length content
+ final Boolean failOnZeroLengthContent = context.getProperty(FAIL_ON_ZERO_LENGTH_CONTENT).asBoolean();
Review Comment:
`FAIL_ON_ZERO_LENGTH_CONTENT` is removed as per @exceptionfactory 's suggestion
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: issues-unsubscribe@nifi.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
Re: [PR] NIFI-12017 add ability to choose to output to single line for base32 base64 contents [nifi]
Posted by "dan-s1 (via GitHub)" <gi...@apache.org>.
dan-s1 commented on code in PR #8038:
URL: https://github.com/apache/nifi/pull/8038#discussion_r1439063442
##########
nifi-nar-bundles/nifi-standard-bundle/nifi-standard-processors/src/main/java/org/apache/nifi/processors/standard/EncodeContent.java:
##########
@@ -112,11 +194,27 @@ public void onTrigger(final ProcessContext context, final ProcessSession session
return;
}
- final boolean encode = context.getProperty(MODE).getValue().equalsIgnoreCase(ENCODE_MODE);
+ // Decide if we should fail on 0-length content
+ final Boolean failOnZeroLengthContent = context.getProperty(FAIL_ON_ZERO_LENGTH_CONTENT).asBoolean();
+
+ final boolean encode = context.getProperty(MODE).getValue().equalsIgnoreCase(ENCODE_MODE.getValue());
final String encoding = context.getProperty(ENCODING).getValue();
- final StreamCallback callback = getStreamCallback(encode, encoding);
+
+ final Boolean singleLineOutput = context.getProperty(SINGLE_LINE_OUTPUT).asBoolean();
+ final Integer lineLength = context.getProperty(ENCODED_LINE_LENGTH).evaluateAttributeExpressions(flowFile).asInteger();
+ final String lineSeparator = context.getProperty(ENCODED_LINE_SEPARATOR).evaluateAttributeExpressions(flowFile).getValue();
+
+ final StreamCallback callback = getStreamCallback(encode, encoding, Boolean.TRUE.equals(singleLineOutput) ? -1 : lineLength, lineSeparator);
try {
+ // If flowFile content is null, transfer based on FAIL_ON_ZERO_LENGTH_CONTENT property
+ if (flowFile.getSize() == 0) {
+ if (Boolean.TRUE.equals(failOnZeroLengthContent)) session.transfer(flowFile, REL_FAILURE);
+ else session.transfer(flowFile, REL_SUCCESS);
Review Comment:
```suggestion
if (failOnZeroLengthContent) {
session.transfer(flowFile, REL_FAILURE);
} else {
session.transfer(flowFile, REL_SUCCESS);
}
```
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: issues-unsubscribe@nifi.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
Re: [PR] NIFI-12017 add ability to choose to output to single line for base32 base64 contents [nifi]
Posted by "dan-s1 (via GitHub)" <gi...@apache.org>.
dan-s1 commented on code in PR #8038:
URL: https://github.com/apache/nifi/pull/8038#discussion_r1439065745
##########
nifi-nar-bundles/nifi-standard-bundle/nifi-standard-processors/src/main/java/org/apache/nifi/processors/standard/EncodeContent.java:
##########
@@ -151,9 +250,21 @@ private static StreamCallback getStreamCallback(final boolean encode, final Stri
private static class EncodeBase64 implements StreamCallback {
+ private int lineLength;
+ private String lineSeparator;
+
+ public EncodeBase64(final Integer lineLength,
Review Comment:
```suggestion
public EncodeBase64(final int lineLength,
```
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: issues-unsubscribe@nifi.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
Re: [PR] NIFI-12017 add ability to choose to output to single line for base32 base64 contents [nifi]
Posted by "dan-s1 (via GitHub)" <gi...@apache.org>.
dan-s1 commented on code in PR #8038:
URL: https://github.com/apache/nifi/pull/8038#discussion_r1439064848
##########
nifi-nar-bundles/nifi-standard-bundle/nifi-standard-processors/src/main/java/org/apache/nifi/processors/standard/EncodeContent.java:
##########
@@ -112,11 +194,27 @@ public void onTrigger(final ProcessContext context, final ProcessSession session
return;
}
- final boolean encode = context.getProperty(MODE).getValue().equalsIgnoreCase(ENCODE_MODE);
+ // Decide if we should fail on 0-length content
+ final Boolean failOnZeroLengthContent = context.getProperty(FAIL_ON_ZERO_LENGTH_CONTENT).asBoolean();
+
+ final boolean encode = context.getProperty(MODE).getValue().equalsIgnoreCase(ENCODE_MODE.getValue());
final String encoding = context.getProperty(ENCODING).getValue();
- final StreamCallback callback = getStreamCallback(encode, encoding);
+
+ final Boolean singleLineOutput = context.getProperty(SINGLE_LINE_OUTPUT).asBoolean();
+ final Integer lineLength = context.getProperty(ENCODED_LINE_LENGTH).evaluateAttributeExpressions(flowFile).asInteger();
+ final String lineSeparator = context.getProperty(ENCODED_LINE_SEPARATOR).evaluateAttributeExpressions(flowFile).getValue();
+
+ final StreamCallback callback = getStreamCallback(encode, encoding, Boolean.TRUE.equals(singleLineOutput) ? -1 : lineLength, lineSeparator);
Review Comment:
I am not sure its a major saving but changing this to an int and in the other places I suggested would reduce the autoboxing conversion to only one time in this statement.
```suggestion
final int lineLength = singleLineOutput ? -1 : context.getProperty(ENCODED_LINE_LENGTH).evaluateAttributeExpressions(flowFile).asInteger();
final String lineSeparator = context.getProperty(ENCODED_LINE_SEPARATOR).evaluateAttributeExpressions(flowFile).getValue();
final StreamCallback callback = getStreamCallback(encode, encoding, lineLength, lineSeparator);
```
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: issues-unsubscribe@nifi.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
Re: [PR] NIFI-12017 add ability to choose to output to single line for base32 base64 contents [nifi]
Posted by "dan-s1 (via GitHub)" <gi...@apache.org>.
dan-s1 commented on code in PR #8038:
URL: https://github.com/apache/nifi/pull/8038#discussion_r1439065672
##########
nifi-nar-bundles/nifi-standard-bundle/nifi-standard-processors/src/main/java/org/apache/nifi/processors/standard/EncodeContent.java:
##########
@@ -129,19 +227,20 @@ public void onTrigger(final ProcessContext context, final ProcessSession session
}
}
- private static StreamCallback getStreamCallback(final boolean encode, final String encoding) {
- if (encode) {
- if (encoding.equalsIgnoreCase(BASE64_ENCODING)) {
- return new EncodeBase64();
- } else if (encoding.equalsIgnoreCase(BASE32_ENCODING)) {
- return new EncodeBase32();
+ private static StreamCallback getStreamCallback(final Boolean encode, final String encoding,
+ final Integer lineLength, final String lineSeparator) {
+ if (Boolean.TRUE.equals(encode)) {
+ if (encoding.equalsIgnoreCase(BASE64_ENCODING.getValue())) {
Review Comment:
```suggestion
private static StreamCallback getStreamCallback(final boolean encode, final String encoding,
final int lineLength, final String lineSeparator) {
if (encode) {
if (encoding.equalsIgnoreCase(BASE64_ENCODING.getValue())) {
```
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: issues-unsubscribe@nifi.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
Re: [PR] NIFI-12017 add ability to choose to output to single line for base32 base64 contents [nifi]
Posted by "dan-s1 (via GitHub)" <gi...@apache.org>.
dan-s1 commented on code in PR #8038:
URL: https://github.com/apache/nifi/pull/8038#discussion_r1439063550
##########
nifi-nar-bundles/nifi-standard-bundle/nifi-standard-processors/src/main/java/org/apache/nifi/processors/standard/EncodeContent.java:
##########
@@ -129,19 +227,20 @@ public void onTrigger(final ProcessContext context, final ProcessSession session
}
}
- private static StreamCallback getStreamCallback(final boolean encode, final String encoding) {
- if (encode) {
- if (encoding.equalsIgnoreCase(BASE64_ENCODING)) {
- return new EncodeBase64();
- } else if (encoding.equalsIgnoreCase(BASE32_ENCODING)) {
- return new EncodeBase32();
+ private static StreamCallback getStreamCallback(final Boolean encode, final String encoding,
+ final Integer lineLength, final String lineSeparator) {
+ if (Boolean.TRUE.equals(encode)) {
Review Comment:
```suggestion
private static StreamCallback getStreamCallback(final boolean encode, final String encoding,
final Integer lineLength, final String lineSeparator) {
if (encode) {
```
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: issues-unsubscribe@nifi.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
Re: [PR] NIFI-12017 add ability to choose to output to single line for base32 base64 contents [nifi]
Posted by "dan-s1 (via GitHub)" <gi...@apache.org>.
dan-s1 commented on code in PR #8038:
URL: https://github.com/apache/nifi/pull/8038#discussion_r1439062586
##########
nifi-nar-bundles/nifi-standard-bundle/nifi-standard-processors/src/main/java/org/apache/nifi/processors/standard/EncodeContent.java:
##########
@@ -55,27 +59,105 @@
@CapabilityDescription("Encode or decode the contents of a FlowFile using Base64, Base32, or hex encoding schemes")
public class EncodeContent extends AbstractProcessor {
- public static final String ENCODE_MODE = "Encode";
- public static final String DECODE_MODE = "Decode";
-
- public static final String BASE64_ENCODING = "base64";
- public static final String BASE32_ENCODING = "base32";
- public static final String HEX_ENCODING = "hex";
+ public static final AllowableValue ENCODE_MODE = new AllowableValue("encode", "Encode", "Sets the operation mode to 'encode'.");
+ public static final AllowableValue DECODE_MODE = new AllowableValue("decode", "Decode", "Sets the operation mode to 'decoding'.");
+
+ public static final AllowableValue BASE64_ENCODING = new AllowableValue("base64", "Base64", "Sets the encoding type to 'Base64'.");
+ public static final AllowableValue BASE32_ENCODING = new AllowableValue("base32", "Base32", "Sets the encoding type to 'Base32'.");
+ public static final AllowableValue HEX_ENCODING = new AllowableValue("hex", "Hexadecimal", "Sets the encoding type to 'Hexadecimal'.");
+
+ /**
+ * Represents an allowable value that indicates the encoded FlowFile content should be output as a single line.
+ * When this value is set, the encoded content will not contain any line breaks or newlines, ensuring
+ * that the entire content is presented in a single, continuous line.
+ * <p>
+ * This value is particularly useful in scenarios where multiline output is not desired or could lead to issues,
+ * such as in certain data formats or when interfacing with systems that expect single-line input.
+ * </p>
+ */
+ static final AllowableValue SINGLE_LINE_OUTPUT_TRUE = new AllowableValue("true", "True", "The encoded FlowFile content will be output as a single line.");
+
+
+ /**
+ * Represents an allowable value that indicates the encoded FlowFile content should be output as multiple lines.
+ * When this value is set, the encoded content will include appropriate line breaks or newlines, breaking
+ * the content into separate lines as required.
+ * <p>
+ * This setting is useful in scenarios where multi-line formatting is necessary or preferred, such as for
+ * improved readability, adherence to specific data formats, or compatibility with systems and tools that
+ * process multi-line input.
+ * </p>
+ */
+ static final AllowableValue SINGLE_LINE_OUTPUT_FALSE = new AllowableValue("false", "False", "The encoded FlowFile content will be output as a multiple lines.");
Review Comment:
I would like to add to @exceptionfactory suggestion. Not only should there should be an enum as he said for the encodings, but I believe there should also be an enum for the single line options whereby you would not need to use the true and false for the values. You can use the actual enum value. So on line 150 instead of specifying each AllowableValue you could just specify the enum class
##########
nifi-nar-bundles/nifi-standard-bundle/nifi-standard-processors/src/main/java/org/apache/nifi/processors/standard/EncodeContent.java:
##########
@@ -55,27 +59,105 @@
@CapabilityDescription("Encode or decode the contents of a FlowFile using Base64, Base32, or hex encoding schemes")
public class EncodeContent extends AbstractProcessor {
- public static final String ENCODE_MODE = "Encode";
- public static final String DECODE_MODE = "Decode";
-
- public static final String BASE64_ENCODING = "base64";
- public static final String BASE32_ENCODING = "base32";
- public static final String HEX_ENCODING = "hex";
+ public static final AllowableValue ENCODE_MODE = new AllowableValue("encode", "Encode", "Sets the operation mode to 'encode'.");
+ public static final AllowableValue DECODE_MODE = new AllowableValue("decode", "Decode", "Sets the operation mode to 'decoding'.");
+
+ public static final AllowableValue BASE64_ENCODING = new AllowableValue("base64", "Base64", "Sets the encoding type to 'Base64'.");
+ public static final AllowableValue BASE32_ENCODING = new AllowableValue("base32", "Base32", "Sets the encoding type to 'Base32'.");
+ public static final AllowableValue HEX_ENCODING = new AllowableValue("hex", "Hexadecimal", "Sets the encoding type to 'Hexadecimal'.");
+
+ /**
+ * Represents an allowable value that indicates the encoded FlowFile content should be output as a single line.
+ * When this value is set, the encoded content will not contain any line breaks or newlines, ensuring
+ * that the entire content is presented in a single, continuous line.
+ * <p>
+ * This value is particularly useful in scenarios where multiline output is not desired or could lead to issues,
+ * such as in certain data formats or when interfacing with systems that expect single-line input.
+ * </p>
+ */
+ static final AllowableValue SINGLE_LINE_OUTPUT_TRUE = new AllowableValue("true", "True", "The encoded FlowFile content will be output as a single line.");
+
+
+ /**
+ * Represents an allowable value that indicates the encoded FlowFile content should be output as multiple lines.
+ * When this value is set, the encoded content will include appropriate line breaks or newlines, breaking
+ * the content into separate lines as required.
+ * <p>
+ * This setting is useful in scenarios where multi-line formatting is necessary or preferred, such as for
+ * improved readability, adherence to specific data formats, or compatibility with systems and tools that
+ * process multi-line input.
+ * </p>
+ */
+ static final AllowableValue SINGLE_LINE_OUTPUT_FALSE = new AllowableValue("false", "False", "The encoded FlowFile content will be output as a multiple lines.");
Review Comment:
I would like to add to @exceptionfactory suggestion. Not only should there should be an enum as he said for the encodings, but I believe there should also be an enum for the single line options whereby you would not need to use the true and false for the values. You can use the actual enum value. So on line 150 instead of specifying each AllowableValue you could just specify the enum class.
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: issues-unsubscribe@nifi.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
Re: [PR] NIFI-12017 add ability to choose to output to single line for base32 base64 contents [nifi]
Posted by "dan-s1 (via GitHub)" <gi...@apache.org>.
dan-s1 commented on code in PR #8038:
URL: https://github.com/apache/nifi/pull/8038#discussion_r1439062586
##########
nifi-nar-bundles/nifi-standard-bundle/nifi-standard-processors/src/main/java/org/apache/nifi/processors/standard/EncodeContent.java:
##########
@@ -55,27 +59,105 @@
@CapabilityDescription("Encode or decode the contents of a FlowFile using Base64, Base32, or hex encoding schemes")
public class EncodeContent extends AbstractProcessor {
- public static final String ENCODE_MODE = "Encode";
- public static final String DECODE_MODE = "Decode";
-
- public static final String BASE64_ENCODING = "base64";
- public static final String BASE32_ENCODING = "base32";
- public static final String HEX_ENCODING = "hex";
+ public static final AllowableValue ENCODE_MODE = new AllowableValue("encode", "Encode", "Sets the operation mode to 'encode'.");
+ public static final AllowableValue DECODE_MODE = new AllowableValue("decode", "Decode", "Sets the operation mode to 'decoding'.");
+
+ public static final AllowableValue BASE64_ENCODING = new AllowableValue("base64", "Base64", "Sets the encoding type to 'Base64'.");
+ public static final AllowableValue BASE32_ENCODING = new AllowableValue("base32", "Base32", "Sets the encoding type to 'Base32'.");
+ public static final AllowableValue HEX_ENCODING = new AllowableValue("hex", "Hexadecimal", "Sets the encoding type to 'Hexadecimal'.");
+
+ /**
+ * Represents an allowable value that indicates the encoded FlowFile content should be output as a single line.
+ * When this value is set, the encoded content will not contain any line breaks or newlines, ensuring
+ * that the entire content is presented in a single, continuous line.
+ * <p>
+ * This value is particularly useful in scenarios where multiline output is not desired or could lead to issues,
+ * such as in certain data formats or when interfacing with systems that expect single-line input.
+ * </p>
+ */
+ static final AllowableValue SINGLE_LINE_OUTPUT_TRUE = new AllowableValue("true", "True", "The encoded FlowFile content will be output as a single line.");
+
+
+ /**
+ * Represents an allowable value that indicates the encoded FlowFile content should be output as multiple lines.
+ * When this value is set, the encoded content will include appropriate line breaks or newlines, breaking
+ * the content into separate lines as required.
+ * <p>
+ * This setting is useful in scenarios where multi-line formatting is necessary or preferred, such as for
+ * improved readability, adherence to specific data formats, or compatibility with systems and tools that
+ * process multi-line input.
+ * </p>
+ */
+ static final AllowableValue SINGLE_LINE_OUTPUT_FALSE = new AllowableValue("false", "False", "The encoded FlowFile content will be output as a multiple lines.");
Review Comment:
I would like to add to @exceptionfactory suggestion. Not only should there should be an enum as he said for the encodings, but I believe there should also be an enum for the single line options whereby you would not need to use the true and false for the values. You can use the actual enum value. So on line 150 instead of specifying each AllowableValue you could just specify the enum class, on lines 233-246 you could use a switch statement with the enum values instead of the if else testing for equality and in the in the `getStreamCallback` you could use the enum instead of a string for the encoding argument.
Also when converting to the enum `SINGLE_LINE_OUTPUT_TRUE` and `SINGLE_LINE_OUTPUT_FALSE` they should be renamed to `SINGLE_LINE` AND `MULTILINE`.
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: issues-unsubscribe@nifi.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
Re: [PR] NIFI-12017 add ability to choose to output to single line for base32 base64 contents [nifi]
Posted by "dan-s1 (via GitHub)" <gi...@apache.org>.
dan-s1 commented on code in PR #8038:
URL: https://github.com/apache/nifi/pull/8038#discussion_r1439064848
##########
nifi-nar-bundles/nifi-standard-bundle/nifi-standard-processors/src/main/java/org/apache/nifi/processors/standard/EncodeContent.java:
##########
@@ -112,11 +194,27 @@ public void onTrigger(final ProcessContext context, final ProcessSession session
return;
}
- final boolean encode = context.getProperty(MODE).getValue().equalsIgnoreCase(ENCODE_MODE);
+ // Decide if we should fail on 0-length content
+ final Boolean failOnZeroLengthContent = context.getProperty(FAIL_ON_ZERO_LENGTH_CONTENT).asBoolean();
+
+ final boolean encode = context.getProperty(MODE).getValue().equalsIgnoreCase(ENCODE_MODE.getValue());
final String encoding = context.getProperty(ENCODING).getValue();
- final StreamCallback callback = getStreamCallback(encode, encoding);
+
+ final Boolean singleLineOutput = context.getProperty(SINGLE_LINE_OUTPUT).asBoolean();
+ final Integer lineLength = context.getProperty(ENCODED_LINE_LENGTH).evaluateAttributeExpressions(flowFile).asInteger();
+ final String lineSeparator = context.getProperty(ENCODED_LINE_SEPARATOR).evaluateAttributeExpressions(flowFile).getValue();
+
+ final StreamCallback callback = getStreamCallback(encode, encoding, Boolean.TRUE.equals(singleLineOutput) ? -1 : lineLength, lineSeparator);
Review Comment:
I am not sure its a major saving but changing this to an int and and in the other places I suggested would reduce the autoboxing conversion to only one time in this statement.
```suggestion
final int lineLength = singleLineOutput ? -1 : context.getProperty(ENCODED_LINE_LENGTH).evaluateAttributeExpressions(flowFile).asInteger();
final String lineSeparator = context.getProperty(ENCODED_LINE_SEPARATOR).evaluateAttributeExpressions(flowFile).getValue();
final StreamCallback callback = getStreamCallback(encode, encoding, lineLength, lineSeparator);
```
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: issues-unsubscribe@nifi.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
Re: [PR] NIFI-12017 add ability to choose to output to single line for base32 base64 contents [nifi]
Posted by "dan-s1 (via GitHub)" <gi...@apache.org>.
dan-s1 commented on code in PR #8038:
URL: https://github.com/apache/nifi/pull/8038#discussion_r1439063279
##########
nifi-nar-bundles/nifi-standard-bundle/nifi-standard-processors/src/main/java/org/apache/nifi/processors/standard/EncodeContent.java:
##########
@@ -112,11 +194,27 @@ public void onTrigger(final ProcessContext context, final ProcessSession session
return;
}
- final boolean encode = context.getProperty(MODE).getValue().equalsIgnoreCase(ENCODE_MODE);
+ // Decide if we should fail on 0-length content
+ final Boolean failOnZeroLengthContent = context.getProperty(FAIL_ON_ZERO_LENGTH_CONTENT).asBoolean();
Review Comment:
```suggestion
final boolean failOnZeroLengthContent = context.getProperty(FAIL_ON_ZERO_LENGTH_CONTENT).asBoolean();
```
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: issues-unsubscribe@nifi.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
Re: [PR] NIFI-12017 add ability to choose to output to single line for base32 base64 contents [nifi]
Posted by "knguyen1 (via GitHub)" <gi...@apache.org>.
knguyen1 commented on code in PR #8038:
URL: https://github.com/apache/nifi/pull/8038#discussion_r1491253075
##########
nifi-nar-bundles/nifi-standard-bundle/nifi-standard-processors/src/main/java/org/apache/nifi/processors/standard/EncodeContent.java:
##########
@@ -55,27 +59,105 @@
@CapabilityDescription("Encode or decode the contents of a FlowFile using Base64, Base32, or hex encoding schemes")
public class EncodeContent extends AbstractProcessor {
- public static final String ENCODE_MODE = "Encode";
- public static final String DECODE_MODE = "Decode";
-
- public static final String BASE64_ENCODING = "base64";
- public static final String BASE32_ENCODING = "base32";
- public static final String HEX_ENCODING = "hex";
+ public static final AllowableValue ENCODE_MODE = new AllowableValue("encode", "Encode", "Sets the operation mode to 'encode'.");
+ public static final AllowableValue DECODE_MODE = new AllowableValue("decode", "Decode", "Sets the operation mode to 'decoding'.");
+
+ public static final AllowableValue BASE64_ENCODING = new AllowableValue("base64", "Base64", "Sets the encoding type to 'Base64'.");
+ public static final AllowableValue BASE32_ENCODING = new AllowableValue("base32", "Base32", "Sets the encoding type to 'Base32'.");
+ public static final AllowableValue HEX_ENCODING = new AllowableValue("hex", "Hexadecimal", "Sets the encoding type to 'Hexadecimal'.");
+
+ /**
+ * Represents an allowable value that indicates the encoded FlowFile content should be output as a single line.
+ * When this value is set, the encoded content will not contain any line breaks or newlines, ensuring
+ * that the entire content is presented in a single, continuous line.
+ * <p>
+ * This value is particularly useful in scenarios where multiline output is not desired or could lead to issues,
+ * such as in certain data formats or when interfacing with systems that expect single-line input.
+ * </p>
+ */
+ static final AllowableValue SINGLE_LINE_OUTPUT_TRUE = new AllowableValue("true", "True", "The encoded FlowFile content will be output as a single line.");
+
+
+ /**
+ * Represents an allowable value that indicates the encoded FlowFile content should be output as multiple lines.
+ * When this value is set, the encoded content will include appropriate line breaks or newlines, breaking
+ * the content into separate lines as required.
+ * <p>
+ * This setting is useful in scenarios where multi-line formatting is necessary or preferred, such as for
+ * improved readability, adherence to specific data formats, or compatibility with systems and tools that
+ * process multi-line input.
+ * </p>
+ */
+ static final AllowableValue SINGLE_LINE_OUTPUT_FALSE = new AllowableValue("false", "False", "The encoded FlowFile content will be output as a multiple lines.");
public static final PropertyDescriptor MODE = new PropertyDescriptor.Builder()
.name("Mode")
.description("Specifies whether the content should be encoded or decoded")
.required(true)
.allowableValues(ENCODE_MODE, DECODE_MODE)
- .defaultValue(ENCODE_MODE)
+ .defaultValue(ENCODE_MODE.getValue())
.build();
public static final PropertyDescriptor ENCODING = new PropertyDescriptor.Builder()
.name("Encoding")
.description("Specifies the type of encoding used")
.required(true)
.allowableValues(BASE64_ENCODING, BASE32_ENCODING, HEX_ENCODING)
- .defaultValue(BASE64_ENCODING)
+ .defaultValue(BASE64_ENCODING.getValue())
+ .build();
+
+ // A Boolean property descriptor that allows the user
+ // to choose if the output to encoded FlowFile content should be to a single line or multiple lines.
+ static final PropertyDescriptor SINGLE_LINE_OUTPUT = new PropertyDescriptor.Builder()
+ .name("single-line-output")
+ .displayName("Output Content to Single Line")
+ .description("If set to 'true', the encoded FlowFile content will output as a single line. If set to 'false', "
+ + "it will output as multiple lines. This property is only applicable when Base64 or Base32 encoding is selected.")
+ .required(false)
+ .defaultValue("false")
+ .allowableValues(SINGLE_LINE_OUTPUT_TRUE, SINGLE_LINE_OUTPUT_FALSE)
+ .addValidator(StandardValidators.BOOLEAN_VALIDATOR)
+ .dependsOn(MODE, ENCODE_MODE)
+ .dependsOn(ENCODING, BASE64_ENCODING, BASE32_ENCODING)
+ .build();
+
+ static final PropertyDescriptor ENCODED_LINE_SEPARATOR = new PropertyDescriptor.Builder()
+ .name("line-separator")
+ .displayName("Encoded Content Line Separator")
+ .description("Each line of encoded data will be terminated with this byte sequence (e.g. \\r\\n"
+ + "). This property defaults to the system-dependent line separator string. If `line-length` <= 0, "
+ + "the `line-separator` property is not used. This property is not used for `hex` encoding.")
+ .required(false)
+ .expressionLanguageSupported(ExpressionLanguageScope.FLOWFILE_ATTRIBUTES)
+ .defaultValue(System.lineSeparator())
+ .addValidator(Validator.VALID)
+ .dependsOn(MODE, ENCODE_MODE)
+ .dependsOn(ENCODING, BASE64_ENCODING, BASE32_ENCODING)
+ .build();
+
+ static final PropertyDescriptor ENCODED_LINE_LENGTH = new PropertyDescriptor.Builder()
+ .name("encoded-line-length")
+ .displayName("Encoded Content Line Length")
+ .description("Each line of encoded data will contain `encoded-line-length` characters (rounded down to the nearest multiple of 4). "
+ + "If `encoded-line-length` <= 0, the encoded data is not divided into lines. This property is "
+ + "ignored if `single-line-output` is set to True.")
+ .required(false)
+ .defaultValue("76")
+ .expressionLanguageSupported(ExpressionLanguageScope.FLOWFILE_ATTRIBUTES)
+ .addValidator(StandardValidators.INTEGER_VALIDATOR)
+ .dependsOn(MODE, ENCODE_MODE)
+ .dependsOn(ENCODING, BASE64_ENCODING, BASE32_ENCODING)
+ .dependsOn(SINGLE_LINE_OUTPUT, SINGLE_LINE_OUTPUT_FALSE)
+ .build();
+
+ static final PropertyDescriptor FAIL_ON_ZERO_LENGTH_CONTENT = new PropertyDescriptor.Builder()
Review Comment:
Done. This is removed.
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: issues-unsubscribe@nifi.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
Re: [PR] NIFI-12017 add ability to choose to output to single line for base32 base64 contents [nifi]
Posted by "knguyen1 (via GitHub)" <gi...@apache.org>.
knguyen1 commented on code in PR #8038:
URL: https://github.com/apache/nifi/pull/8038#discussion_r1491467218
##########
nifi-nar-bundles/nifi-standard-bundle/nifi-standard-processors/src/main/java/org/apache/nifi/processors/standard/EncodeContent.java:
##########
@@ -55,27 +59,105 @@
@CapabilityDescription("Encode or decode the contents of a FlowFile using Base64, Base32, or hex encoding schemes")
public class EncodeContent extends AbstractProcessor {
- public static final String ENCODE_MODE = "Encode";
- public static final String DECODE_MODE = "Decode";
-
- public static final String BASE64_ENCODING = "base64";
- public static final String BASE32_ENCODING = "base32";
- public static final String HEX_ENCODING = "hex";
+ public static final AllowableValue ENCODE_MODE = new AllowableValue("encode", "Encode", "Sets the operation mode to 'encode'.");
+ public static final AllowableValue DECODE_MODE = new AllowableValue("decode", "Decode", "Sets the operation mode to 'decoding'.");
+
+ public static final AllowableValue BASE64_ENCODING = new AllowableValue("base64", "Base64", "Sets the encoding type to 'Base64'.");
+ public static final AllowableValue BASE32_ENCODING = new AllowableValue("base32", "Base32", "Sets the encoding type to 'Base32'.");
+ public static final AllowableValue HEX_ENCODING = new AllowableValue("hex", "Hexadecimal", "Sets the encoding type to 'Hexadecimal'.");
+
+ /**
+ * Represents an allowable value that indicates the encoded FlowFile content should be output as a single line.
+ * When this value is set, the encoded content will not contain any line breaks or newlines, ensuring
+ * that the entire content is presented in a single, continuous line.
+ * <p>
+ * This value is particularly useful in scenarios where multiline output is not desired or could lead to issues,
+ * such as in certain data formats or when interfacing with systems that expect single-line input.
+ * </p>
+ */
+ static final AllowableValue SINGLE_LINE_OUTPUT_TRUE = new AllowableValue("true", "True", "The encoded FlowFile content will be output as a single line.");
+
+
+ /**
+ * Represents an allowable value that indicates the encoded FlowFile content should be output as multiple lines.
+ * When this value is set, the encoded content will include appropriate line breaks or newlines, breaking
+ * the content into separate lines as required.
+ * <p>
+ * This setting is useful in scenarios where multi-line formatting is necessary or preferred, such as for
+ * improved readability, adherence to specific data formats, or compatibility with systems and tools that
+ * process multi-line input.
+ * </p>
+ */
+ static final AllowableValue SINGLE_LINE_OUTPUT_FALSE = new AllowableValue("false", "False", "The encoded FlowFile content will be output as a multiple lines.");
Review Comment:
Done. Added
`nifi-nar-bundles/nifi-standard-bundle/nifi-standard-processors/src/main/java/org/apache/nifi/processors/standard/encoding/LineOutputMode.java`
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: issues-unsubscribe@nifi.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
Re: [PR] NIFI-12017 add ability to choose to output to single line for base32 base64 contents [nifi]
Posted by "dan-s1 (via GitHub)" <gi...@apache.org>.
dan-s1 commented on code in PR #8038:
URL: https://github.com/apache/nifi/pull/8038#discussion_r1439062586
##########
nifi-nar-bundles/nifi-standard-bundle/nifi-standard-processors/src/main/java/org/apache/nifi/processors/standard/EncodeContent.java:
##########
@@ -55,27 +59,105 @@
@CapabilityDescription("Encode or decode the contents of a FlowFile using Base64, Base32, or hex encoding schemes")
public class EncodeContent extends AbstractProcessor {
- public static final String ENCODE_MODE = "Encode";
- public static final String DECODE_MODE = "Decode";
-
- public static final String BASE64_ENCODING = "base64";
- public static final String BASE32_ENCODING = "base32";
- public static final String HEX_ENCODING = "hex";
+ public static final AllowableValue ENCODE_MODE = new AllowableValue("encode", "Encode", "Sets the operation mode to 'encode'.");
+ public static final AllowableValue DECODE_MODE = new AllowableValue("decode", "Decode", "Sets the operation mode to 'decoding'.");
+
+ public static final AllowableValue BASE64_ENCODING = new AllowableValue("base64", "Base64", "Sets the encoding type to 'Base64'.");
+ public static final AllowableValue BASE32_ENCODING = new AllowableValue("base32", "Base32", "Sets the encoding type to 'Base32'.");
+ public static final AllowableValue HEX_ENCODING = new AllowableValue("hex", "Hexadecimal", "Sets the encoding type to 'Hexadecimal'.");
+
+ /**
+ * Represents an allowable value that indicates the encoded FlowFile content should be output as a single line.
+ * When this value is set, the encoded content will not contain any line breaks or newlines, ensuring
+ * that the entire content is presented in a single, continuous line.
+ * <p>
+ * This value is particularly useful in scenarios where multiline output is not desired or could lead to issues,
+ * such as in certain data formats or when interfacing with systems that expect single-line input.
+ * </p>
+ */
+ static final AllowableValue SINGLE_LINE_OUTPUT_TRUE = new AllowableValue("true", "True", "The encoded FlowFile content will be output as a single line.");
+
+
+ /**
+ * Represents an allowable value that indicates the encoded FlowFile content should be output as multiple lines.
+ * When this value is set, the encoded content will include appropriate line breaks or newlines, breaking
+ * the content into separate lines as required.
+ * <p>
+ * This setting is useful in scenarios where multi-line formatting is necessary or preferred, such as for
+ * improved readability, adherence to specific data formats, or compatibility with systems and tools that
+ * process multi-line input.
+ * </p>
+ */
+ static final AllowableValue SINGLE_LINE_OUTPUT_FALSE = new AllowableValue("false", "False", "The encoded FlowFile content will be output as a multiple lines.");
Review Comment:
I would like to add to @exceptionfactory suggestion there should be one enum as he said for the encodings and I think there should also be an enum for the single line options whereby you would not need to use the true and false for the values you can use the actual enum value.
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: issues-unsubscribe@nifi.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
Re: [PR] NIFI-12017 add ability to choose to output to single line for base32 base64 contents [nifi]
Posted by "dan-s1 (via GitHub)" <gi...@apache.org>.
dan-s1 commented on code in PR #8038:
URL: https://github.com/apache/nifi/pull/8038#discussion_r1439065672
##########
nifi-nar-bundles/nifi-standard-bundle/nifi-standard-processors/src/main/java/org/apache/nifi/processors/standard/EncodeContent.java:
##########
@@ -129,19 +227,20 @@ public void onTrigger(final ProcessContext context, final ProcessSession session
}
}
- private static StreamCallback getStreamCallback(final boolean encode, final String encoding) {
- if (encode) {
- if (encoding.equalsIgnoreCase(BASE64_ENCODING)) {
- return new EncodeBase64();
- } else if (encoding.equalsIgnoreCase(BASE32_ENCODING)) {
- return new EncodeBase32();
+ private static StreamCallback getStreamCallback(final Boolean encode, final String encoding,
+ final Integer lineLength, final String lineSeparator) {
+ if (Boolean.TRUE.equals(encode)) {
+ if (encoding.equalsIgnoreCase(BASE64_ENCODING.getValue())) {
Review Comment:
```suggestion
private static StreamCallback getStreamCallback(final boolean encode, final String encoding, final int lineLength, final String lineSeparator) {
if (encode) {
if (encoding.equalsIgnoreCase(BASE64_ENCODING.getValue())) {
```
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: issues-unsubscribe@nifi.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
Re: [PR] NIFI-12017 add ability to choose to output to single line for base32 base64 contents [nifi]
Posted by "exceptionfactory (via GitHub)" <gi...@apache.org>.
exceptionfactory commented on code in PR #8038:
URL: https://github.com/apache/nifi/pull/8038#discussion_r1436640748
##########
nifi-nar-bundles/nifi-standard-bundle/nifi-standard-processors/src/main/java/org/apache/nifi/processors/standard/EncodeContent.java:
##########
@@ -55,27 +59,105 @@
@CapabilityDescription("Encode or decode the contents of a FlowFile using Base64, Base32, or hex encoding schemes")
public class EncodeContent extends AbstractProcessor {
- public static final String ENCODE_MODE = "Encode";
- public static final String DECODE_MODE = "Decode";
-
- public static final String BASE64_ENCODING = "base64";
- public static final String BASE32_ENCODING = "base32";
- public static final String HEX_ENCODING = "hex";
+ public static final AllowableValue ENCODE_MODE = new AllowableValue("encode", "Encode", "Sets the operation mode to 'encode'.");
+ public static final AllowableValue DECODE_MODE = new AllowableValue("decode", "Decode", "Sets the operation mode to 'decoding'.");
+
+ public static final AllowableValue BASE64_ENCODING = new AllowableValue("base64", "Base64", "Sets the encoding type to 'Base64'.");
+ public static final AllowableValue BASE32_ENCODING = new AllowableValue("base32", "Base32", "Sets the encoding type to 'Base32'.");
+ public static final AllowableValue HEX_ENCODING = new AllowableValue("hex", "Hexadecimal", "Sets the encoding type to 'Hexadecimal'.");
+
+ /**
+ * Represents an allowable value that indicates the encoded FlowFile content should be output as a single line.
+ * When this value is set, the encoded content will not contain any line breaks or newlines, ensuring
+ * that the entire content is presented in a single, continuous line.
+ * <p>
+ * This value is particularly useful in scenarios where multiline output is not desired or could lead to issues,
+ * such as in certain data formats or when interfacing with systems that expect single-line input.
+ * </p>
+ */
+ static final AllowableValue SINGLE_LINE_OUTPUT_TRUE = new AllowableValue("true", "True", "The encoded FlowFile content will be output as a single line.");
+
+
+ /**
+ * Represents an allowable value that indicates the encoded FlowFile content should be output as multiple lines.
+ * When this value is set, the encoded content will include appropriate line breaks or newlines, breaking
+ * the content into separate lines as required.
+ * <p>
+ * This setting is useful in scenarios where multi-line formatting is necessary or preferred, such as for
+ * improved readability, adherence to specific data formats, or compatibility with systems and tools that
+ * process multi-line input.
+ * </p>
+ */
+ static final AllowableValue SINGLE_LINE_OUTPUT_FALSE = new AllowableValue("false", "False", "The encoded FlowFile content will be output as a multiple lines.");
public static final PropertyDescriptor MODE = new PropertyDescriptor.Builder()
.name("Mode")
.description("Specifies whether the content should be encoded or decoded")
.required(true)
.allowableValues(ENCODE_MODE, DECODE_MODE)
- .defaultValue(ENCODE_MODE)
+ .defaultValue(ENCODE_MODE.getValue())
.build();
public static final PropertyDescriptor ENCODING = new PropertyDescriptor.Builder()
.name("Encoding")
.description("Specifies the type of encoding used")
.required(true)
.allowableValues(BASE64_ENCODING, BASE32_ENCODING, HEX_ENCODING)
- .defaultValue(BASE64_ENCODING)
+ .defaultValue(BASE64_ENCODING.getValue())
+ .build();
+
+ // A Boolean property descriptor that allows the user
+ // to choose if the output to encoded FlowFile content should be to a single line or multiple lines.
+ static final PropertyDescriptor SINGLE_LINE_OUTPUT = new PropertyDescriptor.Builder()
+ .name("single-line-output")
+ .displayName("Output Content to Single Line")
+ .description("If set to 'true', the encoded FlowFile content will output as a single line. If set to 'false', "
+ + "it will output as multiple lines. This property is only applicable when Base64 or Base32 encoding is selected.")
+ .required(false)
+ .defaultValue("false")
+ .allowableValues(SINGLE_LINE_OUTPUT_TRUE, SINGLE_LINE_OUTPUT_FALSE)
+ .addValidator(StandardValidators.BOOLEAN_VALIDATOR)
+ .dependsOn(MODE, ENCODE_MODE)
+ .dependsOn(ENCODING, BASE64_ENCODING, BASE32_ENCODING)
+ .build();
+
+ static final PropertyDescriptor ENCODED_LINE_SEPARATOR = new PropertyDescriptor.Builder()
+ .name("line-separator")
+ .displayName("Encoded Content Line Separator")
+ .description("Each line of encoded data will be terminated with this byte sequence (e.g. \\r\\n"
+ + "). This property defaults to the system-dependent line separator string. If `line-length` <= 0, "
+ + "the `line-separator` property is not used. This property is not used for `hex` encoding.")
+ .required(false)
+ .expressionLanguageSupported(ExpressionLanguageScope.FLOWFILE_ATTRIBUTES)
+ .defaultValue(System.lineSeparator())
+ .addValidator(Validator.VALID)
+ .dependsOn(MODE, ENCODE_MODE)
+ .dependsOn(ENCODING, BASE64_ENCODING, BASE32_ENCODING)
+ .build();
+
+ static final PropertyDescriptor ENCODED_LINE_LENGTH = new PropertyDescriptor.Builder()
+ .name("encoded-line-length")
+ .displayName("Encoded Content Line Length")
+ .description("Each line of encoded data will contain `encoded-line-length` characters (rounded down to the nearest multiple of 4). "
+ + "If `encoded-line-length` <= 0, the encoded data is not divided into lines. This property is "
+ + "ignored if `single-line-output` is set to True.")
+ .required(false)
+ .defaultValue("76")
+ .expressionLanguageSupported(ExpressionLanguageScope.FLOWFILE_ATTRIBUTES)
+ .addValidator(StandardValidators.INTEGER_VALIDATOR)
+ .dependsOn(MODE, ENCODE_MODE)
+ .dependsOn(ENCODING, BASE64_ENCODING, BASE32_ENCODING)
+ .dependsOn(SINGLE_LINE_OUTPUT, SINGLE_LINE_OUTPUT_FALSE)
+ .build();
+
+ static final PropertyDescriptor FAIL_ON_ZERO_LENGTH_CONTENT = new PropertyDescriptor.Builder()
Review Comment:
Is there a reason for adding this particular property? It seems better to avoid introducing it, as other components can handle routing on file size in a standard flow configuration.
##########
nifi-nar-bundles/nifi-standard-bundle/nifi-standard-processors/src/main/java/org/apache/nifi/processors/standard/EncodeContent.java:
##########
@@ -55,27 +59,105 @@
@CapabilityDescription("Encode or decode the contents of a FlowFile using Base64, Base32, or hex encoding schemes")
public class EncodeContent extends AbstractProcessor {
- public static final String ENCODE_MODE = "Encode";
- public static final String DECODE_MODE = "Decode";
-
- public static final String BASE64_ENCODING = "base64";
- public static final String BASE32_ENCODING = "base32";
- public static final String HEX_ENCODING = "hex";
+ public static final AllowableValue ENCODE_MODE = new AllowableValue("encode", "Encode", "Sets the operation mode to 'encode'.");
+ public static final AllowableValue DECODE_MODE = new AllowableValue("decode", "Decode", "Sets the operation mode to 'decoding'.");
+
+ public static final AllowableValue BASE64_ENCODING = new AllowableValue("base64", "Base64", "Sets the encoding type to 'Base64'.");
+ public static final AllowableValue BASE32_ENCODING = new AllowableValue("base32", "Base32", "Sets the encoding type to 'Base32'.");
+ public static final AllowableValue HEX_ENCODING = new AllowableValue("hex", "Hexadecimal", "Sets the encoding type to 'Hexadecimal'.");
Review Comment:
Instead of defining AllowableValue instances, it would be helpful to define an enum that implements `DescribedValue`, which makes it easier to use the property value during processing.
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: issues-unsubscribe@nifi.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
Re: [PR] NIFI-12017 add ability to choose to output to single line for base32 base64 contents [nifi]
Posted by "knguyen1 (via GitHub)" <gi...@apache.org>.
knguyen1 commented on code in PR #8038:
URL: https://github.com/apache/nifi/pull/8038#discussion_r1491466240
##########
nifi-nar-bundles/nifi-standard-bundle/nifi-standard-processors/src/main/java/org/apache/nifi/processors/standard/EncodeContent.java:
##########
@@ -55,27 +59,105 @@
@CapabilityDescription("Encode or decode the contents of a FlowFile using Base64, Base32, or hex encoding schemes")
public class EncodeContent extends AbstractProcessor {
- public static final String ENCODE_MODE = "Encode";
- public static final String DECODE_MODE = "Decode";
-
- public static final String BASE64_ENCODING = "base64";
- public static final String BASE32_ENCODING = "base32";
- public static final String HEX_ENCODING = "hex";
+ public static final AllowableValue ENCODE_MODE = new AllowableValue("encode", "Encode", "Sets the operation mode to 'encode'.");
+ public static final AllowableValue DECODE_MODE = new AllowableValue("decode", "Decode", "Sets the operation mode to 'decoding'.");
+
+ public static final AllowableValue BASE64_ENCODING = new AllowableValue("base64", "Base64", "Sets the encoding type to 'Base64'.");
+ public static final AllowableValue BASE32_ENCODING = new AllowableValue("base32", "Base32", "Sets the encoding type to 'Base32'.");
+ public static final AllowableValue HEX_ENCODING = new AllowableValue("hex", "Hexadecimal", "Sets the encoding type to 'Hexadecimal'.");
Review Comment:
Done. added
1. nifi-nar-bundles/nifi-standard-bundle/nifi-standard-processors/src/main/java/org/apache/nifi/processors/standard/encoding/EncodingMode.java
2. nifi-nar-bundles/nifi-standard-bundle/nifi-standard-processors/src/main/java/org/apache/nifi/processors/standard/encoding/EncodingTypejava
3. nifi-nar-bundles/nifi-standard-bundle/nifi-standard-processors/src/main/java/org/apache/nifi/processors/standard/encoding/LineOutputMode.java
##########
nifi-nar-bundles/nifi-standard-bundle/nifi-standard-processors/src/main/java/org/apache/nifi/processors/standard/EncodeContent.java:
##########
@@ -55,27 +59,105 @@
@CapabilityDescription("Encode or decode the contents of a FlowFile using Base64, Base32, or hex encoding schemes")
public class EncodeContent extends AbstractProcessor {
- public static final String ENCODE_MODE = "Encode";
- public static final String DECODE_MODE = "Decode";
-
- public static final String BASE64_ENCODING = "base64";
- public static final String BASE32_ENCODING = "base32";
- public static final String HEX_ENCODING = "hex";
+ public static final AllowableValue ENCODE_MODE = new AllowableValue("encode", "Encode", "Sets the operation mode to 'encode'.");
+ public static final AllowableValue DECODE_MODE = new AllowableValue("decode", "Decode", "Sets the operation mode to 'decoding'.");
+
+ public static final AllowableValue BASE64_ENCODING = new AllowableValue("base64", "Base64", "Sets the encoding type to 'Base64'.");
+ public static final AllowableValue BASE32_ENCODING = new AllowableValue("base32", "Base32", "Sets the encoding type to 'Base32'.");
+ public static final AllowableValue HEX_ENCODING = new AllowableValue("hex", "Hexadecimal", "Sets the encoding type to 'Hexadecimal'.");
Review Comment:
Done. added
1. `nifi-nar-bundles/nifi-standard-bundle/nifi-standard-processors/src/main/java/org/apache/nifi/processors/standard/encoding/EncodingMode.java`
2. `nifi-nar-bundles/nifi-standard-bundle/nifi-standard-processors/src/main/java/org/apache/nifi/processors/standard/encoding/EncodingTypejava`
3. `nifi-nar-bundles/nifi-standard-bundle/nifi-standard-processors/src/main/java/org/apache/nifi/processors/standard/encoding/LineOutputMode.java`
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: issues-unsubscribe@nifi.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
Re: [PR] NIFI-12017 add ability to choose to output to single line for base32 base64 contents [nifi]
Posted by "dan-s1 (via GitHub)" <gi...@apache.org>.
dan-s1 commented on code in PR #8038:
URL: https://github.com/apache/nifi/pull/8038#discussion_r1439062586
##########
nifi-nar-bundles/nifi-standard-bundle/nifi-standard-processors/src/main/java/org/apache/nifi/processors/standard/EncodeContent.java:
##########
@@ -55,27 +59,105 @@
@CapabilityDescription("Encode or decode the contents of a FlowFile using Base64, Base32, or hex encoding schemes")
public class EncodeContent extends AbstractProcessor {
- public static final String ENCODE_MODE = "Encode";
- public static final String DECODE_MODE = "Decode";
-
- public static final String BASE64_ENCODING = "base64";
- public static final String BASE32_ENCODING = "base32";
- public static final String HEX_ENCODING = "hex";
+ public static final AllowableValue ENCODE_MODE = new AllowableValue("encode", "Encode", "Sets the operation mode to 'encode'.");
+ public static final AllowableValue DECODE_MODE = new AllowableValue("decode", "Decode", "Sets the operation mode to 'decoding'.");
+
+ public static final AllowableValue BASE64_ENCODING = new AllowableValue("base64", "Base64", "Sets the encoding type to 'Base64'.");
+ public static final AllowableValue BASE32_ENCODING = new AllowableValue("base32", "Base32", "Sets the encoding type to 'Base32'.");
+ public static final AllowableValue HEX_ENCODING = new AllowableValue("hex", "Hexadecimal", "Sets the encoding type to 'Hexadecimal'.");
+
+ /**
+ * Represents an allowable value that indicates the encoded FlowFile content should be output as a single line.
+ * When this value is set, the encoded content will not contain any line breaks or newlines, ensuring
+ * that the entire content is presented in a single, continuous line.
+ * <p>
+ * This value is particularly useful in scenarios where multiline output is not desired or could lead to issues,
+ * such as in certain data formats or when interfacing with systems that expect single-line input.
+ * </p>
+ */
+ static final AllowableValue SINGLE_LINE_OUTPUT_TRUE = new AllowableValue("true", "True", "The encoded FlowFile content will be output as a single line.");
+
+
+ /**
+ * Represents an allowable value that indicates the encoded FlowFile content should be output as multiple lines.
+ * When this value is set, the encoded content will include appropriate line breaks or newlines, breaking
+ * the content into separate lines as required.
+ * <p>
+ * This setting is useful in scenarios where multi-line formatting is necessary or preferred, such as for
+ * improved readability, adherence to specific data formats, or compatibility with systems and tools that
+ * process multi-line input.
+ * </p>
+ */
+ static final AllowableValue SINGLE_LINE_OUTPUT_FALSE = new AllowableValue("false", "False", "The encoded FlowFile content will be output as a multiple lines.");
Review Comment:
I would like to add to @exceptionfactory suggestion. Not only should there should be an enum as he said for the encodings, but I believe there should also be an enum for the single line options whereby you would not need to use the true and false for the values. You can use the actual enum value.
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: issues-unsubscribe@nifi.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
Re: [PR] NIFI-12017 add ability to choose to output to single line for base32 base64 contents [nifi]
Posted by "dan-s1 (via GitHub)" <gi...@apache.org>.
dan-s1 commented on code in PR #8038:
URL: https://github.com/apache/nifi/pull/8038#discussion_r1439062586
##########
nifi-nar-bundles/nifi-standard-bundle/nifi-standard-processors/src/main/java/org/apache/nifi/processors/standard/EncodeContent.java:
##########
@@ -55,27 +59,105 @@
@CapabilityDescription("Encode or decode the contents of a FlowFile using Base64, Base32, or hex encoding schemes")
public class EncodeContent extends AbstractProcessor {
- public static final String ENCODE_MODE = "Encode";
- public static final String DECODE_MODE = "Decode";
-
- public static final String BASE64_ENCODING = "base64";
- public static final String BASE32_ENCODING = "base32";
- public static final String HEX_ENCODING = "hex";
+ public static final AllowableValue ENCODE_MODE = new AllowableValue("encode", "Encode", "Sets the operation mode to 'encode'.");
+ public static final AllowableValue DECODE_MODE = new AllowableValue("decode", "Decode", "Sets the operation mode to 'decoding'.");
+
+ public static final AllowableValue BASE64_ENCODING = new AllowableValue("base64", "Base64", "Sets the encoding type to 'Base64'.");
+ public static final AllowableValue BASE32_ENCODING = new AllowableValue("base32", "Base32", "Sets the encoding type to 'Base32'.");
+ public static final AllowableValue HEX_ENCODING = new AllowableValue("hex", "Hexadecimal", "Sets the encoding type to 'Hexadecimal'.");
+
+ /**
+ * Represents an allowable value that indicates the encoded FlowFile content should be output as a single line.
+ * When this value is set, the encoded content will not contain any line breaks or newlines, ensuring
+ * that the entire content is presented in a single, continuous line.
+ * <p>
+ * This value is particularly useful in scenarios where multiline output is not desired or could lead to issues,
+ * such as in certain data formats or when interfacing with systems that expect single-line input.
+ * </p>
+ */
+ static final AllowableValue SINGLE_LINE_OUTPUT_TRUE = new AllowableValue("true", "True", "The encoded FlowFile content will be output as a single line.");
+
+
+ /**
+ * Represents an allowable value that indicates the encoded FlowFile content should be output as multiple lines.
+ * When this value is set, the encoded content will include appropriate line breaks or newlines, breaking
+ * the content into separate lines as required.
+ * <p>
+ * This setting is useful in scenarios where multi-line formatting is necessary or preferred, such as for
+ * improved readability, adherence to specific data formats, or compatibility with systems and tools that
+ * process multi-line input.
+ * </p>
+ */
+ static final AllowableValue SINGLE_LINE_OUTPUT_FALSE = new AllowableValue("false", "False", "The encoded FlowFile content will be output as a multiple lines.");
Review Comment:
I would like to add to @exceptionfactory suggestion. Not only should there should be an enum as he said for the encodings, but I believe there should also be an enum for the single line options whereby you would not need to use the true and false for the values. You can use the actual enum value. So on line 150 instead of specifying each AllowableValue you could just specify the enum class, on lines 233-246 you could use a switch statement with the enum values instead of the if else testing for equality and in the in the `getStreamCallback` you could use the enum instead of a string for the encoding argument.
Also when converting to the enum `SINGLE_LINE_OUTPUT_TRUE` and `SINGLE_LINE_OUTPUT_FALSE` should be renamed to SINGLE_LINE AND MULTILINE.
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: issues-unsubscribe@nifi.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
Re: [PR] NIFI-12017 add ability to choose to output to single line for base32 base64 contents [nifi]
Posted by "dan-s1 (via GitHub)" <gi...@apache.org>.
dan-s1 commented on code in PR #8038:
URL: https://github.com/apache/nifi/pull/8038#discussion_r1439064497
##########
nifi-nar-bundles/nifi-standard-bundle/nifi-standard-processors/src/main/java/org/apache/nifi/processors/standard/EncodeContent.java:
##########
@@ -112,11 +194,27 @@ public void onTrigger(final ProcessContext context, final ProcessSession session
return;
}
- final boolean encode = context.getProperty(MODE).getValue().equalsIgnoreCase(ENCODE_MODE);
+ // Decide if we should fail on 0-length content
+ final Boolean failOnZeroLengthContent = context.getProperty(FAIL_ON_ZERO_LENGTH_CONTENT).asBoolean();
+
+ final boolean encode = context.getProperty(MODE).getValue().equalsIgnoreCase(ENCODE_MODE.getValue());
final String encoding = context.getProperty(ENCODING).getValue();
- final StreamCallback callback = getStreamCallback(encode, encoding);
+
+ final Boolean singleLineOutput = context.getProperty(SINGLE_LINE_OUTPUT).asBoolean();
+ final Integer lineLength = context.getProperty(ENCODED_LINE_LENGTH).evaluateAttributeExpressions(flowFile).asInteger();
+ final String lineSeparator = context.getProperty(ENCODED_LINE_SEPARATOR).evaluateAttributeExpressions(flowFile).getValue();
+
+ final StreamCallback callback = getStreamCallback(encode, encoding, Boolean.TRUE.equals(singleLineOutput) ? -1 : lineLength, lineSeparator);
Review Comment:
```suggestion
final StreamCallback callback = getStreamCallback(encode, encoding, singleLineOutput ? -1 : lineLength, lineSeparator);
```
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: issues-unsubscribe@nifi.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
Re: [PR] NIFI-12017 add ability to choose to output to single line for base32 base64 contents [nifi]
Posted by "dan-s1 (via GitHub)" <gi...@apache.org>.
dan-s1 commented on code in PR #8038:
URL: https://github.com/apache/nifi/pull/8038#discussion_r1439062586
##########
nifi-nar-bundles/nifi-standard-bundle/nifi-standard-processors/src/main/java/org/apache/nifi/processors/standard/EncodeContent.java:
##########
@@ -55,27 +59,105 @@
@CapabilityDescription("Encode or decode the contents of a FlowFile using Base64, Base32, or hex encoding schemes")
public class EncodeContent extends AbstractProcessor {
- public static final String ENCODE_MODE = "Encode";
- public static final String DECODE_MODE = "Decode";
-
- public static final String BASE64_ENCODING = "base64";
- public static final String BASE32_ENCODING = "base32";
- public static final String HEX_ENCODING = "hex";
+ public static final AllowableValue ENCODE_MODE = new AllowableValue("encode", "Encode", "Sets the operation mode to 'encode'.");
+ public static final AllowableValue DECODE_MODE = new AllowableValue("decode", "Decode", "Sets the operation mode to 'decoding'.");
+
+ public static final AllowableValue BASE64_ENCODING = new AllowableValue("base64", "Base64", "Sets the encoding type to 'Base64'.");
+ public static final AllowableValue BASE32_ENCODING = new AllowableValue("base32", "Base32", "Sets the encoding type to 'Base32'.");
+ public static final AllowableValue HEX_ENCODING = new AllowableValue("hex", "Hexadecimal", "Sets the encoding type to 'Hexadecimal'.");
+
+ /**
+ * Represents an allowable value that indicates the encoded FlowFile content should be output as a single line.
+ * When this value is set, the encoded content will not contain any line breaks or newlines, ensuring
+ * that the entire content is presented in a single, continuous line.
+ * <p>
+ * This value is particularly useful in scenarios where multiline output is not desired or could lead to issues,
+ * such as in certain data formats or when interfacing with systems that expect single-line input.
+ * </p>
+ */
+ static final AllowableValue SINGLE_LINE_OUTPUT_TRUE = new AllowableValue("true", "True", "The encoded FlowFile content will be output as a single line.");
+
+
+ /**
+ * Represents an allowable value that indicates the encoded FlowFile content should be output as multiple lines.
+ * When this value is set, the encoded content will include appropriate line breaks or newlines, breaking
+ * the content into separate lines as required.
+ * <p>
+ * This setting is useful in scenarios where multi-line formatting is necessary or preferred, such as for
+ * improved readability, adherence to specific data formats, or compatibility with systems and tools that
+ * process multi-line input.
+ * </p>
+ */
+ static final AllowableValue SINGLE_LINE_OUTPUT_FALSE = new AllowableValue("false", "False", "The encoded FlowFile content will be output as a multiple lines.");
Review Comment:
I would like to add to @exceptionfactory suggestion. Not only should there should be an enum as he said for the encodings, but I believe there should also be an enum for the single line options whereby you would not need to use the true and false for the values. You can use the actual enum value. So on line 150 instead of specifying each AllowableValue you could just specify the enum class, on lines 233-246 you could use a switch statement with the enum values instead of the if else testing for equality and in the in the `getStreamCallback` you could use the enum instead of a string for the encoding argument.
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: issues-unsubscribe@nifi.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
Re: [PR] NIFI-12017 add ability to choose to output to single line for base32 base64 contents [nifi]
Posted by "dan-s1 (via GitHub)" <gi...@apache.org>.
dan-s1 commented on code in PR #8038:
URL: https://github.com/apache/nifi/pull/8038#discussion_r1439062586
##########
nifi-nar-bundles/nifi-standard-bundle/nifi-standard-processors/src/main/java/org/apache/nifi/processors/standard/EncodeContent.java:
##########
@@ -55,27 +59,105 @@
@CapabilityDescription("Encode or decode the contents of a FlowFile using Base64, Base32, or hex encoding schemes")
public class EncodeContent extends AbstractProcessor {
- public static final String ENCODE_MODE = "Encode";
- public static final String DECODE_MODE = "Decode";
-
- public static final String BASE64_ENCODING = "base64";
- public static final String BASE32_ENCODING = "base32";
- public static final String HEX_ENCODING = "hex";
+ public static final AllowableValue ENCODE_MODE = new AllowableValue("encode", "Encode", "Sets the operation mode to 'encode'.");
+ public static final AllowableValue DECODE_MODE = new AllowableValue("decode", "Decode", "Sets the operation mode to 'decoding'.");
+
+ public static final AllowableValue BASE64_ENCODING = new AllowableValue("base64", "Base64", "Sets the encoding type to 'Base64'.");
+ public static final AllowableValue BASE32_ENCODING = new AllowableValue("base32", "Base32", "Sets the encoding type to 'Base32'.");
+ public static final AllowableValue HEX_ENCODING = new AllowableValue("hex", "Hexadecimal", "Sets the encoding type to 'Hexadecimal'.");
+
+ /**
+ * Represents an allowable value that indicates the encoded FlowFile content should be output as a single line.
+ * When this value is set, the encoded content will not contain any line breaks or newlines, ensuring
+ * that the entire content is presented in a single, continuous line.
+ * <p>
+ * This value is particularly useful in scenarios where multiline output is not desired or could lead to issues,
+ * such as in certain data formats or when interfacing with systems that expect single-line input.
+ * </p>
+ */
+ static final AllowableValue SINGLE_LINE_OUTPUT_TRUE = new AllowableValue("true", "True", "The encoded FlowFile content will be output as a single line.");
+
+
+ /**
+ * Represents an allowable value that indicates the encoded FlowFile content should be output as multiple lines.
+ * When this value is set, the encoded content will include appropriate line breaks or newlines, breaking
+ * the content into separate lines as required.
+ * <p>
+ * This setting is useful in scenarios where multi-line formatting is necessary or preferred, such as for
+ * improved readability, adherence to specific data formats, or compatibility with systems and tools that
+ * process multi-line input.
+ * </p>
+ */
+ static final AllowableValue SINGLE_LINE_OUTPUT_FALSE = new AllowableValue("false", "False", "The encoded FlowFile content will be output as a multiple lines.");
Review Comment:
I would like to add to @exceptionfactory suggestion. Not only should there should be an enum as he said for the encodings, but I believe there should also be an enum for the single line options whereby you would not need to use the true and false for the values. You can use the actual enum value. So on line 150 instead of specifying each AllowableValue you could just specify the enum class and on lines 233-246 you could use a switch statement with the enum values instead of the if else testing for equality.
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: issues-unsubscribe@nifi.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
Re: [PR] NIFI-12017 add ability to choose to output to single line for base32 base64 contents [nifi]
Posted by "dan-s1 (via GitHub)" <gi...@apache.org>.
dan-s1 commented on code in PR #8038:
URL: https://github.com/apache/nifi/pull/8038#discussion_r1439063550
##########
nifi-nar-bundles/nifi-standard-bundle/nifi-standard-processors/src/main/java/org/apache/nifi/processors/standard/EncodeContent.java:
##########
@@ -129,19 +227,20 @@ public void onTrigger(final ProcessContext context, final ProcessSession session
}
}
- private static StreamCallback getStreamCallback(final boolean encode, final String encoding) {
- if (encode) {
- if (encoding.equalsIgnoreCase(BASE64_ENCODING)) {
- return new EncodeBase64();
- } else if (encoding.equalsIgnoreCase(BASE32_ENCODING)) {
- return new EncodeBase32();
+ private static StreamCallback getStreamCallback(final Boolean encode, final String encoding,
+ final Integer lineLength, final String lineSeparator) {
+ if (Boolean.TRUE.equals(encode)) {
Review Comment:
```suggestion
private static StreamCallback getStreamCallback(final boolean encode, final String encoding,
final Integer lineLength, final String lineSeparator) {
if (encode) {
```
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: issues-unsubscribe@nifi.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
Re: [PR] NIFI-12017 add ability to choose to output to single line for base32 base64 contents [nifi]
Posted by "dan-s1 (via GitHub)" <gi...@apache.org>.
dan-s1 commented on code in PR #8038:
URL: https://github.com/apache/nifi/pull/8038#discussion_r1439065793
##########
nifi-nar-bundles/nifi-standard-bundle/nifi-standard-processors/src/main/java/org/apache/nifi/processors/standard/EncodeContent.java:
##########
@@ -171,9 +282,22 @@ public void process(final InputStream in, final OutputStream out) throws IOExcep
private static class EncodeBase32 implements StreamCallback {
+ private int lineLength;
+ private String lineSeparator;
+
+ public EncodeBase32(final Integer lineLength,
Review Comment:
```suggestion
public EncodeBase32(final int lineLength,
```
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: issues-unsubscribe@nifi.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
Re: [PR] NIFI-12017 add ability to choose to output to single line for base32 base64 contents [nifi]
Posted by "dan-s1 (via GitHub)" <gi...@apache.org>.
dan-s1 commented on code in PR #8038:
URL: https://github.com/apache/nifi/pull/8038#discussion_r1439062586
##########
nifi-nar-bundles/nifi-standard-bundle/nifi-standard-processors/src/main/java/org/apache/nifi/processors/standard/EncodeContent.java:
##########
@@ -55,27 +59,105 @@
@CapabilityDescription("Encode or decode the contents of a FlowFile using Base64, Base32, or hex encoding schemes")
public class EncodeContent extends AbstractProcessor {
- public static final String ENCODE_MODE = "Encode";
- public static final String DECODE_MODE = "Decode";
-
- public static final String BASE64_ENCODING = "base64";
- public static final String BASE32_ENCODING = "base32";
- public static final String HEX_ENCODING = "hex";
+ public static final AllowableValue ENCODE_MODE = new AllowableValue("encode", "Encode", "Sets the operation mode to 'encode'.");
+ public static final AllowableValue DECODE_MODE = new AllowableValue("decode", "Decode", "Sets the operation mode to 'decoding'.");
+
+ public static final AllowableValue BASE64_ENCODING = new AllowableValue("base64", "Base64", "Sets the encoding type to 'Base64'.");
+ public static final AllowableValue BASE32_ENCODING = new AllowableValue("base32", "Base32", "Sets the encoding type to 'Base32'.");
+ public static final AllowableValue HEX_ENCODING = new AllowableValue("hex", "Hexadecimal", "Sets the encoding type to 'Hexadecimal'.");
+
+ /**
+ * Represents an allowable value that indicates the encoded FlowFile content should be output as a single line.
+ * When this value is set, the encoded content will not contain any line breaks or newlines, ensuring
+ * that the entire content is presented in a single, continuous line.
+ * <p>
+ * This value is particularly useful in scenarios where multiline output is not desired or could lead to issues,
+ * such as in certain data formats or when interfacing with systems that expect single-line input.
+ * </p>
+ */
+ static final AllowableValue SINGLE_LINE_OUTPUT_TRUE = new AllowableValue("true", "True", "The encoded FlowFile content will be output as a single line.");
+
+
+ /**
+ * Represents an allowable value that indicates the encoded FlowFile content should be output as multiple lines.
+ * When this value is set, the encoded content will include appropriate line breaks or newlines, breaking
+ * the content into separate lines as required.
+ * <p>
+ * This setting is useful in scenarios where multi-line formatting is necessary or preferred, such as for
+ * improved readability, adherence to specific data formats, or compatibility with systems and tools that
+ * process multi-line input.
+ * </p>
+ */
+ static final AllowableValue SINGLE_LINE_OUTPUT_FALSE = new AllowableValue("false", "False", "The encoded FlowFile content will be output as a multiple lines.");
Review Comment:
I would like to add to @exceptionfactory suggestion. Not only should there should be an enum as he said for the encodings, but I believe there should also be an enum for the single line options whereby you would not need to use the true and false for the values. You can use the actual enum value. So on lines 149 and 150 instead of specifying each AllowableValue you could just specify the enum class.
##########
nifi-nar-bundles/nifi-standard-bundle/nifi-standard-processors/src/main/java/org/apache/nifi/processors/standard/EncodeContent.java:
##########
@@ -55,27 +59,105 @@
@CapabilityDescription("Encode or decode the contents of a FlowFile using Base64, Base32, or hex encoding schemes")
public class EncodeContent extends AbstractProcessor {
- public static final String ENCODE_MODE = "Encode";
- public static final String DECODE_MODE = "Decode";
-
- public static final String BASE64_ENCODING = "base64";
- public static final String BASE32_ENCODING = "base32";
- public static final String HEX_ENCODING = "hex";
+ public static final AllowableValue ENCODE_MODE = new AllowableValue("encode", "Encode", "Sets the operation mode to 'encode'.");
+ public static final AllowableValue DECODE_MODE = new AllowableValue("decode", "Decode", "Sets the operation mode to 'decoding'.");
+
+ public static final AllowableValue BASE64_ENCODING = new AllowableValue("base64", "Base64", "Sets the encoding type to 'Base64'.");
+ public static final AllowableValue BASE32_ENCODING = new AllowableValue("base32", "Base32", "Sets the encoding type to 'Base32'.");
+ public static final AllowableValue HEX_ENCODING = new AllowableValue("hex", "Hexadecimal", "Sets the encoding type to 'Hexadecimal'.");
+
+ /**
+ * Represents an allowable value that indicates the encoded FlowFile content should be output as a single line.
+ * When this value is set, the encoded content will not contain any line breaks or newlines, ensuring
+ * that the entire content is presented in a single, continuous line.
+ * <p>
+ * This value is particularly useful in scenarios where multiline output is not desired or could lead to issues,
+ * such as in certain data formats or when interfacing with systems that expect single-line input.
+ * </p>
+ */
+ static final AllowableValue SINGLE_LINE_OUTPUT_TRUE = new AllowableValue("true", "True", "The encoded FlowFile content will be output as a single line.");
+
+
+ /**
+ * Represents an allowable value that indicates the encoded FlowFile content should be output as multiple lines.
+ * When this value is set, the encoded content will include appropriate line breaks or newlines, breaking
+ * the content into separate lines as required.
+ * <p>
+ * This setting is useful in scenarios where multi-line formatting is necessary or preferred, such as for
+ * improved readability, adherence to specific data formats, or compatibility with systems and tools that
+ * process multi-line input.
+ * </p>
+ */
+ static final AllowableValue SINGLE_LINE_OUTPUT_FALSE = new AllowableValue("false", "False", "The encoded FlowFile content will be output as a multiple lines.");
Review Comment:
I would like to add to @exceptionfactory suggestion. Not only should there should be an enum as he said for the encodings, but I believe there should also be an enum for the single line options whereby you would not need to use the true and false for the values. You can use the actual enum value. So on lines 149 and 150 instead of specifying each AllowableValue you could just specify the enum classes.
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: issues-unsubscribe@nifi.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
Re: [PR] NIFI-12017 add ability to choose to output to single line for base32 base64 contents [nifi]
Posted by "dan-s1 (via GitHub)" <gi...@apache.org>.
dan-s1 commented on code in PR #8038:
URL: https://github.com/apache/nifi/pull/8038#discussion_r1439064848
##########
nifi-nar-bundles/nifi-standard-bundle/nifi-standard-processors/src/main/java/org/apache/nifi/processors/standard/EncodeContent.java:
##########
@@ -112,11 +194,27 @@ public void onTrigger(final ProcessContext context, final ProcessSession session
return;
}
- final boolean encode = context.getProperty(MODE).getValue().equalsIgnoreCase(ENCODE_MODE);
+ // Decide if we should fail on 0-length content
+ final Boolean failOnZeroLengthContent = context.getProperty(FAIL_ON_ZERO_LENGTH_CONTENT).asBoolean();
+
+ final boolean encode = context.getProperty(MODE).getValue().equalsIgnoreCase(ENCODE_MODE.getValue());
final String encoding = context.getProperty(ENCODING).getValue();
- final StreamCallback callback = getStreamCallback(encode, encoding);
+
+ final Boolean singleLineOutput = context.getProperty(SINGLE_LINE_OUTPUT).asBoolean();
+ final Integer lineLength = context.getProperty(ENCODED_LINE_LENGTH).evaluateAttributeExpressions(flowFile).asInteger();
+ final String lineSeparator = context.getProperty(ENCODED_LINE_SEPARATOR).evaluateAttributeExpressions(flowFile).getValue();
+
+ final StreamCallback callback = getStreamCallback(encode, encoding, Boolean.TRUE.equals(singleLineOutput) ? -1 : lineLength, lineSeparator);
Review Comment:
```suggestion
final int lineLength = singleLineOutput ? -1 : context.getProperty(ENCODED_LINE_LENGTH).evaluateAttributeExpressions(flowFile).asInteger();
final String lineSeparator = context.getProperty(ENCODED_LINE_SEPARATOR).evaluateAttributeExpressions(flowFile).getValue();
final StreamCallback callback = getStreamCallback(encode, encoding, lineLength, lineSeparator);
```
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: issues-unsubscribe@nifi.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
Re: [PR] NIFI-12017 add ability to choose to output to single line for base32 base64 contents [nifi]
Posted by "dan-s1 (via GitHub)" <gi...@apache.org>.
dan-s1 commented on code in PR #8038:
URL: https://github.com/apache/nifi/pull/8038#discussion_r1439064497
##########
nifi-nar-bundles/nifi-standard-bundle/nifi-standard-processors/src/main/java/org/apache/nifi/processors/standard/EncodeContent.java:
##########
@@ -112,11 +194,27 @@ public void onTrigger(final ProcessContext context, final ProcessSession session
return;
}
- final boolean encode = context.getProperty(MODE).getValue().equalsIgnoreCase(ENCODE_MODE);
+ // Decide if we should fail on 0-length content
+ final Boolean failOnZeroLengthContent = context.getProperty(FAIL_ON_ZERO_LENGTH_CONTENT).asBoolean();
+
+ final boolean encode = context.getProperty(MODE).getValue().equalsIgnoreCase(ENCODE_MODE.getValue());
final String encoding = context.getProperty(ENCODING).getValue();
- final StreamCallback callback = getStreamCallback(encode, encoding);
+
+ final Boolean singleLineOutput = context.getProperty(SINGLE_LINE_OUTPUT).asBoolean();
+ final Integer lineLength = context.getProperty(ENCODED_LINE_LENGTH).evaluateAttributeExpressions(flowFile).asInteger();
+ final String lineSeparator = context.getProperty(ENCODED_LINE_SEPARATOR).evaluateAttributeExpressions(flowFile).getValue();
+
+ final StreamCallback callback = getStreamCallback(encode, encoding, Boolean.TRUE.equals(singleLineOutput) ? -1 : lineLength, lineSeparator);
Review Comment:
```suggestion
final StreamCallback callback = getStreamCallback(encode, encoding, singleLineOutput ? -1 : lineLength, lineSeparator);
```
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: issues-unsubscribe@nifi.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
Re: [PR] NIFI-12017 add ability to choose to output to single line for base32 base64 contents [nifi]
Posted by "dan-s1 (via GitHub)" <gi...@apache.org>.
dan-s1 commented on code in PR #8038:
URL: https://github.com/apache/nifi/pull/8038#discussion_r1439064409
##########
nifi-nar-bundles/nifi-standard-bundle/nifi-standard-processors/src/main/java/org/apache/nifi/processors/standard/EncodeContent.java:
##########
@@ -112,11 +194,27 @@ public void onTrigger(final ProcessContext context, final ProcessSession session
return;
}
- final boolean encode = context.getProperty(MODE).getValue().equalsIgnoreCase(ENCODE_MODE);
+ // Decide if we should fail on 0-length content
+ final Boolean failOnZeroLengthContent = context.getProperty(FAIL_ON_ZERO_LENGTH_CONTENT).asBoolean();
+
+ final boolean encode = context.getProperty(MODE).getValue().equalsIgnoreCase(ENCODE_MODE.getValue());
final String encoding = context.getProperty(ENCODING).getValue();
- final StreamCallback callback = getStreamCallback(encode, encoding);
+
+ final Boolean singleLineOutput = context.getProperty(SINGLE_LINE_OUTPUT).asBoolean();
Review Comment:
```suggestion
final boolean singleLineOutput = context.getProperty(SINGLE_LINE_OUTPUT).asBoolean();
```
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: issues-unsubscribe@nifi.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
Re: [PR] NIFI-12017 add ability to choose to output to single line for base32 base64 contents [nifi]
Posted by "dan-s1 (via GitHub)" <gi...@apache.org>.
dan-s1 commented on code in PR #8038:
URL: https://github.com/apache/nifi/pull/8038#discussion_r1439062586
##########
nifi-nar-bundles/nifi-standard-bundle/nifi-standard-processors/src/main/java/org/apache/nifi/processors/standard/EncodeContent.java:
##########
@@ -55,27 +59,105 @@
@CapabilityDescription("Encode or decode the contents of a FlowFile using Base64, Base32, or hex encoding schemes")
public class EncodeContent extends AbstractProcessor {
- public static final String ENCODE_MODE = "Encode";
- public static final String DECODE_MODE = "Decode";
-
- public static final String BASE64_ENCODING = "base64";
- public static final String BASE32_ENCODING = "base32";
- public static final String HEX_ENCODING = "hex";
+ public static final AllowableValue ENCODE_MODE = new AllowableValue("encode", "Encode", "Sets the operation mode to 'encode'.");
+ public static final AllowableValue DECODE_MODE = new AllowableValue("decode", "Decode", "Sets the operation mode to 'decoding'.");
+
+ public static final AllowableValue BASE64_ENCODING = new AllowableValue("base64", "Base64", "Sets the encoding type to 'Base64'.");
+ public static final AllowableValue BASE32_ENCODING = new AllowableValue("base32", "Base32", "Sets the encoding type to 'Base32'.");
+ public static final AllowableValue HEX_ENCODING = new AllowableValue("hex", "Hexadecimal", "Sets the encoding type to 'Hexadecimal'.");
+
+ /**
+ * Represents an allowable value that indicates the encoded FlowFile content should be output as a single line.
+ * When this value is set, the encoded content will not contain any line breaks or newlines, ensuring
+ * that the entire content is presented in a single, continuous line.
+ * <p>
+ * This value is particularly useful in scenarios where multiline output is not desired or could lead to issues,
+ * such as in certain data formats or when interfacing with systems that expect single-line input.
+ * </p>
+ */
+ static final AllowableValue SINGLE_LINE_OUTPUT_TRUE = new AllowableValue("true", "True", "The encoded FlowFile content will be output as a single line.");
+
+
+ /**
+ * Represents an allowable value that indicates the encoded FlowFile content should be output as multiple lines.
+ * When this value is set, the encoded content will include appropriate line breaks or newlines, breaking
+ * the content into separate lines as required.
+ * <p>
+ * This setting is useful in scenarios where multi-line formatting is necessary or preferred, such as for
+ * improved readability, adherence to specific data formats, or compatibility with systems and tools that
+ * process multi-line input.
+ * </p>
+ */
+ static final AllowableValue SINGLE_LINE_OUTPUT_FALSE = new AllowableValue("false", "False", "The encoded FlowFile content will be output as a multiple lines.");
Review Comment:
I would like to add to @exceptionfactory suggestion. Not only should there should be an enum as he said for the encodings, but I believe there should also be an enum for the single line options whereby you would not need to use the true and false for the values. You can use the actual enum value. So on line 150 instead of specifying each AllowableValue you could just specify the enum class, on lines 233-246 you could use a switch statement with the enum values instead of the if else testing for equality and in the in the `getStreamCallback` you could use the enum instead of a string for the encoding argument.
Also when converting to the enum `SINGLE_LINE_OUTPUT_TRUE` and `SINGLE_LINE_OUTPUT_FALSE` should be renamed to `SINGLE_LINE` AND `MULTILINE`.
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: issues-unsubscribe@nifi.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
Re: [PR] NIFI-12017 add ability to choose to output to single line for base32 base64 contents [nifi]
Posted by "knguyen1 (via GitHub)" <gi...@apache.org>.
knguyen1 commented on code in PR #8038:
URL: https://github.com/apache/nifi/pull/8038#discussion_r1491468311
##########
nifi-nar-bundles/nifi-standard-bundle/nifi-standard-processors/src/main/java/org/apache/nifi/processors/standard/EncodeContent.java:
##########
@@ -112,11 +194,27 @@ public void onTrigger(final ProcessContext context, final ProcessSession session
return;
}
- final boolean encode = context.getProperty(MODE).getValue().equalsIgnoreCase(ENCODE_MODE);
+ // Decide if we should fail on 0-length content
+ final Boolean failOnZeroLengthContent = context.getProperty(FAIL_ON_ZERO_LENGTH_CONTENT).asBoolean();
+
+ final boolean encode = context.getProperty(MODE).getValue().equalsIgnoreCase(ENCODE_MODE.getValue());
final String encoding = context.getProperty(ENCODING).getValue();
- final StreamCallback callback = getStreamCallback(encode, encoding);
+
+ final Boolean singleLineOutput = context.getProperty(SINGLE_LINE_OUTPUT).asBoolean();
+ final Integer lineLength = context.getProperty(ENCODED_LINE_LENGTH).evaluateAttributeExpressions(flowFile).asInteger();
+ final String lineSeparator = context.getProperty(ENCODED_LINE_SEPARATOR).evaluateAttributeExpressions(flowFile).getValue();
+
+ final StreamCallback callback = getStreamCallback(encode, encoding, Boolean.TRUE.equals(singleLineOutput) ? -1 : lineLength, lineSeparator);
Review Comment:
Done. Changed `final Integer` -> `final int`
##########
nifi-nar-bundles/nifi-standard-bundle/nifi-standard-processors/src/main/java/org/apache/nifi/processors/standard/EncodeContent.java:
##########
@@ -112,11 +194,27 @@ public void onTrigger(final ProcessContext context, final ProcessSession session
return;
}
- final boolean encode = context.getProperty(MODE).getValue().equalsIgnoreCase(ENCODE_MODE);
+ // Decide if we should fail on 0-length content
+ final Boolean failOnZeroLengthContent = context.getProperty(FAIL_ON_ZERO_LENGTH_CONTENT).asBoolean();
+
+ final boolean encode = context.getProperty(MODE).getValue().equalsIgnoreCase(ENCODE_MODE.getValue());
final String encoding = context.getProperty(ENCODING).getValue();
- final StreamCallback callback = getStreamCallback(encode, encoding);
+
+ final Boolean singleLineOutput = context.getProperty(SINGLE_LINE_OUTPUT).asBoolean();
Review Comment:
Done.
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: issues-unsubscribe@nifi.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
Re: [PR] NIFI-12017 add ability to choose to output to single line for base32 base64 contents [nifi]
Posted by "knguyen1 (via GitHub)" <gi...@apache.org>.
knguyen1 commented on code in PR #8038:
URL: https://github.com/apache/nifi/pull/8038#discussion_r1491467984
##########
nifi-nar-bundles/nifi-standard-bundle/nifi-standard-processors/src/main/java/org/apache/nifi/processors/standard/EncodeContent.java:
##########
@@ -112,11 +194,27 @@ public void onTrigger(final ProcessContext context, final ProcessSession session
return;
}
- final boolean encode = context.getProperty(MODE).getValue().equalsIgnoreCase(ENCODE_MODE);
+ // Decide if we should fail on 0-length content
+ final Boolean failOnZeroLengthContent = context.getProperty(FAIL_ON_ZERO_LENGTH_CONTENT).asBoolean();
+
+ final boolean encode = context.getProperty(MODE).getValue().equalsIgnoreCase(ENCODE_MODE.getValue());
final String encoding = context.getProperty(ENCODING).getValue();
- final StreamCallback callback = getStreamCallback(encode, encoding);
+
+ final Boolean singleLineOutput = context.getProperty(SINGLE_LINE_OUTPUT).asBoolean();
+ final Integer lineLength = context.getProperty(ENCODED_LINE_LENGTH).evaluateAttributeExpressions(flowFile).asInteger();
+ final String lineSeparator = context.getProperty(ENCODED_LINE_SEPARATOR).evaluateAttributeExpressions(flowFile).getValue();
+
+ final StreamCallback callback = getStreamCallback(encode, encoding, Boolean.TRUE.equals(singleLineOutput) ? -1 : lineLength, lineSeparator);
try {
+ // If flowFile content is null, transfer based on FAIL_ON_ZERO_LENGTH_CONTENT property
+ if (flowFile.getSize() == 0) {
+ if (Boolean.TRUE.equals(failOnZeroLengthContent)) session.transfer(flowFile, REL_FAILURE);
+ else session.transfer(flowFile, REL_SUCCESS);
Review Comment:
Ditto. `failOnZeroLengthContent` removed
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: issues-unsubscribe@nifi.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
Re: [PR] NIFI-12017 add ability to choose to output to single line for base32 base64 contents [nifi]
Posted by "exceptionfactory (via GitHub)" <gi...@apache.org>.
exceptionfactory commented on PR #8038:
URL: https://github.com/apache/nifi/pull/8038#issuecomment-1900878514
Thanks again for your work on these new configuration properties @knguyen1. As it has been several months since the last update, I am closing this pull request for now. When you are ready to follow up, feel free to reopen the pull request and address the feedback, then we can move forward.
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: issues-unsubscribe@nifi.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
Re: [PR] NIFI-12017 add ability to choose to output to single line for base32 base64 contents [nifi]
Posted by "exceptionfactory (via GitHub)" <gi...@apache.org>.
exceptionfactory closed pull request #8038: NIFI-12017 add ability to choose to output to single line for base32 base64 contents
URL: https://github.com/apache/nifi/pull/8038
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: issues-unsubscribe@nifi.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org