[GitHub] [nifi] jbalchan opened a new pull request, #7256: NIFI-11467-Update-jjwt-to-0.11.5
jbalchan opened a new pull request, #7256: URL: https://github.com/apache/nifi/pull/7256 # Summary [NIFI-0](https://issues.apache.org/jira/browse/NIFI-0) # Tracking Please complete the following tracking steps prior to pull request creation. ### Issue Tracking - [ ] [Apache NiFi Jira](https://issues.apache.org/jira/browse/NIFI) issue created ### Pull Request Tracking - [ ] Pull Request title starts with Apache NiFi Jira issue number, such as `NIFI-0` - [ ] Pull Request commit message starts with Apache NiFi Jira issue number, as such `NIFI-0` ### Pull Request Formatting - [ ] Pull Request based on current revision of the `main` branch - [ ] 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 - [ ] Build completed using `mvn clean install -P contrib-check` - [ ] JDK 11 - [ ] JDK 17 ### Licensing - [ ] 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) - [ ] New dependencies are documented in applicable `LICENSE` and `NOTICE` files ### Documentation - [ ] 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-unsubscr...@nifi.apache.org For queries about this service, please contact Infrastructure at: us...@infra.apache.org
[jira] [Comment Edited] (NIFI-11462) Update mysql-binlog-connector-java to 0.28.0
[ https://issues.apache.org/jira/browse/NIFI-11462?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=17723361#comment-17723361 ] Jeyassri Balachandran edited comment on NIFI-11462 at 5/17/23 6:50 AM: --- Looks like this is already done as part of https://github.com/apache/nifi/pull/7116 was (Author: shreeju): Looks like this is already done. > Update mysql-binlog-connector-java to 0.28.0 > > > Key: NIFI-11462 > URL: https://issues.apache.org/jira/browse/NIFI-11462 > Project: Apache NiFi > Issue Type: Improvement >Affects Versions: 1.21.0 >Reporter: Mike R >Priority: Major > -- This message was sent by Atlassian Jira (v8.20.10#820010)
[jira] [Commented] (NIFI-11462) Update mysql-binlog-connector-java to 0.28.0
[ https://issues.apache.org/jira/browse/NIFI-11462?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=17723361#comment-17723361 ] Jeyassri Balachandran commented on NIFI-11462: -- Looks like this is already done. > Update mysql-binlog-connector-java to 0.28.0 > > > Key: NIFI-11462 > URL: https://issues.apache.org/jira/browse/NIFI-11462 > Project: Apache NiFi > Issue Type: Improvement >Affects Versions: 1.21.0 >Reporter: Mike R >Priority: Major > -- This message was sent by Atlassian Jira (v8.20.10#820010)
[jira] [Comment Edited] (NIFI-11462) Update mysql-binlog-connector-java to 0.28.0
[ https://issues.apache.org/jira/browse/NIFI-11462?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=17723357#comment-17723357 ] Jeyassri Balachandran edited comment on NIFI-11462 at 5/17/23 6:38 AM: --- May I raise PR for it today. was (Author: shreeju): I'll raise PR for it today. > Update mysql-binlog-connector-java to 0.28.0 > > > Key: NIFI-11462 > URL: https://issues.apache.org/jira/browse/NIFI-11462 > Project: Apache NiFi > Issue Type: Improvement >Affects Versions: 1.21.0 >Reporter: Mike R >Priority: Major > -- This message was sent by Atlassian Jira (v8.20.10#820010)
[jira] [Commented] (NIFI-11467) Update jjwt to 0.11.5
[ https://issues.apache.org/jira/browse/NIFI-11467?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=17723358#comment-17723358 ] Jeyassri Balachandran commented on NIFI-11467: -- Hi [~msr1716] , I would like to work on it. May I take it up and raise PR? > Update jjwt to 0.11.5 > - > > Key: NIFI-11467 > URL: https://issues.apache.org/jira/browse/NIFI-11467 > Project: Apache NiFi > Issue Type: Improvement >Affects Versions: 1.21.0 >Reporter: Mike R >Priority: Major > > Update jjwt to 0.11.5 to resolve CVE -- This message was sent by Atlassian Jira (v8.20.10#820010)
[jira] [Commented] (NIFI-11462) Update mysql-binlog-connector-java to 0.28.0
[ https://issues.apache.org/jira/browse/NIFI-11462?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=17723357#comment-17723357 ] Jeyassri Balachandran commented on NIFI-11462: -- I'll raise PR for it today. > Update mysql-binlog-connector-java to 0.28.0 > > > Key: NIFI-11462 > URL: https://issues.apache.org/jira/browse/NIFI-11462 > Project: Apache NiFi > Issue Type: Improvement >Affects Versions: 1.21.0 >Reporter: Mike R >Priority: Major > -- This message was sent by Atlassian Jira (v8.20.10#820010)
[jira] [Updated] (NIFI-11558) Apply Security Headers to All Responses from Registry
[ https://issues.apache.org/jira/browse/NIFI-11558?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ] David Handermann updated NIFI-11558: Fix Version/s: 1.latest 2.latest > Apply Security Headers to All Responses from Registry > - > > Key: NIFI-11558 > URL: https://issues.apache.org/jira/browse/NIFI-11558 > Project: Apache NiFi > Issue Type: Improvement > Components: NiFi Registry, Security >Reporter: David Handermann >Assignee: David Handermann >Priority: Minor > Fix For: 1.latest, 2.latest > > > NiFi Registry has a common set of filters that apply several standard > security-related HTTP headers to responses. The Jetty Server configuration > applies these headers to the Registry API and UI applications, but requests > to the root path do not return these headers, which can be misleading to some > automated security scanners. For a consistent approach, the security-related > headers should be applied using a Jetty Handler that works for all requests > and responses. -- This message was sent by Atlassian Jira (v8.20.10#820010)
[jira] [Created] (NIFI-11558) Apply Security Headers to All Responses from Registry
David Handermann created NIFI-11558: --- Summary: Apply Security Headers to All Responses from Registry Key: NIFI-11558 URL: https://issues.apache.org/jira/browse/NIFI-11558 Project: Apache NiFi Issue Type: Improvement Components: NiFi Registry, Security Reporter: David Handermann Assignee: David Handermann NiFi Registry has a common set of filters that apply several standard security-related HTTP headers to responses. The Jetty Server configuration applies these headers to the Registry API and UI applications, but requests to the root path do not return these headers, which can be misleading to some automated security scanners. For a consistent approach, the security-related headers should be applied using a Jetty Handler that works for all requests and responses. -- This message was sent by Atlassian Jira (v8.20.10#820010)
[GitHub] [nifi] exceptionfactory commented on a diff in pull request #7194: NIFI-11167 - Add Excel Record Reader
exceptionfactory commented on code in PR #7194: URL: https://github.com/apache/nifi/pull/7194#discussion_r1195809425 ## nifi-nar-bundles/nifi-standard-services/nifi-record-serialization-services-bundle/nifi-record-serialization-services/src/main/java/org/apache/nifi/excel/ExcelRecordReader.java: ## @@ -0,0 +1,221 @@ +/* + * 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. + */ +package org.apache.nifi.excel; + +import org.apache.nifi.logging.ComponentLog; +import org.apache.nifi.serialization.MalformedRecordException; +import org.apache.nifi.serialization.RecordReader; +import org.apache.nifi.serialization.record.DataType; +import org.apache.nifi.serialization.record.MapRecord; +import org.apache.nifi.serialization.record.Record; +import org.apache.nifi.serialization.record.RecordField; +import org.apache.nifi.serialization.record.RecordSchema; +import org.apache.nifi.serialization.record.util.DataTypeUtils; +import org.apache.poi.ss.usermodel.Cell; +import org.apache.poi.ss.usermodel.DateUtil; +import org.apache.poi.ss.usermodel.Row; + +import java.io.IOException; +import java.text.DateFormat; +import java.util.ArrayList; +import java.util.LinkedHashMap; +import java.util.List; +import java.util.Map; +import java.util.function.Supplier; +import java.util.stream.IntStream; + +import static org.apache.commons.lang3.StringUtils.isEmpty; + +public class ExcelRecordReader implements RecordReader { +private final RowIterator rowIterator; +private ComponentLog logger; +private final RecordSchema schema; +private final List desiredSheets; +private final Supplier LAZY_DATE_FORMAT; +private final Supplier LAZY_TIME_FORMAT; +private final Supplier LAZY_TIMESTAMP_FORMAT; +private final String dateFormat; +private final String timeFormat; +private final String timestampFormat; + +public ExcelRecordReader(ExcelRecordReaderArgs args) throws MalformedRecordException { +this.logger = args.getLogger(); +this.schema = args.getSchema(); +this.desiredSheets = new ArrayList<>(); +if (args.getDesiredSheets() != null && args.getDesiredSheets().length() > 0) { +IntStream.range(0, args.getDesiredSheets().length()) +.forEach(index -> this.desiredSheets.add(args.getDesiredSheets().get(index))); +} + +if (isEmpty(args.getDateFormat())) { +this.dateFormat = null; +LAZY_DATE_FORMAT = null; +} else { +this.dateFormat = args.getDateFormat(); +LAZY_DATE_FORMAT = () -> DataTypeUtils.getDateFormat(dateFormat); +} + +if (isEmpty(args.getTimeFormat())) { +this.timeFormat = null; +LAZY_TIME_FORMAT = null; +} else { +this.timeFormat = args.getTimeFormat(); +LAZY_TIME_FORMAT = () -> DataTypeUtils.getDateFormat(timeFormat); +} + +if (isEmpty(args.getTimestampFormat())) { +this.timestampFormat = null; +LAZY_TIMESTAMP_FORMAT = null; +} else { +this.timestampFormat = args.getTimestampFormat(); +LAZY_TIMESTAMP_FORMAT = () -> DataTypeUtils.getDateFormat(timestampFormat); +} + +try { +this.rowIterator = new RowIterator(args.getInputStream(), desiredSheets, args.getFirstRow(), logger); +} catch (RuntimeException e) { +String msg = "Error occurred while processing record file"; +logger.error(msg, e); +throw new MalformedRecordException(msg, e); +} +} + +@Override +public Record nextRecord(boolean coerceTypes, boolean dropUnknownFields) throws IOException, MalformedRecordException { +try { +if (rowIterator.hasNext()) { +Row currentRow = rowIterator.next(); +Map currentRowValues = getCurrentRowValues(currentRow, coerceTypes, dropUnknownFields); +return new MapRecord(schema, currentRowValues); +} +} catch (Exception e) { +throw new MalformedRecordException("Error while getting next record", e); +} +return null; +} + +private Map getCurrentRowValues(Row curren
[GitHub] [nifi] dan-s1 commented on a diff in pull request #7194: NIFI-11167 - Add Excel Record Reader
dan-s1 commented on code in PR #7194: URL: https://github.com/apache/nifi/pull/7194#discussion_r1195735458 ## nifi-nar-bundles/nifi-standard-services/nifi-record-serialization-services-bundle/nifi-record-serialization-services/src/main/java/org/apache/nifi/excel/ExcelRecordReader.java: ## @@ -0,0 +1,221 @@ +/* + * 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. + */ +package org.apache.nifi.excel; + +import org.apache.nifi.logging.ComponentLog; +import org.apache.nifi.serialization.MalformedRecordException; +import org.apache.nifi.serialization.RecordReader; +import org.apache.nifi.serialization.record.DataType; +import org.apache.nifi.serialization.record.MapRecord; +import org.apache.nifi.serialization.record.Record; +import org.apache.nifi.serialization.record.RecordField; +import org.apache.nifi.serialization.record.RecordSchema; +import org.apache.nifi.serialization.record.util.DataTypeUtils; +import org.apache.poi.ss.usermodel.Cell; +import org.apache.poi.ss.usermodel.DateUtil; +import org.apache.poi.ss.usermodel.Row; + +import java.io.IOException; +import java.text.DateFormat; +import java.util.ArrayList; +import java.util.LinkedHashMap; +import java.util.List; +import java.util.Map; +import java.util.function.Supplier; +import java.util.stream.IntStream; + +import static org.apache.commons.lang3.StringUtils.isEmpty; + +public class ExcelRecordReader implements RecordReader { +private final RowIterator rowIterator; +private ComponentLog logger; +private final RecordSchema schema; +private final List desiredSheets; +private final Supplier LAZY_DATE_FORMAT; +private final Supplier LAZY_TIME_FORMAT; +private final Supplier LAZY_TIMESTAMP_FORMAT; +private final String dateFormat; +private final String timeFormat; +private final String timestampFormat; + +public ExcelRecordReader(ExcelRecordReaderArgs args) throws MalformedRecordException { +this.logger = args.getLogger(); +this.schema = args.getSchema(); +this.desiredSheets = new ArrayList<>(); +if (args.getDesiredSheets() != null && args.getDesiredSheets().length() > 0) { +IntStream.range(0, args.getDesiredSheets().length()) +.forEach(index -> this.desiredSheets.add(args.getDesiredSheets().get(index))); +} + +if (isEmpty(args.getDateFormat())) { +this.dateFormat = null; +LAZY_DATE_FORMAT = null; +} else { +this.dateFormat = args.getDateFormat(); +LAZY_DATE_FORMAT = () -> DataTypeUtils.getDateFormat(dateFormat); +} + +if (isEmpty(args.getTimeFormat())) { +this.timeFormat = null; +LAZY_TIME_FORMAT = null; +} else { +this.timeFormat = args.getTimeFormat(); +LAZY_TIME_FORMAT = () -> DataTypeUtils.getDateFormat(timeFormat); +} + +if (isEmpty(args.getTimestampFormat())) { +this.timestampFormat = null; +LAZY_TIMESTAMP_FORMAT = null; +} else { +this.timestampFormat = args.getTimestampFormat(); +LAZY_TIMESTAMP_FORMAT = () -> DataTypeUtils.getDateFormat(timestampFormat); +} + +try { +this.rowIterator = new RowIterator(args.getInputStream(), desiredSheets, args.getFirstRow(), logger); +} catch (RuntimeException e) { +String msg = "Error occurred while processing record file"; +logger.error(msg, e); +throw new MalformedRecordException(msg, e); +} +} + +@Override +public Record nextRecord(boolean coerceTypes, boolean dropUnknownFields) throws IOException, MalformedRecordException { +try { +if (rowIterator.hasNext()) { +Row currentRow = rowIterator.next(); +Map currentRowValues = getCurrentRowValues(currentRow, coerceTypes, dropUnknownFields); +return new MapRecord(schema, currentRowValues); +} +} catch (Exception e) { +throw new MalformedRecordException("Error while getting next record", e); +} +return null; +} + +private Map getCurrentRowValues(Row currentRow, bool
[GitHub] [nifi] dan-s1 commented on a diff in pull request #7194: NIFI-11167 - Add Excel Record Reader
dan-s1 commented on code in PR #7194: URL: https://github.com/apache/nifi/pull/7194#discussion_r1195735458 ## nifi-nar-bundles/nifi-standard-services/nifi-record-serialization-services-bundle/nifi-record-serialization-services/src/main/java/org/apache/nifi/excel/ExcelRecordReader.java: ## @@ -0,0 +1,221 @@ +/* + * 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. + */ +package org.apache.nifi.excel; + +import org.apache.nifi.logging.ComponentLog; +import org.apache.nifi.serialization.MalformedRecordException; +import org.apache.nifi.serialization.RecordReader; +import org.apache.nifi.serialization.record.DataType; +import org.apache.nifi.serialization.record.MapRecord; +import org.apache.nifi.serialization.record.Record; +import org.apache.nifi.serialization.record.RecordField; +import org.apache.nifi.serialization.record.RecordSchema; +import org.apache.nifi.serialization.record.util.DataTypeUtils; +import org.apache.poi.ss.usermodel.Cell; +import org.apache.poi.ss.usermodel.DateUtil; +import org.apache.poi.ss.usermodel.Row; + +import java.io.IOException; +import java.text.DateFormat; +import java.util.ArrayList; +import java.util.LinkedHashMap; +import java.util.List; +import java.util.Map; +import java.util.function.Supplier; +import java.util.stream.IntStream; + +import static org.apache.commons.lang3.StringUtils.isEmpty; + +public class ExcelRecordReader implements RecordReader { +private final RowIterator rowIterator; +private ComponentLog logger; +private final RecordSchema schema; +private final List desiredSheets; +private final Supplier LAZY_DATE_FORMAT; +private final Supplier LAZY_TIME_FORMAT; +private final Supplier LAZY_TIMESTAMP_FORMAT; +private final String dateFormat; +private final String timeFormat; +private final String timestampFormat; + +public ExcelRecordReader(ExcelRecordReaderArgs args) throws MalformedRecordException { +this.logger = args.getLogger(); +this.schema = args.getSchema(); +this.desiredSheets = new ArrayList<>(); +if (args.getDesiredSheets() != null && args.getDesiredSheets().length() > 0) { +IntStream.range(0, args.getDesiredSheets().length()) +.forEach(index -> this.desiredSheets.add(args.getDesiredSheets().get(index))); +} + +if (isEmpty(args.getDateFormat())) { +this.dateFormat = null; +LAZY_DATE_FORMAT = null; +} else { +this.dateFormat = args.getDateFormat(); +LAZY_DATE_FORMAT = () -> DataTypeUtils.getDateFormat(dateFormat); +} + +if (isEmpty(args.getTimeFormat())) { +this.timeFormat = null; +LAZY_TIME_FORMAT = null; +} else { +this.timeFormat = args.getTimeFormat(); +LAZY_TIME_FORMAT = () -> DataTypeUtils.getDateFormat(timeFormat); +} + +if (isEmpty(args.getTimestampFormat())) { +this.timestampFormat = null; +LAZY_TIMESTAMP_FORMAT = null; +} else { +this.timestampFormat = args.getTimestampFormat(); +LAZY_TIMESTAMP_FORMAT = () -> DataTypeUtils.getDateFormat(timestampFormat); +} + +try { +this.rowIterator = new RowIterator(args.getInputStream(), desiredSheets, args.getFirstRow(), logger); +} catch (RuntimeException e) { +String msg = "Error occurred while processing record file"; +logger.error(msg, e); +throw new MalformedRecordException(msg, e); +} +} + +@Override +public Record nextRecord(boolean coerceTypes, boolean dropUnknownFields) throws IOException, MalformedRecordException { +try { +if (rowIterator.hasNext()) { +Row currentRow = rowIterator.next(); +Map currentRowValues = getCurrentRowValues(currentRow, coerceTypes, dropUnknownFields); +return new MapRecord(schema, currentRowValues); +} +} catch (Exception e) { +throw new MalformedRecordException("Error while getting next record", e); +} +return null; +} + +private Map getCurrentRowValues(Row currentRow, bool
[GitHub] [nifi] greyp9 commented on a diff in pull request #7255: NIFI-11553 - additional configurability for GCP processors
greyp9 commented on code in PR #7255: URL: https://github.com/apache/nifi/pull/7255#discussion_r1195728445 ## nifi-nar-bundles/nifi-gcp-bundle/nifi-gcp-processors/src/main/java/org/apache/nifi/processors/gcp/pubsub/lite/PublishGCPubSubLite.java: ## @@ -112,26 +112,16 @@ public class PublishGCPubSubLite extends AbstractGCPubSubProcessor implements Ve .addValidator(StandardValidators.NON_BLANK_VALIDATOR) .build(); -public static final PropertyDescriptor BATCH_BYTES = new PropertyDescriptor Review Comment: This descriptor hoisted up to super 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-unsubscr...@nifi.apache.org For queries about this service, please contact Infrastructure at: us...@infra.apache.org
[GitHub] [nifi] greyp9 commented on a diff in pull request #7255: NIFI-11553 - additional configurability for GCP processors
greyp9 commented on code in PR #7255: URL: https://github.com/apache/nifi/pull/7255#discussion_r1195727879 ## nifi-nar-bundles/nifi-gcp-bundle/nifi-gcp-processors/src/main/java/org/apache/nifi/processors/gcp/pubsub/AbstractGCPubSubProcessor.java: ## @@ -36,16 +37,47 @@ public abstract class AbstractGCPubSubProcessor extends AbstractGCPProcessor implements VerifiableProcessor { -public static final PropertyDescriptor BATCH_SIZE = new PropertyDescriptor.Builder() +public static final PropertyDescriptor BATCH_SIZE_THRESHOLD = new PropertyDescriptor.Builder() Review Comment: This rename in order to align with sibling descriptors. The descriptor name stays the same, so should be no backward compat issue. -- 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-unsubscr...@nifi.apache.org For queries about this service, please contact Infrastructure at: us...@infra.apache.org
[GitHub] [nifi] greyp9 opened a new pull request, #7255: NIFI-11553 - additional configurability for GCP processors
greyp9 opened a new pull request, #7255: URL: https://github.com/apache/nifi/pull/7255 # Summary [NIFI-11553](https://issues.apache.org/jira/browse/NIFI-11553) # 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-0` - [x] Pull Request commit message starts with Apache NiFi Jira issue number, as such `NIFI-0` ### 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 11 - [x] JDK 17 ### 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-unsubscr...@nifi.apache.org For queries about this service, please contact Infrastructure at: us...@infra.apache.org
[jira] [Updated] (NIFI-11369) MergeContent unexpected behaviour
[ https://issues.apache.org/jira/browse/NIFI-11369?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ] Peter Turcsanyi updated NIFI-11369: --- Status: Patch Available (was: In Progress) > MergeContent unexpected behaviour > - > > Key: NIFI-11369 > URL: https://issues.apache.org/jira/browse/NIFI-11369 > Project: Apache NiFi > Issue Type: Bug > Components: Core Framework >Affects Versions: 1.20.0 >Reporter: Tamas Neumer >Assignee: Peter Turcsanyi >Priority: Minor > > Hi, > I would like to merge FlowFiles and came across the following documentation: > [https://nifi.apache.org/docs/nifi-docs/components/org.apache.nifi/nifi-standard-nar/1.20.0/org.apache.nifi.processors.standard.MergeContent/additionalDetails.html|https://nifi.apache.org/docs/nifi-docs/components/org.apache.nifi/nifi-standard-nar/[%E2%80%A6].nifi.processors.standard.MergeContent/additionalDetails.html] > Quoting from it: _"It is not necessary that all FlowFiles have this value, > but at least one FlowFile in the bin must have this value or the bin will > never be complete..."_ > I have built a flow that assigns the following attributes to the FlowFiles: > * fragment.identifier > * fragment.index > * segment.original.filename > As stated in the documentation mentioned above, the attribute fragment.count > is just assigned to the last FlowFiles with the correct number. > The error I experience is that all the flow files without fragment.count > provoke an error stating: > .. Cannot Defragment ...because it does not have an integer value for the > fragment.count attribute; routing to failure > > Could you help us out please? > Thank you! > Kind regards, > Florian and Tamas -- This message was sent by Atlassian Jira (v8.20.10#820010)
[GitHub] [nifi] turcsanyip opened a new pull request, #7254: NIFI-11369: Fixed Defragment strategy with optional fragment.count at…
turcsanyip opened a new pull request, #7254: URL: https://github.com/apache/nifi/pull/7254 …tribute in MergeContent # Summary [NIFI-11369](https://issues.apache.org/jira/browse/NIFI-11369) # Tracking Please complete the following tracking steps prior to pull request creation. ### Issue Tracking - [ ] [Apache NiFi Jira](https://issues.apache.org/jira/browse/NIFI) issue created ### Pull Request Tracking - [ ] Pull Request title starts with Apache NiFi Jira issue number, such as `NIFI-0` - [ ] Pull Request commit message starts with Apache NiFi Jira issue number, as such `NIFI-0` ### Pull Request Formatting - [ ] Pull Request based on current revision of the `main` branch - [ ] 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 - [ ] Build completed using `mvn clean install -P contrib-check` - [ ] JDK 11 - [ ] JDK 17 ### Licensing - [ ] 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) - [ ] New dependencies are documented in applicable `LICENSE` and `NOTICE` files ### Documentation - [ ] 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-unsubscr...@nifi.apache.org For queries about this service, please contact Infrastructure at: us...@infra.apache.org
[GitHub] [nifi] exceptionfactory commented on a diff in pull request #7194: NIFI-11167 - Add Excel Record Reader
exceptionfactory commented on code in PR #7194: URL: https://github.com/apache/nifi/pull/7194#discussion_r1195712821 ## nifi-nar-bundles/nifi-standard-services/nifi-record-serialization-services-bundle/nifi-record-serialization-services/src/main/java/org/apache/nifi/excel/RowIterator.java: ## @@ -0,0 +1,155 @@ +/* + * 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. + */package org.apache.nifi.excel; + +import com.github.pjfanning.xlsx.StreamingReader; +import org.apache.nifi.logging.ComponentLog; +import org.apache.poi.ss.usermodel.Row; +import org.apache.poi.ss.usermodel.Sheet; +import org.apache.poi.ss.usermodel.Workbook; + +import java.io.Closeable; +import java.io.IOException; +import java.io.InputStream; +import java.util.HashMap; +import java.util.Iterator; +import java.util.List; +import java.util.Map; +import java.util.stream.Collectors; + +public class RowIterator implements Iterator, Closeable { +private final Workbook workbook; +private final Iterator sheets; +private Sheet currentSheet; +private Iterator currentRows; +private final Map desiredSheets; +private final int firstRow; +private ComponentLog logger; +private boolean log; +private Row currentRow; + +public RowIterator(InputStream in, List desiredSheets, int firstRow) { +this(in, desiredSheets, firstRow, null); +} + +public RowIterator(InputStream in, List desiredSheets, int firstRow, ComponentLog logger) { +this.workbook = StreamingReader.builder() +.rowCacheSize(100) +.bufferSize(4096) +.open(in); +this.sheets = this.workbook.iterator(); +this.desiredSheets = desiredSheets != null ? desiredSheets.stream() +.collect(Collectors.toMap(key -> key, value -> Boolean.FALSE)) : new HashMap<>(); +this.firstRow = firstRow; +this.logger = logger; +this.log = logger != null; +} + +@Override +public boolean hasNext() { +setCurrent(); +boolean next = currentRow != null; +if(!next) { +String sheetsNotFound = getSheetsNotFound(desiredSheets); +if (!sheetsNotFound.isEmpty() && log) { +logger.warn("Excel sheet(s) not found: {}", sheetsNotFound); +} Review Comment: Some of the other Record Readers add a record.count attribute, which is useful for tracking. That's probably a better option than logging a warning. -- 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-unsubscr...@nifi.apache.org For queries about this service, please contact Infrastructure at: us...@infra.apache.org
[GitHub] [nifi] exceptionfactory commented on a diff in pull request #7194: NIFI-11167 - Add Excel Record Reader
exceptionfactory commented on code in PR #7194: URL: https://github.com/apache/nifi/pull/7194#discussion_r1195705310 ## nifi-nar-bundles/nifi-standard-services/nifi-record-serialization-services-bundle/nifi-record-serialization-services/src/main/java/org/apache/nifi/excel/ExcelRecordReader.java: ## @@ -0,0 +1,221 @@ +/* + * 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. + */ +package org.apache.nifi.excel; + +import org.apache.nifi.logging.ComponentLog; +import org.apache.nifi.serialization.MalformedRecordException; +import org.apache.nifi.serialization.RecordReader; +import org.apache.nifi.serialization.record.DataType; +import org.apache.nifi.serialization.record.MapRecord; +import org.apache.nifi.serialization.record.Record; +import org.apache.nifi.serialization.record.RecordField; +import org.apache.nifi.serialization.record.RecordSchema; +import org.apache.nifi.serialization.record.util.DataTypeUtils; +import org.apache.poi.ss.usermodel.Cell; +import org.apache.poi.ss.usermodel.DateUtil; +import org.apache.poi.ss.usermodel.Row; + +import java.io.IOException; +import java.text.DateFormat; +import java.util.ArrayList; +import java.util.LinkedHashMap; +import java.util.List; +import java.util.Map; +import java.util.function.Supplier; +import java.util.stream.IntStream; + +import static org.apache.commons.lang3.StringUtils.isEmpty; + +public class ExcelRecordReader implements RecordReader { +private final RowIterator rowIterator; +private ComponentLog logger; +private final RecordSchema schema; +private final List desiredSheets; +private final Supplier LAZY_DATE_FORMAT; +private final Supplier LAZY_TIME_FORMAT; +private final Supplier LAZY_TIMESTAMP_FORMAT; +private final String dateFormat; +private final String timeFormat; +private final String timestampFormat; + +public ExcelRecordReader(ExcelRecordReaderArgs args) throws MalformedRecordException { +this.logger = args.getLogger(); +this.schema = args.getSchema(); +this.desiredSheets = new ArrayList<>(); +if (args.getDesiredSheets() != null && args.getDesiredSheets().length() > 0) { +IntStream.range(0, args.getDesiredSheets().length()) +.forEach(index -> this.desiredSheets.add(args.getDesiredSheets().get(index))); +} + +if (isEmpty(args.getDateFormat())) { +this.dateFormat = null; +LAZY_DATE_FORMAT = null; +} else { +this.dateFormat = args.getDateFormat(); +LAZY_DATE_FORMAT = () -> DataTypeUtils.getDateFormat(dateFormat); +} + +if (isEmpty(args.getTimeFormat())) { +this.timeFormat = null; +LAZY_TIME_FORMAT = null; +} else { +this.timeFormat = args.getTimeFormat(); +LAZY_TIME_FORMAT = () -> DataTypeUtils.getDateFormat(timeFormat); +} + +if (isEmpty(args.getTimestampFormat())) { +this.timestampFormat = null; +LAZY_TIMESTAMP_FORMAT = null; +} else { +this.timestampFormat = args.getTimestampFormat(); +LAZY_TIMESTAMP_FORMAT = () -> DataTypeUtils.getDateFormat(timestampFormat); +} + +try { +this.rowIterator = new RowIterator(args.getInputStream(), desiredSheets, args.getFirstRow(), logger); +} catch (RuntimeException e) { +String msg = "Error occurred while processing record file"; +logger.error(msg, e); +throw new MalformedRecordException(msg, e); +} +} + +@Override +public Record nextRecord(boolean coerceTypes, boolean dropUnknownFields) throws IOException, MalformedRecordException { +try { +if (rowIterator.hasNext()) { +Row currentRow = rowIterator.next(); +Map currentRowValues = getCurrentRowValues(currentRow, coerceTypes, dropUnknownFields); +return new MapRecord(schema, currentRowValues); +} +} catch (Exception e) { +throw new MalformedRecordException("Error while getting next record", e); +} +return null; +} + +private Map getCurrentRowValues(Row curren
[GitHub] [nifi] dan-s1 commented on a diff in pull request #7194: NIFI-11167 - Add Excel Record Reader
dan-s1 commented on code in PR #7194: URL: https://github.com/apache/nifi/pull/7194#discussion_r1195704788 ## nifi-nar-bundles/nifi-standard-services/nifi-record-serialization-services-bundle/nifi-record-serialization-services/src/main/java/org/apache/nifi/excel/RowIterator.java: ## @@ -0,0 +1,155 @@ +/* + * 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. + */package org.apache.nifi.excel; + +import com.github.pjfanning.xlsx.StreamingReader; +import org.apache.nifi.logging.ComponentLog; +import org.apache.poi.ss.usermodel.Row; +import org.apache.poi.ss.usermodel.Sheet; +import org.apache.poi.ss.usermodel.Workbook; + +import java.io.Closeable; +import java.io.IOException; +import java.io.InputStream; +import java.util.HashMap; +import java.util.Iterator; +import java.util.List; +import java.util.Map; +import java.util.stream.Collectors; + +public class RowIterator implements Iterator, Closeable { +private final Workbook workbook; +private final Iterator sheets; +private Sheet currentSheet; +private Iterator currentRows; +private final Map desiredSheets; +private final int firstRow; +private ComponentLog logger; +private boolean log; +private Row currentRow; + +public RowIterator(InputStream in, List desiredSheets, int firstRow) { +this(in, desiredSheets, firstRow, null); +} + +public RowIterator(InputStream in, List desiredSheets, int firstRow, ComponentLog logger) { +this.workbook = StreamingReader.builder() +.rowCacheSize(100) +.bufferSize(4096) +.open(in); +this.sheets = this.workbook.iterator(); +this.desiredSheets = desiredSheets != null ? desiredSheets.stream() +.collect(Collectors.toMap(key -> key, value -> Boolean.FALSE)) : new HashMap<>(); +this.firstRow = firstRow; +this.logger = logger; +this.log = logger != null; +} + +@Override +public boolean hasNext() { +setCurrent(); +boolean next = currentRow != null; +if(!next) { +String sheetsNotFound = getSheetsNotFound(desiredSheets); +if (!sheetsNotFound.isEmpty() && log) { +logger.warn("Excel sheet(s) not found: {}", sheetsNotFound); +} Review Comment: This the bulletin generated which is remnant from the ConvertExcelToCsv processor. I thought this is the only place to log it as it is the only data structure that iterates the sheets of the Excel document. -- 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-unsubscr...@nifi.apache.org For queries about this service, please contact Infrastructure at: us...@infra.apache.org
[GitHub] [nifi] dan-s1 commented on a diff in pull request #7194: NIFI-11167 - Add Excel Record Reader
dan-s1 commented on code in PR #7194: URL: https://github.com/apache/nifi/pull/7194#discussion_r1195650443 ## nifi-nar-bundles/nifi-standard-services/nifi-record-serialization-services-bundle/nifi-record-serialization-services/src/main/java/org/apache/nifi/excel/ExcelUtils.java: ## @@ -0,0 +1,28 @@ +/* + * 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. + */ +package org.apache.nifi.excel; + +import org.apache.poi.ss.usermodel.Row; + +public class ExcelUtils { Review Comment: @exceptionfactory This method is used in 3 different classes ExcelHeaderSchemaStrategy (line 79), ExcelRecordReader (line 113) and ExcelSchemaInference (line 64). I did not want to have to duplicate the code. Would it be better to declare the method static in one class and have the other 2 classes use that method? -- 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-unsubscr...@nifi.apache.org For queries about this service, please contact Infrastructure at: us...@infra.apache.org
[GitHub] [nifi] dan-s1 commented on a diff in pull request #7194: NIFI-11167 - Add Excel Record Reader
dan-s1 commented on code in PR #7194: URL: https://github.com/apache/nifi/pull/7194#discussion_r1195701731 ## nifi-nar-bundles/nifi-standard-services/nifi-record-serialization-services-bundle/nifi-record-serialization-services/src/main/java/org/apache/nifi/excel/ExcelRecordReader.java: ## @@ -0,0 +1,221 @@ +/* + * 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. + */ +package org.apache.nifi.excel; + +import org.apache.nifi.logging.ComponentLog; +import org.apache.nifi.serialization.MalformedRecordException; +import org.apache.nifi.serialization.RecordReader; +import org.apache.nifi.serialization.record.DataType; +import org.apache.nifi.serialization.record.MapRecord; +import org.apache.nifi.serialization.record.Record; +import org.apache.nifi.serialization.record.RecordField; +import org.apache.nifi.serialization.record.RecordSchema; +import org.apache.nifi.serialization.record.util.DataTypeUtils; +import org.apache.poi.ss.usermodel.Cell; +import org.apache.poi.ss.usermodel.DateUtil; +import org.apache.poi.ss.usermodel.Row; + +import java.io.IOException; +import java.text.DateFormat; +import java.util.ArrayList; +import java.util.LinkedHashMap; +import java.util.List; +import java.util.Map; +import java.util.function.Supplier; +import java.util.stream.IntStream; + +import static org.apache.commons.lang3.StringUtils.isEmpty; + +public class ExcelRecordReader implements RecordReader { +private final RowIterator rowIterator; +private ComponentLog logger; +private final RecordSchema schema; +private final List desiredSheets; +private final Supplier LAZY_DATE_FORMAT; +private final Supplier LAZY_TIME_FORMAT; +private final Supplier LAZY_TIMESTAMP_FORMAT; +private final String dateFormat; +private final String timeFormat; +private final String timestampFormat; + +public ExcelRecordReader(ExcelRecordReaderArgs args) throws MalformedRecordException { +this.logger = args.getLogger(); +this.schema = args.getSchema(); +this.desiredSheets = new ArrayList<>(); +if (args.getDesiredSheets() != null && args.getDesiredSheets().length() > 0) { +IntStream.range(0, args.getDesiredSheets().length()) +.forEach(index -> this.desiredSheets.add(args.getDesiredSheets().get(index))); +} + +if (isEmpty(args.getDateFormat())) { +this.dateFormat = null; +LAZY_DATE_FORMAT = null; +} else { +this.dateFormat = args.getDateFormat(); +LAZY_DATE_FORMAT = () -> DataTypeUtils.getDateFormat(dateFormat); +} + +if (isEmpty(args.getTimeFormat())) { +this.timeFormat = null; +LAZY_TIME_FORMAT = null; +} else { +this.timeFormat = args.getTimeFormat(); +LAZY_TIME_FORMAT = () -> DataTypeUtils.getDateFormat(timeFormat); +} + +if (isEmpty(args.getTimestampFormat())) { +this.timestampFormat = null; +LAZY_TIMESTAMP_FORMAT = null; +} else { +this.timestampFormat = args.getTimestampFormat(); +LAZY_TIMESTAMP_FORMAT = () -> DataTypeUtils.getDateFormat(timestampFormat); +} + +try { +this.rowIterator = new RowIterator(args.getInputStream(), desiredSheets, args.getFirstRow(), logger); +} catch (RuntimeException e) { +String msg = "Error occurred while processing record file"; +logger.error(msg, e); +throw new MalformedRecordException(msg, e); +} +} + +@Override +public Record nextRecord(boolean coerceTypes, boolean dropUnknownFields) throws IOException, MalformedRecordException { +try { +if (rowIterator.hasNext()) { +Row currentRow = rowIterator.next(); +Map currentRowValues = getCurrentRowValues(currentRow, coerceTypes, dropUnknownFields); +return new MapRecord(schema, currentRowValues); +} +} catch (Exception e) { +throw new MalformedRecordException("Error while getting next record", e); +} +return null; +} + +private Map getCurrentRowValues(Row currentRow, bool
[GitHub] [nifi] dan-s1 commented on a diff in pull request #7194: NIFI-11167 - Add Excel Record Reader
dan-s1 commented on code in PR #7194: URL: https://github.com/apache/nifi/pull/7194#discussion_r1195701731 ## nifi-nar-bundles/nifi-standard-services/nifi-record-serialization-services-bundle/nifi-record-serialization-services/src/main/java/org/apache/nifi/excel/ExcelRecordReader.java: ## @@ -0,0 +1,221 @@ +/* + * 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. + */ +package org.apache.nifi.excel; + +import org.apache.nifi.logging.ComponentLog; +import org.apache.nifi.serialization.MalformedRecordException; +import org.apache.nifi.serialization.RecordReader; +import org.apache.nifi.serialization.record.DataType; +import org.apache.nifi.serialization.record.MapRecord; +import org.apache.nifi.serialization.record.Record; +import org.apache.nifi.serialization.record.RecordField; +import org.apache.nifi.serialization.record.RecordSchema; +import org.apache.nifi.serialization.record.util.DataTypeUtils; +import org.apache.poi.ss.usermodel.Cell; +import org.apache.poi.ss.usermodel.DateUtil; +import org.apache.poi.ss.usermodel.Row; + +import java.io.IOException; +import java.text.DateFormat; +import java.util.ArrayList; +import java.util.LinkedHashMap; +import java.util.List; +import java.util.Map; +import java.util.function.Supplier; +import java.util.stream.IntStream; + +import static org.apache.commons.lang3.StringUtils.isEmpty; + +public class ExcelRecordReader implements RecordReader { +private final RowIterator rowIterator; +private ComponentLog logger; +private final RecordSchema schema; +private final List desiredSheets; +private final Supplier LAZY_DATE_FORMAT; +private final Supplier LAZY_TIME_FORMAT; +private final Supplier LAZY_TIMESTAMP_FORMAT; +private final String dateFormat; +private final String timeFormat; +private final String timestampFormat; + +public ExcelRecordReader(ExcelRecordReaderArgs args) throws MalformedRecordException { +this.logger = args.getLogger(); +this.schema = args.getSchema(); +this.desiredSheets = new ArrayList<>(); +if (args.getDesiredSheets() != null && args.getDesiredSheets().length() > 0) { +IntStream.range(0, args.getDesiredSheets().length()) +.forEach(index -> this.desiredSheets.add(args.getDesiredSheets().get(index))); +} + +if (isEmpty(args.getDateFormat())) { +this.dateFormat = null; +LAZY_DATE_FORMAT = null; +} else { +this.dateFormat = args.getDateFormat(); +LAZY_DATE_FORMAT = () -> DataTypeUtils.getDateFormat(dateFormat); +} + +if (isEmpty(args.getTimeFormat())) { +this.timeFormat = null; +LAZY_TIME_FORMAT = null; +} else { +this.timeFormat = args.getTimeFormat(); +LAZY_TIME_FORMAT = () -> DataTypeUtils.getDateFormat(timeFormat); +} + +if (isEmpty(args.getTimestampFormat())) { +this.timestampFormat = null; +LAZY_TIMESTAMP_FORMAT = null; +} else { +this.timestampFormat = args.getTimestampFormat(); +LAZY_TIMESTAMP_FORMAT = () -> DataTypeUtils.getDateFormat(timestampFormat); +} + +try { +this.rowIterator = new RowIterator(args.getInputStream(), desiredSheets, args.getFirstRow(), logger); +} catch (RuntimeException e) { +String msg = "Error occurred while processing record file"; +logger.error(msg, e); +throw new MalformedRecordException(msg, e); +} +} + +@Override +public Record nextRecord(boolean coerceTypes, boolean dropUnknownFields) throws IOException, MalformedRecordException { +try { +if (rowIterator.hasNext()) { +Row currentRow = rowIterator.next(); +Map currentRowValues = getCurrentRowValues(currentRow, coerceTypes, dropUnknownFields); +return new MapRecord(schema, currentRowValues); +} +} catch (Exception e) { +throw new MalformedRecordException("Error while getting next record", e); +} +return null; +} + +private Map getCurrentRowValues(Row currentRow, bool
[jira] [Resolved] (NIFI-11454) Upgrade commons-jexl3 to 3.3.0
[ https://issues.apache.org/jira/browse/NIFI-11454?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ] David Handermann resolved NIFI-11454. - Fix Version/s: 2.0.0 1.22.0 Assignee: Siddharth R Resolution: Fixed > Upgrade commons-jexl3 to 3.3.0 > -- > > Key: NIFI-11454 > URL: https://issues.apache.org/jira/browse/NIFI-11454 > Project: Apache NiFi > Issue Type: Improvement >Affects Versions: 1.21.0 >Reporter: Mike R >Assignee: Siddharth R >Priority: Major > Fix For: 2.0.0, 1.22.0 > > > Upgrade commons-jexl3 to 3.3.0 from 3.2.1 -- This message was sent by Atlassian Jira (v8.20.10#820010)
[jira] [Updated] (NIFI-11454) Upgrade commons-jexl3 to 3.3.0
[ https://issues.apache.org/jira/browse/NIFI-11454?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ] David Handermann updated NIFI-11454: Priority: Minor (was: Major) > Upgrade commons-jexl3 to 3.3.0 > -- > > Key: NIFI-11454 > URL: https://issues.apache.org/jira/browse/NIFI-11454 > Project: Apache NiFi > Issue Type: Improvement >Affects Versions: 1.21.0 >Reporter: Mike R >Assignee: Siddharth R >Priority: Minor > Fix For: 2.0.0, 1.22.0 > > > Upgrade commons-jexl3 to 3.3.0 from 3.2.1 -- This message was sent by Atlassian Jira (v8.20.10#820010)
[jira] [Commented] (NIFI-11454) Upgrade commons-jexl3 to 3.3.0
[ https://issues.apache.org/jira/browse/NIFI-11454?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=17723287#comment-17723287 ] ASF subversion and git services commented on NIFI-11454: Commit 0b4ce462c9c6934c46f81053157561906d5fbef7 in nifi's branch refs/heads/support/nifi-1.x from siddr [ https://gitbox.apache.org/repos/asf?p=nifi.git;h=0b4ce462c9 ] NIFI-11454 Upgraded commons-jexl3 from 3.2.1 to 3.3 This closes #7252 Signed-off-by: David Handermann (cherry picked from commit 607b53504b57d5d7fde84a721ce75056c92a1f70) > Upgrade commons-jexl3 to 3.3.0 > -- > > Key: NIFI-11454 > URL: https://issues.apache.org/jira/browse/NIFI-11454 > Project: Apache NiFi > Issue Type: Improvement >Affects Versions: 1.21.0 >Reporter: Mike R >Priority: Major > > Upgrade commons-jexl3 to 3.3.0 from 3.2.1 -- This message was sent by Atlassian Jira (v8.20.10#820010)
[jira] [Commented] (NIFI-11454) Upgrade commons-jexl3 to 3.3.0
[ https://issues.apache.org/jira/browse/NIFI-11454?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=17723286#comment-17723286 ] ASF subversion and git services commented on NIFI-11454: Commit 607b53504b57d5d7fde84a721ce75056c92a1f70 in nifi's branch refs/heads/main from siddr [ https://gitbox.apache.org/repos/asf?p=nifi.git;h=607b53504b ] NIFI-11454 Upgraded commons-jexl3 from 3.2.1 to 3.3 This closes #7252 Signed-off-by: David Handermann > Upgrade commons-jexl3 to 3.3.0 > -- > > Key: NIFI-11454 > URL: https://issues.apache.org/jira/browse/NIFI-11454 > Project: Apache NiFi > Issue Type: Improvement >Affects Versions: 1.21.0 >Reporter: Mike R >Priority: Major > > Upgrade commons-jexl3 to 3.3.0 from 3.2.1 -- This message was sent by Atlassian Jira (v8.20.10#820010)
[GitHub] [nifi] dan-s1 commented on a diff in pull request #7194: NIFI-11167 - Add Excel Record Reader
dan-s1 commented on code in PR #7194: URL: https://github.com/apache/nifi/pull/7194#discussion_r1195650443 ## nifi-nar-bundles/nifi-standard-services/nifi-record-serialization-services-bundle/nifi-record-serialization-services/src/main/java/org/apache/nifi/excel/ExcelUtils.java: ## @@ -0,0 +1,28 @@ +/* + * 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. + */ +package org.apache.nifi.excel; + +import org.apache.poi.ss.usermodel.Row; + +public class ExcelUtils { Review Comment: This method is used in 3 different classes ExcelHeaderSchemaStrategy (line 79), ExcelRecordReader (line 113) and ExcelSchemaInference (line 64). I did not want to have to duplicate the code. -- 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-unsubscr...@nifi.apache.org For queries about this service, please contact Infrastructure at: us...@infra.apache.org
[GitHub] [nifi] exceptionfactory commented on a diff in pull request #7194: NIFI-11167 - Add Excel Record Reader
exceptionfactory commented on code in PR #7194: URL: https://github.com/apache/nifi/pull/7194#discussion_r1195649993 ## nifi-nar-bundles/nifi-standard-services/nifi-record-serialization-services-bundle/nifi-record-serialization-services/src/main/java/org/apache/nifi/excel/ExcelRecordReader.java: ## @@ -0,0 +1,221 @@ +/* + * 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. + */ +package org.apache.nifi.excel; + +import org.apache.nifi.logging.ComponentLog; +import org.apache.nifi.serialization.MalformedRecordException; +import org.apache.nifi.serialization.RecordReader; +import org.apache.nifi.serialization.record.DataType; +import org.apache.nifi.serialization.record.MapRecord; +import org.apache.nifi.serialization.record.Record; +import org.apache.nifi.serialization.record.RecordField; +import org.apache.nifi.serialization.record.RecordSchema; +import org.apache.nifi.serialization.record.util.DataTypeUtils; +import org.apache.poi.ss.usermodel.Cell; +import org.apache.poi.ss.usermodel.DateUtil; +import org.apache.poi.ss.usermodel.Row; + +import java.io.IOException; +import java.text.DateFormat; +import java.util.ArrayList; +import java.util.LinkedHashMap; +import java.util.List; +import java.util.Map; +import java.util.function.Supplier; +import java.util.stream.IntStream; + +import static org.apache.commons.lang3.StringUtils.isEmpty; + +public class ExcelRecordReader implements RecordReader { +private final RowIterator rowIterator; +private ComponentLog logger; +private final RecordSchema schema; +private final List desiredSheets; +private final Supplier LAZY_DATE_FORMAT; +private final Supplier LAZY_TIME_FORMAT; +private final Supplier LAZY_TIMESTAMP_FORMAT; +private final String dateFormat; +private final String timeFormat; +private final String timestampFormat; + +public ExcelRecordReader(ExcelRecordReaderArgs args) throws MalformedRecordException { +this.logger = args.getLogger(); +this.schema = args.getSchema(); +this.desiredSheets = new ArrayList<>(); +if (args.getDesiredSheets() != null && args.getDesiredSheets().length() > 0) { +IntStream.range(0, args.getDesiredSheets().length()) +.forEach(index -> this.desiredSheets.add(args.getDesiredSheets().get(index))); +} + +if (isEmpty(args.getDateFormat())) { +this.dateFormat = null; +LAZY_DATE_FORMAT = null; +} else { +this.dateFormat = args.getDateFormat(); +LAZY_DATE_FORMAT = () -> DataTypeUtils.getDateFormat(dateFormat); +} + +if (isEmpty(args.getTimeFormat())) { +this.timeFormat = null; +LAZY_TIME_FORMAT = null; +} else { +this.timeFormat = args.getTimeFormat(); +LAZY_TIME_FORMAT = () -> DataTypeUtils.getDateFormat(timeFormat); +} + +if (isEmpty(args.getTimestampFormat())) { +this.timestampFormat = null; +LAZY_TIMESTAMP_FORMAT = null; +} else { +this.timestampFormat = args.getTimestampFormat(); +LAZY_TIMESTAMP_FORMAT = () -> DataTypeUtils.getDateFormat(timestampFormat); +} + +try { +this.rowIterator = new RowIterator(args.getInputStream(), desiredSheets, args.getFirstRow(), logger); +} catch (RuntimeException e) { +String msg = "Error occurred while processing record file"; +logger.error(msg, e); +throw new MalformedRecordException(msg, e); +} +} + +@Override +public Record nextRecord(boolean coerceTypes, boolean dropUnknownFields) throws IOException, MalformedRecordException { +try { +if (rowIterator.hasNext()) { +Row currentRow = rowIterator.next(); +Map currentRowValues = getCurrentRowValues(currentRow, coerceTypes, dropUnknownFields); +return new MapRecord(schema, currentRowValues); +} +} catch (Exception e) { +throw new MalformedRecordException("Error while getting next record", e); +} +return null; +} + +private Map getCurrentRowValues(Row curren
[GitHub] [nifi] dan-s1 commented on a diff in pull request #7194: NIFI-11167 - Add Excel Record Reader
dan-s1 commented on code in PR #7194: URL: https://github.com/apache/nifi/pull/7194#discussion_r1195647143 ## nifi-nar-bundles/nifi-standard-services/nifi-record-serialization-services-bundle/nifi-record-serialization-services/src/main/java/org/apache/nifi/excel/ExcelRecordReader.java: ## @@ -0,0 +1,221 @@ +/* + * 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. + */ +package org.apache.nifi.excel; + +import org.apache.nifi.logging.ComponentLog; +import org.apache.nifi.serialization.MalformedRecordException; +import org.apache.nifi.serialization.RecordReader; +import org.apache.nifi.serialization.record.DataType; +import org.apache.nifi.serialization.record.MapRecord; +import org.apache.nifi.serialization.record.Record; +import org.apache.nifi.serialization.record.RecordField; +import org.apache.nifi.serialization.record.RecordSchema; +import org.apache.nifi.serialization.record.util.DataTypeUtils; +import org.apache.poi.ss.usermodel.Cell; +import org.apache.poi.ss.usermodel.DateUtil; +import org.apache.poi.ss.usermodel.Row; + +import java.io.IOException; +import java.text.DateFormat; +import java.util.ArrayList; +import java.util.LinkedHashMap; +import java.util.List; +import java.util.Map; +import java.util.function.Supplier; +import java.util.stream.IntStream; + +import static org.apache.commons.lang3.StringUtils.isEmpty; + +public class ExcelRecordReader implements RecordReader { +private final RowIterator rowIterator; +private ComponentLog logger; +private final RecordSchema schema; +private final List desiredSheets; +private final Supplier LAZY_DATE_FORMAT; +private final Supplier LAZY_TIME_FORMAT; +private final Supplier LAZY_TIMESTAMP_FORMAT; +private final String dateFormat; +private final String timeFormat; +private final String timestampFormat; + +public ExcelRecordReader(ExcelRecordReaderArgs args) throws MalformedRecordException { +this.logger = args.getLogger(); +this.schema = args.getSchema(); +this.desiredSheets = new ArrayList<>(); +if (args.getDesiredSheets() != null && args.getDesiredSheets().length() > 0) { +IntStream.range(0, args.getDesiredSheets().length()) +.forEach(index -> this.desiredSheets.add(args.getDesiredSheets().get(index))); +} + +if (isEmpty(args.getDateFormat())) { +this.dateFormat = null; +LAZY_DATE_FORMAT = null; +} else { +this.dateFormat = args.getDateFormat(); +LAZY_DATE_FORMAT = () -> DataTypeUtils.getDateFormat(dateFormat); +} + +if (isEmpty(args.getTimeFormat())) { +this.timeFormat = null; +LAZY_TIME_FORMAT = null; +} else { +this.timeFormat = args.getTimeFormat(); +LAZY_TIME_FORMAT = () -> DataTypeUtils.getDateFormat(timeFormat); +} + +if (isEmpty(args.getTimestampFormat())) { +this.timestampFormat = null; +LAZY_TIMESTAMP_FORMAT = null; +} else { +this.timestampFormat = args.getTimestampFormat(); +LAZY_TIMESTAMP_FORMAT = () -> DataTypeUtils.getDateFormat(timestampFormat); +} + +try { +this.rowIterator = new RowIterator(args.getInputStream(), desiredSheets, args.getFirstRow(), logger); +} catch (RuntimeException e) { +String msg = "Error occurred while processing record file"; +logger.error(msg, e); +throw new MalformedRecordException(msg, e); +} +} + +@Override +public Record nextRecord(boolean coerceTypes, boolean dropUnknownFields) throws IOException, MalformedRecordException { +try { +if (rowIterator.hasNext()) { +Row currentRow = rowIterator.next(); +Map currentRowValues = getCurrentRowValues(currentRow, coerceTypes, dropUnknownFields); +return new MapRecord(schema, currentRowValues); +} +} catch (Exception e) { +throw new MalformedRecordException("Error while getting next record", e); +} +return null; +} + +private Map getCurrentRowValues(Row currentRow, bool
[jira] [Commented] (NIFI-11513) Remove Deprecated NAR Providers and Framework Methods
[ https://issues.apache.org/jira/browse/NIFI-11513?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=17723276#comment-17723276 ] ASF subversion and git services commented on NIFI-11513: Commit bfe4110b5623af0222bb6bebc5d72000809f3a94 in nifi's branch refs/heads/main from David Handermann [ https://gitbox.apache.org/repos/asf?p=nifi.git;h=bfe4110b56 ] NIFI-11513 Remove deprecated NarProvider and implementations (#7222) * NIFI-11513 Removed deprecated NarProvider and implementations - Removed HDFSNarProvider - Removed NiFiRegistryNarProvider - Removed nifi-external-resource-utils module from nifi-commons - Removed unnecessary deprecated annotations from EncryptedSchemaRepositoryRecordSerde - Removed deprecated method from ContentRequestContext interface - Restored NiFi Registry Provider example properties > Remove Deprecated NAR Providers and Framework Methods > - > > Key: NIFI-11513 > URL: https://issues.apache.org/jira/browse/NIFI-11513 > Project: Apache NiFi > Issue Type: Task > Components: Core Framework >Reporter: David Handermann >Assignee: David Handermann >Priority: Major > Fix For: 2.0.0 > > Time Spent: 10m > Remaining Estimate: 0h > > The HDFSNarProvider and NiFiRegistryNarProvider implementations have been > deprecated in favor or more generalized External Resource Provider > implementations. These implementations should be removed along with other > deprecated methods in several framework components. -- This message was sent by Atlassian Jira (v8.20.10#820010)
[jira] [Updated] (NIFI-11513) Remove Deprecated NAR Providers and Framework Methods
[ https://issues.apache.org/jira/browse/NIFI-11513?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ] Bryan Bende updated NIFI-11513: --- Resolution: Fixed Status: Resolved (was: Patch Available) > Remove Deprecated NAR Providers and Framework Methods > - > > Key: NIFI-11513 > URL: https://issues.apache.org/jira/browse/NIFI-11513 > Project: Apache NiFi > Issue Type: Task > Components: Core Framework >Reporter: David Handermann >Assignee: David Handermann >Priority: Major > Fix For: 2.0.0 > > Time Spent: 10m > Remaining Estimate: 0h > > The HDFSNarProvider and NiFiRegistryNarProvider implementations have been > deprecated in favor or more generalized External Resource Provider > implementations. These implementations should be removed along with other > deprecated methods in several framework components. -- This message was sent by Atlassian Jira (v8.20.10#820010)
[GitHub] [nifi] bbende merged pull request #7222: NIFI-11513 Remove deprecated NarProvider and implementations
bbende merged PR #7222: URL: https://github.com/apache/nifi/pull/7222 -- 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-unsubscr...@nifi.apache.org For queries about this service, please contact Infrastructure at: us...@infra.apache.org
[GitHub] [nifi] dan-s1 commented on a diff in pull request #7250: [NIFI-11550] Refactored Groovy tests to Java.
dan-s1 commented on code in PR #7250: URL: https://github.com/apache/nifi/pull/7250#discussion_r1195615956 ## nifi-commons/nifi-expression-language/src/test/java/org/apache/nifi/attribute/expression/language/TestQuery.java: ## @@ -1177,6 +1179,99 @@ public void testReplaceAllWithMatchingGroup() { verifyEquals("${attr:replaceAll('.*?(l+).*', '$1')}", attributes, "ll"); } +@Test +public void testReplaceShouldReplaceAllLiteralMatches() { +int n = 3; +final String ORIGINAL_VALUE = "Hello World"; +final Map attributes = Map.of("single", ORIGINAL_VALUE, +"repeating", StringUtils.repeat(ORIGINAL_VALUE, " ", n)); +final String REPLACEMENT_VALUE = "Goodbye Planet"; +final String EXPECTED_REPEATING_RESULT = StringUtils.repeat(REPLACEMENT_VALUE, " ", n); +final String REPLACE_SINGLE_EXPRESSION = "${single:replace('" + ORIGINAL_VALUE + "', '" + REPLACEMENT_VALUE + "')}"; +final String REPLACE_REPEATING_EXPRESSION = "${repeating:replace('" + ORIGINAL_VALUE + "', '" + REPLACEMENT_VALUE + "')}"; +Query replaceSingleQuery = Query.compile(REPLACE_SINGLE_EXPRESSION); +Query replaceRepeatingQuery = Query.compile(REPLACE_REPEATING_EXPRESSION); + +QueryResult replaceSingleResult = replaceSingleQuery.evaluate(new StandardEvaluationContext(attributes)); +QueryResult replaceRepeatingResult = replaceRepeatingQuery.evaluate(new StandardEvaluationContext(attributes)); + +assertEquals(REPLACEMENT_VALUE, replaceSingleResult.getValue()); +assertEquals(AttributeExpression.ResultType.STRING, replaceSingleResult.getResultType()); +assertEquals(EXPECTED_REPEATING_RESULT, replaceRepeatingResult.getValue()); +assertEquals(AttributeExpression.ResultType.STRING, replaceRepeatingResult.getResultType()); +} + +@Test +public void testReplaceFirstShouldOnlyReplaceFirstRegexMatch() { +// Arrange Review Comment: @exceptionfactory I made the changes you requested. -- 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-unsubscr...@nifi.apache.org For queries about this service, please contact Infrastructure at: us...@infra.apache.org
[GitHub] [nifi] ohnoitsyou commented on pull request #7242: NIFI-11471: Define new stateless configuration points
ohnoitsyou commented on PR #7242: URL: https://github.com/apache/nifi/pull/7242#issuecomment-1550209846 I think I've got it figured out, just dealing with the intermittent test failures -- 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-unsubscr...@nifi.apache.org For queries about this service, please contact Infrastructure at: us...@infra.apache.org
[GitHub] [nifi] NissimShiman commented on a diff in pull request #7232: NIFI-11392 for CRON scheduled components, improved cancellation of …
NissimShiman commented on code in PR #7232: URL: https://github.com/apache/nifi/pull/7232#discussion_r119875 ## nifi-nar-bundles/nifi-framework-bundle/nifi-framework/nifi-framework-core/src/main/java/org/apache/nifi/controller/scheduling/QuartzSchedulingAgent.java: ## @@ -71,37 +76,30 @@ public void doSchedule(final ReportingTaskNode taskNode, final LifecycleState sc @Override public void run() { -if (canceled.get()) { -return; -} - taskWrapper.run(); -if (canceled.get()) { -return; -} - nextSchedule = getNextSchedule(nextSchedule, cronExpression); final long delay = getDelay(nextSchedule); logger.debug("Finished running Reporting Task {}; next scheduled time is at {} after a delay of {} milliseconds", taskNode, nextSchedule, delay); -flowEngine.schedule(this, delay, TimeUnit.MILLISECONDS); +final ScheduledFuture newFuture = flowEngine.schedule(this, delay, TimeUnit.MILLISECONDS); +final ScheduledFuture oldFuture = componentFuturesMap.put(0, newFuture); +scheduleState.replaceFuture(oldFuture, newFuture); Review Comment: Did some testing where task was stopped, new cron time was set and restarted and it only ran on the new schedule (also did for a processor as well to test parallel change made for that), so this does a nice job keeping track of that. -- 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-unsubscr...@nifi.apache.org For queries about this service, please contact Infrastructure at: us...@infra.apache.org
[jira] [Updated] (NIFI-11557) Eliminate use of Files.walkFileTree for any performance-critical parts of application
[ https://issues.apache.org/jira/browse/NIFI-11557?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ] Mark Payne updated NIFI-11557: -- Summary: Eliminate use of Files.walkFileTree for any performance-critical parts of application (was: Eliminate use of NIO.2 for any performance-critical parts of application) > Eliminate use of Files.walkFileTree for any performance-critical parts of > application > - > > Key: NIFI-11557 > URL: https://issues.apache.org/jira/browse/NIFI-11557 > Project: Apache NiFi > Issue Type: Improvement > Components: Core Framework, Extensions >Reporter: Mark Payne >Assignee: Mark Payne >Priority: Major > Fix For: 1.latest, 2.latest > > > The FileSystemRepository (content repo implementation) as well as ListFile > both make use of the {{Files.walkFileTree}} method. Recently, I worked with a > user who had horribly long startup times. Thread dumps show that the time was > almost entirely in the FileSystemRepository's {{initializeRepository}} method > as it is walking the file tree in order to determine which archive files can > be cleaned up next. This is done during startup and again periodically in > background threads. > I made a small modification locally to instead use the standard synchronous > IO methods ( {{File.listFiles}} method. I used GenerateFlowFile to generate > 1-byte FlowFiles and set {{nifi.content.claim.max.appendable.size=1 B}} in > nifi.properties in order to generate a huge number of files - about 1.2 > million files in the content repository and restarted a few times. > Additionally, added some log lines to show how long this part of the startup > process took. > With the existing code, startup took 210 seconds (3.5 mins). With the new > implementation, it took 6.7 seconds. The appears to be due to the fact that > when using NIO.2 for every file, it does an individual disk access to obtain > File attributes, while when using the {{File.listFiles}} method the File > objects that are returned already have the necessary attributes. As a result, > the NIO.2 approach makes millions of disk accesses that are unnecessary. As > the number of files in the repository grows, the discrepancy also grows. > We need to eliminate any use of {{File.walkFileTree}} for any > performance-critical parts of the codebase. -- This message was sent by Atlassian Jira (v8.20.10#820010)
[jira] [Assigned] (NIFI-11369) MergeContent unexpected behaviour
[ https://issues.apache.org/jira/browse/NIFI-11369?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ] Peter Turcsanyi reassigned NIFI-11369: -- Assignee: Peter Turcsanyi > MergeContent unexpected behaviour > - > > Key: NIFI-11369 > URL: https://issues.apache.org/jira/browse/NIFI-11369 > Project: Apache NiFi > Issue Type: Bug > Components: Core Framework >Affects Versions: 1.20.0 >Reporter: Tamas Neumer >Assignee: Peter Turcsanyi >Priority: Minor > > Hi, > I would like to merge FlowFiles and came across the following documentation: > [https://nifi.apache.org/docs/nifi-docs/components/org.apache.nifi/nifi-standard-nar/1.20.0/org.apache.nifi.processors.standard.MergeContent/additionalDetails.html|https://nifi.apache.org/docs/nifi-docs/components/org.apache.nifi/nifi-standard-nar/[%E2%80%A6].nifi.processors.standard.MergeContent/additionalDetails.html] > Quoting from it: _"It is not necessary that all FlowFiles have this value, > but at least one FlowFile in the bin must have this value or the bin will > never be complete..."_ > I have built a flow that assigns the following attributes to the FlowFiles: > * fragment.identifier > * fragment.index > * segment.original.filename > As stated in the documentation mentioned above, the attribute fragment.count > is just assigned to the last FlowFiles with the correct number. > The error I experience is that all the flow files without fragment.count > provoke an error stating: > .. Cannot Defragment ...because it does not have an integer value for the > fragment.count attribute; routing to failure > > Could you help us out please? > Thank you! > Kind regards, > Florian and Tamas -- This message was sent by Atlassian Jira (v8.20.10#820010)
[GitHub] [nifi] r-sidd commented on pull request #7252: NIFI-11454 Upgrade commons-jexl3 to 3.3.0
r-sidd commented on PR #7252: URL: https://github.com/apache/nifi/pull/7252#issuecomment-1549889091 > @r-sidd `commons-jexl3` version `3.3.0` does not exist in Maven Central. Did you try running a local build before submitting the pull request? It looks like the actual version number is `3.3`, so the version should reflect that number. I'm sorry about that, let me change and push the changes -- 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-unsubscr...@nifi.apache.org For queries about this service, please contact Infrastructure at: us...@infra.apache.org
[jira] [Created] (NIFI-11557) Eliminate use of NIO.2 for any performance-critical parts of application
Mark Payne created NIFI-11557: - Summary: Eliminate use of NIO.2 for any performance-critical parts of application Key: NIFI-11557 URL: https://issues.apache.org/jira/browse/NIFI-11557 Project: Apache NiFi Issue Type: Improvement Components: Core Framework, Extensions Reporter: Mark Payne Assignee: Mark Payne Fix For: 1.latest, 2.latest The FileSystemRepository (content repo implementation) as well as ListFile both make use of the {{Files.walkFileTree}} method. Recently, I worked with a user who had horribly long startup times. Thread dumps show that the time was almost entirely in the FileSystemRepository's {{initializeRepository}} method as it is walking the file tree in order to determine which archive files can be cleaned up next. This is done during startup and again periodically in background threads. I made a small modification locally to instead use the standard synchronous IO methods ( {{File.listFiles}} method. I used GenerateFlowFile to generate 1-byte FlowFiles and set {{nifi.content.claim.max.appendable.size=1 B}} in nifi.properties in order to generate a huge number of files - about 1.2 million files in the content repository and restarted a few times. Additionally, added some log lines to show how long this part of the startup process took. With the existing code, startup took 210 seconds (3.5 mins). With the new implementation, it took 6.7 seconds. The appears to be due to the fact that when using NIO.2 for every file, it does an individual disk access to obtain File attributes, while when using the {{File.listFiles}} method the File objects that are returned already have the necessary attributes. As a result, the NIO.2 approach makes millions of disk accesses that are unnecessary. As the number of files in the repository grows, the discrepancy also grows. We need to eliminate any use of {{File.walkFileTree}} for any performance-critical parts of the codebase. -- This message was sent by Atlassian Jira (v8.20.10#820010)
[GitHub] [nifi] markap14 opened a new pull request, #7253: NIFI-11556: Added ability to use a Process Group as a Stateless Flow
markap14 opened a new pull request, #7253: URL: https://github.com/apache/nifi/pull/7253 # Summary [NIFI-0](https://issues.apache.org/jira/browse/NIFI-0) # Tracking Please complete the following tracking steps prior to pull request creation. ### Issue Tracking - [ ] [Apache NiFi Jira](https://issues.apache.org/jira/browse/NIFI) issue created ### Pull Request Tracking - [ ] Pull Request title starts with Apache NiFi Jira issue number, such as `NIFI-0` - [ ] Pull Request commit message starts with Apache NiFi Jira issue number, as such `NIFI-0` ### Pull Request Formatting - [ ] Pull Request based on current revision of the `main` branch - [ ] 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 - [ ] Build completed using `mvn clean install -P contrib-check` - [ ] JDK 11 - [ ] JDK 17 ### Licensing - [ ] 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) - [ ] New dependencies are documented in applicable `LICENSE` and `NOTICE` files ### Documentation - [ ] 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-unsubscr...@nifi.apache.org For queries about this service, please contact Infrastructure at: us...@infra.apache.org
[jira] [Commented] (NIFI-11453) Update ignite-core to 2.14.0
[ https://issues.apache.org/jira/browse/NIFI-11453?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=17723153#comment-17723153 ] Jeyassri Balachandran commented on NIFI-11453: -- Thankyou [~exceptionfactory] . I'll refer the migration documentation as well. > Update ignite-core to 2.14.0 > - > > Key: NIFI-11453 > URL: https://issues.apache.org/jira/browse/NIFI-11453 > Project: Apache NiFi > Issue Type: Improvement >Affects Versions: 1.21.0 >Reporter: Mike R >Priority: Major > > Update ignite-core to 2.14.0 from 1.6.0. The dependency has CVEs in 1.6.0 > resolved in 2.14.0: > [CVE-2020-1963|https://cve.mitre.org/cgi-bin/cvename.cgi?name=CVE-2020-1963] > [CVE-2018-8018|https://cve.mitre.org/cgi-bin/cvename.cgi?name=CVE-2018-8018] > [CVE-2018-1295|https://cve.mitre.org/cgi-bin/cvename.cgi?name=CVE-2018-1295] > [CVE-2017-7686|https://cve.mitre.org/cgi-bin/cvename.cgi?name=CVE-2017-7686] > [CVE-2016-6805|https://cve.mitre.org/cgi-bin/cvename.cgi?name=CVE-2016-6805] -- This message was sent by Atlassian Jira (v8.20.10#820010)
[jira] [Created] (NIFI-11556) Allow Process Group to be run as a Stateless Flow
Mark Payne created NIFI-11556: - Summary: Allow Process Group to be run as a Stateless Flow Key: NIFI-11556 URL: https://issues.apache.org/jira/browse/NIFI-11556 Project: Apache NiFi Issue Type: New Feature Components: Core Framework, Core UI, Documentation & Website Reporter: Mark Payne Assignee: Mark Payne Fix For: 2.latest In version 1.15.0, we introduced the ExecuteStateless Processor. This was a quick win to allow running a flow using the Stateless Engine. Since then, we have seen many users make use of it. However, it was always intended as a stopgap until we had the ability to truly integrate Stateless groups with NiFi. This feature will allow for much better integration between the two, allowing users to configure a Process Group to run as a stateless flow. This will offer better performance by integrating directly with repositories and provide a much better user experience, not needing to save off the flow and configure a separate Processor to point to it, providing visibility into what's happening, better Provenance capabilities (as ExecuteStateless shows all events as having been performed by the one Processor), more seamless configuration, etc. -- This message was sent by Atlassian Jira (v8.20.10#820010)
[jira] [Commented] (NIFI-11454) Upgrade commons-jexl3 to 3.3.0
[ https://issues.apache.org/jira/browse/NIFI-11454?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=17723148#comment-17723148 ] Siddharth R commented on NIFI-11454: PR: https://github.com/apache/nifi/pull/7252 > Upgrade commons-jexl3 to 3.3.0 > -- > > Key: NIFI-11454 > URL: https://issues.apache.org/jira/browse/NIFI-11454 > Project: Apache NiFi > Issue Type: Improvement >Affects Versions: 1.21.0 >Reporter: Mike R >Priority: Major > > Upgrade commons-jexl3 to 3.3.0 from 3.2.1 -- This message was sent by Atlassian Jira (v8.20.10#820010)
[jira] [Created] (NIFI-11555) Upgrade apacheds-all to 2.0.0.AM26
Mike R created NIFI-11555: - Summary: Upgrade apacheds-all to 2.0.0.AM26 Key: NIFI-11555 URL: https://issues.apache.org/jira/browse/NIFI-11555 Project: Apache NiFi Issue Type: Improvement Affects Versions: 1.21.0 Reporter: Mike R Upgrade apacheds-all to 2.0.0.AM26 -- This message was sent by Atlassian Jira (v8.20.10#820010)
[jira] [Updated] (NIFI-11535) Change WebSocket FlowFile removal when supplying HTTP headers
[ https://issues.apache.org/jira/browse/NIFI-11535?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ] Peter Turcsanyi updated NIFI-11535: --- Fix Version/s: 2.0.0 1.22.0 Resolution: Fixed Status: Resolved (was: Patch Available) > Change WebSocket FlowFile removal when supplying HTTP headers > - > > Key: NIFI-11535 > URL: https://issues.apache.org/jira/browse/NIFI-11535 > Project: Apache NiFi > Issue Type: Bug >Reporter: Lehel Boér >Assignee: Lehel Boér >Priority: Major > Fix For: 2.0.0, 1.22.0 > > > final ProcessSession session = > processSessionFactory.createSession(); > final FlowFile flowFile = session.get(); > try { > webSocketClientService.connect(endpointId, > flowFile.getAttributes()); > } finally { > session.remove(flowFile); > session.commitAsync(); > } > In case of connection failure we lose data -- This message was sent by Atlassian Jira (v8.20.10#820010)
[jira] [Commented] (NIFI-11535) Change WebSocket FlowFile removal when supplying HTTP headers
[ https://issues.apache.org/jira/browse/NIFI-11535?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=17723138#comment-17723138 ] ASF subversion and git services commented on NIFI-11535: Commit f87b6896ac55cb1545e16d84cb2d56c83988ed6b in nifi's branch refs/heads/support/nifi-1.x from Lehel [ https://gitbox.apache.org/repos/asf?p=nifi.git;h=f87b6896ac ] NIFI-11535: Transfer ConnectWebsocket connection configuration FlowFile to relationships Also moved dto and util packages under org.apache.nifi.websocket.jetty This closes #7246. Signed-off-by: Peter Turcsanyi > Change WebSocket FlowFile removal when supplying HTTP headers > - > > Key: NIFI-11535 > URL: https://issues.apache.org/jira/browse/NIFI-11535 > Project: Apache NiFi > Issue Type: Bug >Reporter: Lehel Boér >Assignee: Lehel Boér >Priority: Major > > final ProcessSession session = > processSessionFactory.createSession(); > final FlowFile flowFile = session.get(); > try { > webSocketClientService.connect(endpointId, > flowFile.getAttributes()); > } finally { > session.remove(flowFile); > session.commitAsync(); > } > In case of connection failure we lose data -- This message was sent by Atlassian Jira (v8.20.10#820010)
[GitHub] [nifi] asfgit closed pull request #7246: NIFI-11535: Transfer ConnectWebsocket HTTP header flowfile to relatio…
asfgit closed pull request #7246: NIFI-11535: Transfer ConnectWebsocket HTTP header flowfile to relatio… URL: https://github.com/apache/nifi/pull/7246 -- 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-unsubscr...@nifi.apache.org For queries about this service, please contact Infrastructure at: us...@infra.apache.org
[jira] [Commented] (NIFI-11535) Change WebSocket FlowFile removal when supplying HTTP headers
[ https://issues.apache.org/jira/browse/NIFI-11535?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=17723137#comment-17723137 ] ASF subversion and git services commented on NIFI-11535: Commit 335365874a249dfb3c1044cf39bfbc584085d83a in nifi's branch refs/heads/main from Lehel [ https://gitbox.apache.org/repos/asf?p=nifi.git;h=335365874a ] NIFI-11535: Transfer ConnectWebsocket connection configuration FlowFile to relationships Also moved dto and util packages under org.apache.nifi.websocket.jetty This closes #7246. Signed-off-by: Peter Turcsanyi > Change WebSocket FlowFile removal when supplying HTTP headers > - > > Key: NIFI-11535 > URL: https://issues.apache.org/jira/browse/NIFI-11535 > Project: Apache NiFi > Issue Type: Bug >Reporter: Lehel Boér >Assignee: Lehel Boér >Priority: Major > > final ProcessSession session = > processSessionFactory.createSession(); > final FlowFile flowFile = session.get(); > try { > webSocketClientService.connect(endpointId, > flowFile.getAttributes()); > } finally { > session.remove(flowFile); > session.commitAsync(); > } > In case of connection failure we lose data -- This message was sent by Atlassian Jira (v8.20.10#820010)
[jira] [Resolved] (NIFI-11485) Add nifi-toolkit to registry container image
[ https://issues.apache.org/jira/browse/NIFI-11485?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ] David Handermann resolved NIFI-11485. - Fix Version/s: 2.0.0 1.22.0 Resolution: Fixed > Add nifi-toolkit to registry container image > - > > Key: NIFI-11485 > URL: https://issues.apache.org/jira/browse/NIFI-11485 > Project: Apache NiFi > Issue Type: Improvement > Components: NiFi Registry >Affects Versions: 1.21.0 > Environment: Kubernetes >Reporter: Tan Luu >Assignee: Tan Luu >Priority: Trivial > Labels: pull-request-available > Fix For: 2.0.0, 1.22.0 > > Time Spent: 1h 20m > Remaining Estimate: 0h > > When deploying NiFi registry on Kubernetes we need nifi-toolkit integrated > into the container image to help encrypt sensitive configuration in > _nifi-registry.properties._ -- This message was sent by Atlassian Jira (v8.20.10#820010)
[jira] [Commented] (NIFI-11485) Add nifi-toolkit to registry container image
[ https://issues.apache.org/jira/browse/NIFI-11485?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=17723132#comment-17723132 ] ASF subversion and git services commented on NIFI-11485: Commit 952d5f256187491c5e96568c2aa5854a0c71d291 in nifi's branch refs/heads/support/nifi-1.x from Tan Luu [ https://gitbox.apache.org/repos/asf?p=nifi.git;h=952d5f2561 ] NIFI-11485 Added Toolkit to Registry Docker Image This closes #7197 Signed-off-by: David Handermann (cherry picked from commit fcf2446bb580f21a2293f0c0605094d1090d2afd) > Add nifi-toolkit to registry container image > - > > Key: NIFI-11485 > URL: https://issues.apache.org/jira/browse/NIFI-11485 > Project: Apache NiFi > Issue Type: Improvement > Components: NiFi Registry >Affects Versions: 1.21.0 > Environment: Kubernetes >Reporter: Tan Luu >Assignee: Tan Luu >Priority: Trivial > Labels: pull-request-available > Time Spent: 1h 20m > Remaining Estimate: 0h > > When deploying NiFi registry on Kubernetes we need nifi-toolkit integrated > into the container image to help encrypt sensitive configuration in > _nifi-registry.properties._ -- This message was sent by Atlassian Jira (v8.20.10#820010)
[jira] [Commented] (NIFI-11485) Add nifi-toolkit to registry container image
[ https://issues.apache.org/jira/browse/NIFI-11485?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=17723131#comment-17723131 ] ASF subversion and git services commented on NIFI-11485: Commit fcf2446bb580f21a2293f0c0605094d1090d2afd in nifi's branch refs/heads/main from Tan Luu [ https://gitbox.apache.org/repos/asf?p=nifi.git;h=fcf2446bb5 ] NIFI-11485 Added Toolkit to Registry Docker Image This closes #7197 Signed-off-by: David Handermann > Add nifi-toolkit to registry container image > - > > Key: NIFI-11485 > URL: https://issues.apache.org/jira/browse/NIFI-11485 > Project: Apache NiFi > Issue Type: Improvement > Components: NiFi Registry >Affects Versions: 1.21.0 > Environment: Kubernetes >Reporter: Tan Luu >Assignee: Tan Luu >Priority: Trivial > Labels: pull-request-available > Time Spent: 1h 20m > Remaining Estimate: 0h > > When deploying NiFi registry on Kubernetes we need nifi-toolkit integrated > into the container image to help encrypt sensitive configuration in > _nifi-registry.properties._ -- This message was sent by Atlassian Jira (v8.20.10#820010)
[GitHub] [nifi] exceptionfactory closed pull request #7197: NIFI-11485 Add nifi toolkit to registry image
exceptionfactory closed pull request #7197: NIFI-11485 Add nifi toolkit to registry image URL: https://github.com/apache/nifi/pull/7197 -- 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-unsubscr...@nifi.apache.org For queries about this service, please contact Infrastructure at: us...@infra.apache.org
[jira] [Commented] (NIFI-11453) Update ignite-core to 2.14.0
[ https://issues.apache.org/jira/browse/NIFI-11453?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=17723124#comment-17723124 ] David Handermann commented on NIFI-11453: - The [Apache Ignite 2.0 Migration Guide|https://cwiki.apache.org/confluence/display/IGNITE/Apache+Ignite+2.0+Migration+Guide] also has some important details about the differences from version 1. > Update ignite-core to 2.14.0 > - > > Key: NIFI-11453 > URL: https://issues.apache.org/jira/browse/NIFI-11453 > Project: Apache NiFi > Issue Type: Improvement >Affects Versions: 1.21.0 >Reporter: Mike R >Priority: Major > > Update ignite-core to 2.14.0 from 1.6.0. The dependency has CVEs in 1.6.0 > resolved in 2.14.0: > [CVE-2020-1963|https://cve.mitre.org/cgi-bin/cvename.cgi?name=CVE-2020-1963] > [CVE-2018-8018|https://cve.mitre.org/cgi-bin/cvename.cgi?name=CVE-2018-8018] > [CVE-2018-1295|https://cve.mitre.org/cgi-bin/cvename.cgi?name=CVE-2018-1295] > [CVE-2017-7686|https://cve.mitre.org/cgi-bin/cvename.cgi?name=CVE-2017-7686] > [CVE-2016-6805|https://cve.mitre.org/cgi-bin/cvename.cgi?name=CVE-2016-6805] -- This message was sent by Atlassian Jira (v8.20.10#820010)
[GitHub] [nifi-minifi-cpp] martinzink opened a new pull request, #1574: MINIFICPP-1641 Parallelization of docker tests
martinzink opened a new pull request, #1574: URL: https://github.com/apache/nifi-minifi-cpp/pull/1574 Thank you for submitting a contribution to Apache NiFi - MiNiFi C++. In order to streamline the review of the contribution we ask you to ensure the following steps have been taken: ### For all changes: - [ ] Is there a JIRA ticket associated with this PR? Is it referenced in the commit message? - [ ] Does your PR title start with MINIFICPP- where is the JIRA number you are trying to resolve? Pay particular attention to the hyphen "-" character. - [ ] Has your PR been rebased against the latest commit within the target branch (typically main)? - [ ] Is your initial contribution a single, squashed commit? ### For code changes: - [ ] If adding new dependencies to the code, are these dependencies licensed in a way that is compatible for inclusion under [ASF 2.0](http://www.apache.org/legal/resolved.html#category-a)? - [ ] If applicable, have you updated the LICENSE file? - [ ] If applicable, have you updated the NOTICE file? ### For documentation related changes: - [ ] Have you ensured that format looks appropriate for the output in which it is rendered? ### Note: Please ensure that once the PR is submitted, you check GitHub Actions CI results for build issues and submit an update to your PR as soon as possible. -- 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-unsubscr...@nifi.apache.org For queries about this service, please contact Infrastructure at: us...@infra.apache.org
[jira] [Updated] (NIFI-11554) Upgrade to OpenSAML 4.3.0
[ https://issues.apache.org/jira/browse/NIFI-11554?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ] David Handermann updated NIFI-11554: Epic Link: NIFI-10147 > Upgrade to OpenSAML 4.3.0 > - > > Key: NIFI-11554 > URL: https://issues.apache.org/jira/browse/NIFI-11554 > Project: Apache NiFi > Issue Type: Improvement > Components: Core Framework >Reporter: David Handermann >Assignee: David Handermann >Priority: Major > Fix For: 2.0.0 > > > [OpenSAML 3|https://shibboleth.atlassian.net/wiki/spaces/OSAML/overview] has > reached end of life and Spring Security 5 deprecated support for OpenSAML 3 > in recent releases. > OpenSAML 4 requires Java 11 and provides the current supported version, > integrated with Spring Security 5. [Spring Security SAML2 > Migrations|https://docs.spring.io/spring-security/reference/5.8/migration/servlet/saml2.html] > highlights the dependency management settings necessary to use OpenSAML 4, > along with the related component changes required. > OpenSAML does not publish to Maven Central according to project document on > [use of Maven > Central|https://shibboleth.atlassian.net/wiki/spaces/DEV/pages/1123844333/Use+of+Maven+Central]. > The Shibboleth repository must be added to resolve the latest OpenSAML > versions. -- This message was sent by Atlassian Jira (v8.20.10#820010)
[jira] [Updated] (NIFI-11380) Refactor CaptureChangeMySQL with improvements
[ https://issues.apache.org/jira/browse/NIFI-11380?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ] Nandor Soma Abonyi updated NIFI-11380: -- Resolution: Fixed Status: Resolved (was: Patch Available) > Refactor CaptureChangeMySQL with improvements > - > > Key: NIFI-11380 > URL: https://issues.apache.org/jira/browse/NIFI-11380 > Project: Apache NiFi > Issue Type: Improvement >Reporter: Matt Burgess >Assignee: Matt Burgess >Priority: Major > Fix For: 2.0.0, 1.22.0 > > Time Spent: 1h 10m > Remaining Estimate: 0h > > The CaptureChangeMySQL processor can be improved in many ways: > - Eliminate use of DistributedCacheClient > - MySQLCDCUtils - delete this class. It’s unnecessary. Just put the single > method that exists in the parent class of the writers > - Eliminate mutable member variables. Gather all state together into an > object and store that as a single volatile member variable. > - The outputEvents method is a huge block of switch/case and if/then/else > blocks. Kill all of this. Create an interface that’s capable of handling a > given event type and have multiple implementations. Determine appropriate > impl and call the method. > - Do not keep a bunch of member variables to “rollback local state”. Keep > this in variables. If we fail, no harm, no foul. If we succeed, then update > member variable. > - Remove onStopped method, just annotate stop() method with @OnStopped. No > need for @OnShutdown > - Change name of “hostname” property to "node", and don’t require the port! > Default to 3306. > - Remove unused hasRun member variable -- This message was sent by Atlassian Jira (v8.20.10#820010)
[jira] [Updated] (NIFI-11380) Refactor CaptureChangeMySQL with improvements
[ https://issues.apache.org/jira/browse/NIFI-11380?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ] Nandor Soma Abonyi updated NIFI-11380: -- Fix Version/s: (was: 2.latest) 2.0.0 1.22.0 (was: 1.latest) > Refactor CaptureChangeMySQL with improvements > - > > Key: NIFI-11380 > URL: https://issues.apache.org/jira/browse/NIFI-11380 > Project: Apache NiFi > Issue Type: Improvement >Reporter: Matt Burgess >Assignee: Matt Burgess >Priority: Major > Fix For: 2.0.0, 1.22.0 > > Time Spent: 1h 10m > Remaining Estimate: 0h > > The CaptureChangeMySQL processor can be improved in many ways: > - Eliminate use of DistributedCacheClient > - MySQLCDCUtils - delete this class. It’s unnecessary. Just put the single > method that exists in the parent class of the writers > - Eliminate mutable member variables. Gather all state together into an > object and store that as a single volatile member variable. > - The outputEvents method is a huge block of switch/case and if/then/else > blocks. Kill all of this. Create an interface that’s capable of handling a > given event type and have multiple implementations. Determine appropriate > impl and call the method. > - Do not keep a bunch of member variables to “rollback local state”. Keep > this in variables. If we fail, no harm, no foul. If we succeed, then update > member variable. > - Remove onStopped method, just annotate stop() method with @OnStopped. No > need for @OnShutdown > - Change name of “hostname” property to "node", and don’t require the port! > Default to 3306. > - Remove unused hasRun member variable -- This message was sent by Atlassian Jira (v8.20.10#820010)
[jira] [Commented] (NIFI-11380) Refactor CaptureChangeMySQL with improvements
[ https://issues.apache.org/jira/browse/NIFI-11380?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=17723087#comment-17723087 ] ASF subversion and git services commented on NIFI-11380: Commit aefb278f325f70ea37356954f0cde772841e6afb in nifi's branch refs/heads/support/nifi-1.x from Matt Burgess [ https://gitbox.apache.org/repos/asf?p=nifi.git;h=aefb278f32 ] NIFI-11380: Refactor CaptureChangeMySQL with improvements Backported This closes #7116 Signed-off-by: Nandor Soma Abonyi > Refactor CaptureChangeMySQL with improvements > - > > Key: NIFI-11380 > URL: https://issues.apache.org/jira/browse/NIFI-11380 > Project: Apache NiFi > Issue Type: Improvement >Reporter: Matt Burgess >Assignee: Matt Burgess >Priority: Major > Fix For: 1.latest, 2.latest > > Time Spent: 1h 10m > Remaining Estimate: 0h > > The CaptureChangeMySQL processor can be improved in many ways: > - Eliminate use of DistributedCacheClient > - MySQLCDCUtils - delete this class. It’s unnecessary. Just put the single > method that exists in the parent class of the writers > - Eliminate mutable member variables. Gather all state together into an > object and store that as a single volatile member variable. > - The outputEvents method is a huge block of switch/case and if/then/else > blocks. Kill all of this. Create an interface that’s capable of handling a > given event type and have multiple implementations. Determine appropriate > impl and call the method. > - Do not keep a bunch of member variables to “rollback local state”. Keep > this in variables. If we fail, no harm, no foul. If we succeed, then update > member variable. > - Remove onStopped method, just annotate stop() method with @OnStopped. No > need for @OnShutdown > - Change name of “hostname” property to "node", and don’t require the port! > Default to 3306. > - Remove unused hasRun member variable -- This message was sent by Atlassian Jira (v8.20.10#820010)
[jira] [Commented] (NIFI-11380) Refactor CaptureChangeMySQL with improvements
[ https://issues.apache.org/jira/browse/NIFI-11380?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=17723083#comment-17723083 ] ASF subversion and git services commented on NIFI-11380: Commit 78fd7fadcda5948fe8a7847d2c07f83373c63d1c in nifi's branch refs/heads/main from Matt Burgess [ https://gitbox.apache.org/repos/asf?p=nifi.git;h=78fd7fadcd ] NIFI-11380: Refactor CaptureChangeMySQL with improvements This closes #7116 Signed-off-by: Nandor Soma Abonyi > Refactor CaptureChangeMySQL with improvements > - > > Key: NIFI-11380 > URL: https://issues.apache.org/jira/browse/NIFI-11380 > Project: Apache NiFi > Issue Type: Improvement >Reporter: Matt Burgess >Assignee: Matt Burgess >Priority: Major > Fix For: 1.latest, 2.latest > > Time Spent: 1h 10m > Remaining Estimate: 0h > > The CaptureChangeMySQL processor can be improved in many ways: > - Eliminate use of DistributedCacheClient > - MySQLCDCUtils - delete this class. It’s unnecessary. Just put the single > method that exists in the parent class of the writers > - Eliminate mutable member variables. Gather all state together into an > object and store that as a single volatile member variable. > - The outputEvents method is a huge block of switch/case and if/then/else > blocks. Kill all of this. Create an interface that’s capable of handling a > given event type and have multiple implementations. Determine appropriate > impl and call the method. > - Do not keep a bunch of member variables to “rollback local state”. Keep > this in variables. If we fail, no harm, no foul. If we succeed, then update > member variable. > - Remove onStopped method, just annotate stop() method with @OnStopped. No > need for @OnShutdown > - Change name of “hostname” property to "node", and don’t require the port! > Default to 3306. > - Remove unused hasRun member variable -- This message was sent by Atlassian Jira (v8.20.10#820010)
[GitHub] [nifi] asfgit closed pull request #7116: NIFI-11380: Refactor CaptureChangeMySQL with improvements
asfgit closed pull request #7116: NIFI-11380: Refactor CaptureChangeMySQL with improvements URL: https://github.com/apache/nifi/pull/7116 -- 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-unsubscr...@nifi.apache.org For queries about this service, please contact Infrastructure at: us...@infra.apache.org
[GitHub] [nifi] Lehel44 commented on pull request #7246: NIFI-11535: Transfer ConnectWebsocket HTTP header flowfile to relatio…
Lehel44 commented on PR #7246: URL: https://github.com/apache/nifi/pull/7246#issuecomment-1549364306 Thanks for the review @turcsanyip! -- 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-unsubscr...@nifi.apache.org For queries about this service, please contact Infrastructure at: us...@infra.apache.org
[jira] [Comment Edited] (NIFI-8043) PutDatabaseRecord Postgres Upsert On Conflict keys not quoted
[ https://issues.apache.org/jira/browse/NIFI-8043?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=17723057#comment-17723057 ] Yury Levin edited comment on NIFI-8043 at 5/16/23 9:07 AM: --- Hello [~mattyb149] I've faced same issue and wrote down steps as I reprodused it in reply to post [~joaoaqrbarros] have linked: [https://community.cloudera.com/t5/Support-Questions/Upsert-on-conflict-not-quoting-keys/td-p/355723] was (Author: JIRAUSER300439): Hello [~mattyb149] I've faced same issue and wrote down steps as I reprodused it in reply to [~joaoaqrbarros]'s post: [https://community.cloudera.com/t5/Support-Questions/Upsert-on-conflict-not-quoting-keys/td-p/355723] > PutDatabaseRecord Postgres Upsert On Conflict keys not quoted > - > > Key: NIFI-8043 > URL: https://issues.apache.org/jira/browse/NIFI-8043 > Project: Apache NiFi > Issue Type: Bug > Components: Extensions >Reporter: Daniel Cheung >Assignee: Matt Burgess >Priority: Major > Fix For: 1.13.0 > > Time Spent: 40m > Remaining Estimate: 0h > > h2. First attempt with camel case (fails when translate field name is true or > false) > Given that "Quote Column Identifiers" is enabled, one would expect the column > names inside the conflict clause be quoted as well. However, they didn't seem > to have been quoted, because my table's column names contain upper and > lowercases and the flowfile is routed to the failure relationship of the > PutDatabaseRecord processor with the DB error: {{ERROR: column "camelcase" > does not exist}}. > Whether setting "Update Keys" or not did not affect the outcome. If I > understand, "Update Keys" would also affect the conflict clause, but it's > also not quoted, and does not accept a string with manually quoted column > names. > SQL in question found in the DB error in the log, simplified from what I saw. > {{INSERT INTO "public"."my_table"("camelCase", "txt")}} > {{VALUES ("test", "test")}} > {{ON CONFLICT (CAMELCASE)}} > {{DO UPDATE SET ("camelCase", "txt") = (}} > {{ EXCLUDED."camelCase",}} > {{ EXCLUDED."txt"}} > {{)}} > h2. Second attempt with snake case (fails when translate field name is true) > I changed my column names to {{_snake_case, txt}} and try upserting again and > it still failed with this SQL in nifi-app.log: > {{INSERT INTO "public"."my_table"("_snake_case", "txt")}} > {{VALUES ("test", "test")}} > {{ON CONFLICT (SNAKECASE)}} > {{DO UPDATE SET ("}}{{_snake_case}}{{", "txt") = (}} > {{ EXCLUDED."}}{{_snake_case}}{{",}} > {{ EXCLUDED."txt"}} > {{)}} > > h2. Current workaround > I currently need to *disable translate field name* and set my table to *use > snake case names as column names* to be able to use upsert -- This message was sent by Atlassian Jira (v8.20.10#820010)
[jira] [Commented] (NIFI-8043) PutDatabaseRecord Postgres Upsert On Conflict keys not quoted
[ https://issues.apache.org/jira/browse/NIFI-8043?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=17723057#comment-17723057 ] Yury Levin commented on NIFI-8043: -- Hello [~mattyb149] I've faced same issue and wrote down steps as I reprodused it in reply to [~joaoaqrbarros]'s post: [https://community.cloudera.com/t5/Support-Questions/Upsert-on-conflict-not-quoting-keys/td-p/355723] > PutDatabaseRecord Postgres Upsert On Conflict keys not quoted > - > > Key: NIFI-8043 > URL: https://issues.apache.org/jira/browse/NIFI-8043 > Project: Apache NiFi > Issue Type: Bug > Components: Extensions >Reporter: Daniel Cheung >Assignee: Matt Burgess >Priority: Major > Fix For: 1.13.0 > > Time Spent: 40m > Remaining Estimate: 0h > > h2. First attempt with camel case (fails when translate field name is true or > false) > Given that "Quote Column Identifiers" is enabled, one would expect the column > names inside the conflict clause be quoted as well. However, they didn't seem > to have been quoted, because my table's column names contain upper and > lowercases and the flowfile is routed to the failure relationship of the > PutDatabaseRecord processor with the DB error: {{ERROR: column "camelcase" > does not exist}}. > Whether setting "Update Keys" or not did not affect the outcome. If I > understand, "Update Keys" would also affect the conflict clause, but it's > also not quoted, and does not accept a string with manually quoted column > names. > SQL in question found in the DB error in the log, simplified from what I saw. > {{INSERT INTO "public"."my_table"("camelCase", "txt")}} > {{VALUES ("test", "test")}} > {{ON CONFLICT (CAMELCASE)}} > {{DO UPDATE SET ("camelCase", "txt") = (}} > {{ EXCLUDED."camelCase",}} > {{ EXCLUDED."txt"}} > {{)}} > h2. Second attempt with snake case (fails when translate field name is true) > I changed my column names to {{_snake_case, txt}} and try upserting again and > it still failed with this SQL in nifi-app.log: > {{INSERT INTO "public"."my_table"("_snake_case", "txt")}} > {{VALUES ("test", "test")}} > {{ON CONFLICT (SNAKECASE)}} > {{DO UPDATE SET ("}}{{_snake_case}}{{", "txt") = (}} > {{ EXCLUDED."}}{{_snake_case}}{{",}} > {{ EXCLUDED."txt"}} > {{)}} > > h2. Current workaround > I currently need to *disable translate field name* and set my table to *use > snake case names as column names* to be able to use upsert -- This message was sent by Atlassian Jira (v8.20.10#820010)
[jira] [Updated] (NIFI-11554) Upgrade to OpenSAML 4.3.0
[ https://issues.apache.org/jira/browse/NIFI-11554?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ] Pierre Villard updated NIFI-11554: -- Resolution: Fixed Status: Resolved (was: Patch Available) > Upgrade to OpenSAML 4.3.0 > - > > Key: NIFI-11554 > URL: https://issues.apache.org/jira/browse/NIFI-11554 > Project: Apache NiFi > Issue Type: Improvement > Components: Core Framework >Reporter: David Handermann >Assignee: David Handermann >Priority: Major > Fix For: 2.0.0 > > > [OpenSAML 3|https://shibboleth.atlassian.net/wiki/spaces/OSAML/overview] has > reached end of life and Spring Security 5 deprecated support for OpenSAML 3 > in recent releases. > OpenSAML 4 requires Java 11 and provides the current supported version, > integrated with Spring Security 5. [Spring Security SAML2 > Migrations|https://docs.spring.io/spring-security/reference/5.8/migration/servlet/saml2.html] > highlights the dependency management settings necessary to use OpenSAML 4, > along with the related component changes required. > OpenSAML does not publish to Maven Central according to project document on > [use of Maven > Central|https://shibboleth.atlassian.net/wiki/spaces/DEV/pages/1123844333/Use+of+Maven+Central]. > The Shibboleth repository must be added to resolve the latest OpenSAML > versions. -- This message was sent by Atlassian Jira (v8.20.10#820010)
[jira] [Commented] (NIFI-11554) Upgrade to OpenSAML 4.3.0
[ https://issues.apache.org/jira/browse/NIFI-11554?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=17723047#comment-17723047 ] ASF subversion and git services commented on NIFI-11554: Commit 8ebecdc3abf8a42fe08c6d4fca0d6abe5ad83808 in nifi's branch refs/heads/main from David Handermann [ https://gitbox.apache.org/repos/asf?p=nifi.git;h=8ebecdc3ab ] NIFI-11554 Upgraded OpenSAML from 3.4.6 to 4.3.0 - Added Shibboleth repository for OpenSAML - Replaced deprecated OpenSAML 3 Spring Security components with OpenSAML 4 Signed-off-by: Pierre Villard This closes #7251. > Upgrade to OpenSAML 4.3.0 > - > > Key: NIFI-11554 > URL: https://issues.apache.org/jira/browse/NIFI-11554 > Project: Apache NiFi > Issue Type: Improvement > Components: Core Framework >Reporter: David Handermann >Assignee: David Handermann >Priority: Major > Fix For: 2.0.0 > > > [OpenSAML 3|https://shibboleth.atlassian.net/wiki/spaces/OSAML/overview] has > reached end of life and Spring Security 5 deprecated support for OpenSAML 3 > in recent releases. > OpenSAML 4 requires Java 11 and provides the current supported version, > integrated with Spring Security 5. [Spring Security SAML2 > Migrations|https://docs.spring.io/spring-security/reference/5.8/migration/servlet/saml2.html] > highlights the dependency management settings necessary to use OpenSAML 4, > along with the related component changes required. > OpenSAML does not publish to Maven Central according to project document on > [use of Maven > Central|https://shibboleth.atlassian.net/wiki/spaces/DEV/pages/1123844333/Use+of+Maven+Central]. > The Shibboleth repository must be added to resolve the latest OpenSAML > versions. -- This message was sent by Atlassian Jira (v8.20.10#820010)
[jira] [Resolved] (NIFI-11544) Wrong reference in AbstractIcebergProcessor
[ https://issues.apache.org/jira/browse/NIFI-11544?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ] Peter Turcsanyi resolved NIFI-11544. Fix Version/s: 2.0.0 1.22.0 Resolution: Fixed > Wrong reference in AbstractIcebergProcessor > --- > > Key: NIFI-11544 > URL: https://issues.apache.org/jira/browse/NIFI-11544 > Project: Apache NiFi > Issue Type: Bug >Reporter: Zsihovszki Krisztina >Assignee: Zsihovszki Krisztina >Priority: Minor > Fix For: 2.0.0, 1.22.0 > > > The AbstractIcebergProcessor uses PutIceberg.REL_FAILURE relationship - a > field of the descendant class. > REL_FAILURE needs to be extended to abstract class. -- This message was sent by Atlassian Jira (v8.20.10#820010)
[jira] [Commented] (NIFI-11544) Wrong reference in AbstractIcebergProcessor
[ https://issues.apache.org/jira/browse/NIFI-11544?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=17723034#comment-17723034 ] ASF subversion and git services commented on NIFI-11544: Commit 8aa0d5549ed034bd931902136d4390ad81167e6c in nifi's branch refs/heads/support/nifi-1.x from krisztina-zsihovszki [ https://gitbox.apache.org/repos/asf?p=nifi.git;h=8aa0d5549e ] NIFI-11544 Fixed REL_FAILURE usage in AbstractIcebergProcessor This closes #7241. Signed-off-by: Peter Turcsanyi > Wrong reference in AbstractIcebergProcessor > --- > > Key: NIFI-11544 > URL: https://issues.apache.org/jira/browse/NIFI-11544 > Project: Apache NiFi > Issue Type: Bug >Reporter: Zsihovszki Krisztina >Assignee: Zsihovszki Krisztina >Priority: Minor > > The AbstractIcebergProcessor uses PutIceberg.REL_FAILURE relationship - a > field of the descendant class. > REL_FAILURE needs to be extended to abstract class. -- This message was sent by Atlassian Jira (v8.20.10#820010)
[jira] [Commented] (NIFI-11544) Wrong reference in AbstractIcebergProcessor
[ https://issues.apache.org/jira/browse/NIFI-11544?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=17723030#comment-17723030 ] ASF subversion and git services commented on NIFI-11544: Commit 3051b69a6c3bc131c6ac78668506aa5915c64c19 in nifi's branch refs/heads/main from krisztina-zsihovszki [ https://gitbox.apache.org/repos/asf?p=nifi.git;h=3051b69a6c ] NIFI-11544 Fixed REL_FAILURE usage in AbstractIcebergProcessor This closes #7241. Signed-off-by: Peter Turcsanyi > Wrong reference in AbstractIcebergProcessor > --- > > Key: NIFI-11544 > URL: https://issues.apache.org/jira/browse/NIFI-11544 > Project: Apache NiFi > Issue Type: Bug >Reporter: Zsihovszki Krisztina >Assignee: Zsihovszki Krisztina >Priority: Minor > > The AbstractIcebergProcessor uses PutIceberg.REL_FAILURE relationship - a > field of the descendant class. > REL_FAILURE needs to be extended to abstract class. -- This message was sent by Atlassian Jira (v8.20.10#820010)
[GitHub] [nifi] asfgit closed pull request #7241: NIFI-11544 Fixed REL_FAILURE usage in AbstractIcebergProcessor
asfgit closed pull request #7241: NIFI-11544 Fixed REL_FAILURE usage in AbstractIcebergProcessor URL: https://github.com/apache/nifi/pull/7241 -- 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-unsubscr...@nifi.apache.org For queries about this service, please contact Infrastructure at: us...@infra.apache.org
[GitHub] [nifi] turcsanyip commented on pull request #7241: NIFI-11544 Fixed REL_FAILURE usage in AbstractIcebergProcessor
turcsanyip commented on PR #7241: URL: https://github.com/apache/nifi/pull/7241#issuecomment-1549160410 Thanks @mark-bathori for the review! Merging... -- 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-unsubscr...@nifi.apache.org For queries about this service, please contact Infrastructure at: us...@infra.apache.org