[nifi] branch main updated: NIFI-8005 Added warning message for Excel sheets not found

2023-02-01 Thread exceptionfactory
This is an automated email from the ASF dual-hosted git repository.

exceptionfactory pushed a commit to branch main
in repository https://gitbox.apache.org/repos/asf/nifi.git


The following commit(s) were added to refs/heads/main by this push:
 new d46aa89788 NIFI-8005 Added warning message for Excel sheets not found
d46aa89788 is described below

commit d46aa89788266411c84e260b46e1820c65e4a965
Author: dan-s1 
AuthorDate: Fri Jan 27 14:48:14 2023 +

NIFI-8005 Added warning message for Excel sheets not found

This closes #6897

Signed-off-by: David Handermann 
---
 .../processors/poi/ConvertExcelToCSVProcessor.java  | 21 +
 .../poi/ConvertExcelToCSVProcessorTest.java |  2 ++
 2 files changed, 19 insertions(+), 4 deletions(-)

diff --git 
a/nifi-nar-bundles/nifi-poi-bundle/nifi-poi-processors/src/main/java/org/apache/nifi/processors/poi/ConvertExcelToCSVProcessor.java
 
b/nifi-nar-bundles/nifi-poi-bundle/nifi-poi-processors/src/main/java/org/apache/nifi/processors/poi/ConvertExcelToCSVProcessor.java
index 9e9183f444..32a4d11a65 100644
--- 
a/nifi-nar-bundles/nifi-poi-bundle/nifi-poi-processors/src/main/java/org/apache/nifi/processors/poi/ConvertExcelToCSVProcessor.java
+++ 
b/nifi-nar-bundles/nifi-poi-bundle/nifi-poi-processors/src/main/java/org/apache/nifi/processors/poi/ConvertExcelToCSVProcessor.java
@@ -23,10 +23,13 @@ import java.io.OutputStreamWriter;
 import java.io.PrintStream;
 import java.nio.charset.StandardCharsets;
 import java.util.ArrayList;
+import java.util.Arrays;
 import java.util.Collections;
 import java.util.HashSet;
 import java.util.List;
+import java.util.Map;
 import java.util.Set;
+import java.util.stream.Collectors;
 
 import org.apache.commons.csv.CSVFormat;
 import org.apache.commons.csv.CSVPrinter;
@@ -96,7 +99,7 @@ public class ConvertExcelToCSVProcessor
 .displayName("Sheets to Extract")
 .description("Comma separated list of Excel document sheet names 
that should be extracted from the excel document. If this property" +
 " is left blank then all of the sheets will be extracted 
from the Excel document. The list of names is case in-sensitive. Any sheets not 
" +
-"specified in this value will be ignored.")
+"specified in this value will be ignored. A bulletin will 
be generated if a specified sheet(s) are not found.")
 .required(false)
 
.expressionLanguageSupported(ExpressionLanguageScope.FLOWFILE_ATTRIBUTES)
 .addValidator(StandardValidators.NON_EMPTY_VALIDATOR)
@@ -240,25 +243,35 @@ public class ConvertExcelToCSVProcessor
 .split(desiredSheetsDelimited, 
DESIRED_SHEETS_DELIMITER);
 
 if (desiredSheets != null) {
+Map sheetsFound = 
Arrays.stream(desiredSheets)
+.collect(Collectors.toMap(key -> key, 
value -> Boolean.FALSE));
 while (iter.hasNext()) {
 InputStream sheet = iter.next();
 String sheetName = iter.getSheetName();
 
-for (int i = 0; i < desiredSheets.length; 
i++) {
+for (String desiredSheet : desiredSheets) {
 //If the sheetName is a desired one 
parse it
-if 
(sheetName.equalsIgnoreCase(desiredSheets[i])) {
+if 
(sheetName.equalsIgnoreCase(desiredSheet)) {
 ExcelSheetReadConfig readConfig = 
new ExcelSheetReadConfig(columnsToSkip, firstRow, sheetName, formatValues, sst, 
styles);
 handleExcelSheet(session, 
flowFile, sheet, readConfig, csvFormat);
+sheetsFound.put(desiredSheet, 
Boolean.TRUE);
 break;
 }
 }
 }
+String sheetsNotFound = 
sheetsFound.entrySet().stream()
+.filter(entry -> !entry.getValue())
+.map(Map.Entry::getKey)
+.collect(Collectors.joining(","));
+if (!sheetsNotFound.isEmpty()) {
+getLogger().warn("Excel sheets not found: 
{}", sheetsNotFound);
+}
 } else {
 getLogger().debug("Excel document was parsed 
but no sheets with the specified desired names were found.");
 }
 
 } else {
-

[nifi] branch main updated (3f04fae5a5 -> afdf49b3cd)

2023-02-01 Thread bbende
This is an automated email from the ASF dual-hosted git repository.

bbende pushed a change to branch main
in repository https://gitbox.apache.org/repos/asf/nifi.git


from 3f04fae5a5 NIFI-2 Corrected location of additionalDetails for 
GetZendesk
 add afdf49b3cd NIFI-11100: Limiting scope of external controller services 
during version sync to services outside the versioning context (#6898)

No new revisions were added by this update.

Summary of changes:
 .../StandardVersionedComponentSynchronizer.java| 71 --
 .../nifi/groups/FlowSynchronizationOptions.java| 19 +-
 2 files changed, 58 insertions(+), 32 deletions(-)



[nifi-maven] annotated tag nifi-nar-maven-plugin-1.4.0-RC1 updated (09d7bb9 -> 26bcde9)

2023-02-01 Thread kdoran
This is an automated email from the ASF dual-hosted git repository.

kdoran pushed a change to annotated tag nifi-nar-maven-plugin-1.4.0-RC1
in repository https://gitbox.apache.org/repos/asf/nifi-maven.git


*** WARNING: tag nifi-nar-maven-plugin-1.4.0-RC1 was modified! ***

from 09d7bb9  (commit)
  to 26bcde9  (tag)
 tagging 09d7bb9ff679d0eed9feaa066d2cbdd347a20204 (commit)
 replaces rel/nifi-nar-maven-plugin-1.3.5
  by Kevin Doran
  on Mon Jan 30 17:57:33 2023 -0500

- Log -
NIFI-10906-RC1 copy for tag nifi-nar-maven-plugin-1.4.0-RC1
---


No new revisions were added by this update.

Summary of changes: