[GitHub] [nifi] mattyb149 opened a new pull request, #6818: NIFI-10996: Write out CSV header even if there are no records

2023-01-03 Thread GitBox


mattyb149 opened a new pull request, #6818:
URL: https://github.com/apache/nifi/pull/6818

   # Summary
   
   [NIFI-10996](https://issues.apache.org/jira/browse/NIFI-10996) Adds code to 
write out the CSV header when configured to do so, even if there are no records 
written
   
   # 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
   
   - [ ] Build completed using `mvn clean install -P contrib-check`
 - [ ] JDK 8
 - [x] 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 #6416: NIFI-10234 implement PutIoTDB

2023-01-02 Thread GitBox


exceptionfactory commented on code in PR #6416:
URL: https://github.com/apache/nifi/pull/6416#discussion_r1060158226


##
nifi-nar-bundles/nifi-iotdb-bundle/nifi-iotdb-processors/src/main/java/org/apache/nifi/processors/AbstractIoTDB.java:
##
@@ -0,0 +1,365 @@
+/*
+ * 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.processors;
+
+import java.util.ArrayList;
+import java.util.HashMap;
+import java.util.HashSet;
+import java.util.List;
+import java.util.Map;
+import java.util.Set;
+import java.util.concurrent.atomic.AtomicReference;
+
+import com.fasterxml.jackson.core.JsonProcessingException;
+import com.fasterxml.jackson.databind.JsonNode;
+import com.fasterxml.jackson.databind.ObjectMapper;
+import org.apache.commons.lang3.StringUtils;
+import org.apache.nifi.processor.ProcessorInitializationContext;
+import org.apache.nifi.processors.model.Field;
+import org.apache.nifi.processors.model.IoTDBSchema;
+import org.apache.iotdb.rpc.IoTDBConnectionException;
+import org.apache.iotdb.session.Session;
+import org.apache.iotdb.tsfile.file.metadata.enums.CompressionType;
+import org.apache.iotdb.tsfile.file.metadata.enums.TSDataType;
+import org.apache.iotdb.tsfile.file.metadata.enums.TSEncoding;
+import org.apache.iotdb.tsfile.utils.Binary;
+import org.apache.iotdb.tsfile.write.record.Tablet;
+import org.apache.iotdb.tsfile.write.schema.MeasurementSchema;
+import org.apache.nifi.annotation.lifecycle.OnScheduled;
+import org.apache.nifi.components.PropertyDescriptor;
+import org.apache.nifi.processor.AbstractProcessor;
+import org.apache.nifi.processor.ProcessContext;
+import org.apache.nifi.processor.Relationship;
+import org.apache.nifi.processor.util.StandardValidators;
+import org.apache.nifi.processors.model.ValidationResult;
+import org.apache.nifi.serialization.record.DataType;
+import org.apache.nifi.serialization.record.RecordFieldType;
+import org.apache.nifi.serialization.record.RecordSchema;
+
+public abstract class AbstractIoTDB extends AbstractProcessor {
+private static final int DEFAULT_IOTDB_PORT = 6667;
+
+protected static ObjectMapper mapper = new ObjectMapper();
+
+private static final String TIME_NAME = "timeName";
+private static final String FIELDS = "fields";
+private static final String TIME = "Time";
+
+private static final Map typeMap =
+new HashMap<>();
+
+private static final Map reversedTypeMap =
+new HashMap<>();
+
+static final Set supportedType =
+new HashSet<>();
+
+static final PropertyDescriptor IOTDB_HOST =
+new PropertyDescriptor.Builder()
+.name("Host")
+.description("The host of IoTDB.")
+.addValidator(StandardValidators.NON_BLANK_VALIDATOR)
+.required(true)
+.build();
+
+static final PropertyDescriptor IOTDB_PORT =
+new PropertyDescriptor.Builder()
+.name("Port")
+.description("The port of IoTDB.")
+.defaultValue(String.valueOf(DEFAULT_IOTDB_PORT))
+.addValidator(StandardValidators.PORT_VALIDATOR)
+.required(true)
+.addValidator(StandardValidators.PORT_VALIDATOR)
+.build();
+
+static final PropertyDescriptor USERNAME =
+new PropertyDescriptor.Builder()
+.name("Username")
+.description("Username to access the IoTDB.")
+.addValidator(StandardValidators.NON_BLANK_VALIDATOR)
+.required(true)
+.build();
+
+static final PropertyDescriptor PASSWORD =
+new PropertyDescriptor.Builder()
+.name("Password")
+.description("Password to access the IoTDB.")
+.addValidator(StandardValidators.NON_BLANK_VALIDATOR)
+.required(true)
+.sensitive(true)
+.build();
+
+protected List descriptors = new ArrayList<>();
+
+protected final static Relationship REL_SUCCESS =
+new Relationship.Builder()
+

[GitHub] [nifi] exceptionfactory commented on pull request #6416: NIFI-10234 implement PutIoTDB

2023-01-02 Thread GitBox


exceptionfactory commented on PR #6416:
URL: https://github.com/apache/nifi/pull/6416#issuecomment-1369138557

   @lizhizhou It looks like the latest updates included many historical 
commits, please rebase and force-push to correct the branch history.


-- 
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 closed pull request #6814: [NIFI-11018] Upgraded from Junit4 to Junit5

2023-01-02 Thread GitBox


exceptionfactory closed pull request #6814: [NIFI-11018] Upgraded from Junit4 
to Junit5
URL: https://github.com/apache/nifi/pull/6814


-- 
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-minifi-cpp] fgerlits commented on a diff in pull request #1458: MINIFICPP-1991 - Remove unused ControllerServiceProvider methods

2023-01-02 Thread GitBox


fgerlits commented on code in PR #1458:
URL: https://github.com/apache/nifi-minifi-cpp/pull/1458#discussion_r1060126151


##
libminifi/include/core/controller/StandardControllerServiceProvider.h:
##
@@ -97,22 +73,15 @@ class StandardControllerServiceProvider : public 
ControllerServiceProvider, publ
 return new_service_node;
   }
 
-  std::future 
enableControllerService(std::shared_ptr ) {
-if (serviceNode->canEnable()) {
-  return agent_->enableControllerService(serviceNode);
-} else {
-  std::future no_run = 
std::async(std::launch::deferred, utils::TaskRescheduleInfo::Done);
-  return no_run;
-}
-  }
-
   virtual void enableAllControllerServices() {
 logger_->log_info("Enabling %u controller services", 
controller_map_->getAllControllerServices().size());
 for (auto service : controller_map_->getAllControllerServices()) {
-  if (service->canEnable()) {
-logger_->log_info("Enabling %s", service->getName());
-agent_->enableControllerService(service);
-  } else {
+  logger_->log_info("Enabling %s", service->getName());
+  if (!service->canEnable()) {
+logger_->log_warn("Service %s can not be enabled", service->getName());

Review Comment:
   sorry about the pedantry, but this should be "cannot" instead of "can not"



##
libminifi/include/core/ProcessGroup.h:
##
@@ -231,7 +231,7 @@ class ProcessGroup : public CoreComponent {
   void verify() const;
 
  protected:
-  void startProcessingProcessors(const 
std::shared_ptr& timeScheduler, const 
std::shared_ptr , const 
std::shared_ptr ); // NOLINT
+  void startProcessingProcessors(TimerDrivenSchedulingAgent& timeScheduler, 
EventDrivenSchedulingAgent& eventScheduler, CronDrivenSchedulingAgent& 
cronScheduler); // NOLINT

Review Comment:
   is the `// NOLINT` still needed?



##
extensions/http-curl/tests/ControllerServiceIntegrationTests.cpp:
##
@@ -108,27 +108,28 @@ int main(int argc, char **argv) {
   assert(ssl_client->getCACertificate().length() > 0);
   // now let's disable one of the controller services.
   std::shared_ptr cs_id = 
controller->getControllerServiceNode("ID");
-  const auto checkCsIdEnabledMatchesDisabledFlag = [_id] { return !disabled 
== cs_id->enabled(); };
   assert(cs_id != nullptr);
-  {
-std::lock_guard lock(control_mutex);
-controller->enableControllerService(cs_id);
-disabled = false;
-  }
-  std::shared_ptr mock_cont = 
controller->getControllerServiceNode("MockItLikeIts1995");
-  assert(verifyEventHappenedInPollTime(std::chrono::seconds(4), 
checkCsIdEnabledMatchesDisabledFlag));
-  {
-std::lock_guard lock(control_mutex);
-controller->disableReferencingServices(mock_cont);
-disabled = true;
-  }
-  assert(verifyEventHappenedInPollTime(std::chrono::seconds(2), 
checkCsIdEnabledMatchesDisabledFlag));
-  {
-std::lock_guard lock(control_mutex);
-controller->enableReferencingServices(mock_cont);
-disabled = false;
-  }
-  assert(verifyEventHappenedInPollTime(std::chrono::seconds(2), 
checkCsIdEnabledMatchesDisabledFlag));
+  // TODO(adebreceni): MINIFICPP-1992

Review Comment:
   can you mention this TODO in the Jira, so we'll remember to remove it as 
part of fixing the Jira, please?



##
libminifi/include/utils/ThreadPool.h:
##
@@ -296,6 +297,9 @@ class ThreadPool {
   std::this_thread::sleep_for(std::chrono::milliseconds(1));
 }
   }
+
+  static std::shared_ptr logger_;

Review Comment:
   Are you sure it's worth the savings of making this static?  Crashes due to a 
messed-up static initialization order are difficult to debug, so I would make 
it an instance variable.



##
libminifi/src/utils/ThreadPool.cpp:
##
@@ -182,15 +185,22 @@ void ThreadPool::manageWorkers() {
 
 template
 void ThreadPool::start() {
-  if (nullptr != controller_service_provider_) {
-auto thread_man = 
controller_service_provider_->getControllerService("ThreadPoolManager");
-thread_manager_ = thread_man != nullptr ? 
std::dynamic_pointer_cast(thread_man) : 
nullptr;
-  } else {
-thread_manager_ = nullptr;
-  }
-
   std::lock_guard lock(manager_mutex_);
   if (!running_) {
+thread_manager_.reset();
+if (nullptr != controller_service_provider_) {
+  auto service = 
controller_service_provider_->getControllerService("ThreadPoolManager");
+  if (!service) {
+logger_->log_info("Could not find a ThreadPoolManager service");
+  } else {
+if (auto thread_manager_service = 
std::dynamic_pointer_cast(service)) {
+  thread_manager_ = thread_manager_service;
+} else {
+  logger_->log_error("Found ThreadPoolManager, but it is not a 
ThreadManagementService");
+}
+  }
+}

Review Comment:
   I think this would be nicer as
   ```suggestion
   thread_manager_ = createThreadManager();
   ```
   with the rest of the logic moved to the helper function, which could use a 
return-early 

[GitHub] [nifi-minifi-cpp] lordgamez opened a new pull request, #1484: MINIFICPP-2023 Fix MacOS and Docker test github environment issues

2023-01-02 Thread GitBox


lordgamez opened a new pull request, #1484:
URL: https://github.com/apache/nifi-minifi-cpp/pull/1484

   - Fixing python version conflict issue of MacOS github actions VM image as 
suggested by https://github.com/orgs/Homebrew/discussions/3895
   - Upgrading pyopenssl version in python virtualenv to fix openssl issue in 
docker tests
   
   https://issues.apache.org/jira/browse/MINIFICPP-2023
   
   ---
   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



[GitHub] [nifi] ChrisSamo632 opened a new pull request, #6817: NIFI-2161 add option to skip attribute output for unmatched JSON path expressions in EvaluateJsonPath

2023-01-02 Thread GitBox


ChrisSamo632 opened a new pull request, #6817:
URL: https://github.com/apache/nifi/pull/6817

   # Summary
   
   [NIFI-2161](https://issues.apache.org/jira/browse/NIFI-2161) add option to 
skip attribute output for unmatched JSON path expressions in EvaluateJsonPath
   
   # 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`
 - [ ] JDK 8
 - [ ] JDK 11
 - [x] 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-minifi-cpp] lordgamez commented on a diff in pull request #1460: MINIFICPP-1995 Add configuring path for flowfile_checkpoint directory

2023-01-02 Thread GitBox


lordgamez commented on code in PR #1460:
URL: https://github.com/apache/nifi-minifi-cpp/pull/1460#discussion_r1059904518


##
extensions/rocksdb-repos/FlowFileRepository.h:
##
@@ -100,11 +100,17 @@ class FlowFileRepository : public ThreadedRepository, 
public SwapManager {
 config_ = configure;
 std::string value;
 
-if (configure->get(Configure::nifi_flowfile_repository_directory_default, 
value)) {
+if (configure->get(Configure::nifi_flowfile_repository_directory_default, 
value) && !value.empty()) {
   directory_ = value;
 }
 logger_->log_debug("NiFi FlowFile Repository Directory %s", directory_);
 
+value.clear();
+if (configure->get(Configure::nifi_flowfile_checkpoint_directory_default, 
value) && !value.empty()) {
+  checkpoint_dir_ = value;
+}
+logger_->log_debug("NiFi FlowFile Checkpoint Directory %s", 
checkpoint_dir_);

Review Comment:
   Added fix in 9b7fd9553203ec6bfae427546e0fa214e695f17f



-- 
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] lizhizhou commented on a diff in pull request #6416: NIFI-10234 implement PutIoTDB

2023-01-01 Thread GitBox


lizhizhou commented on code in PR #6416:
URL: https://github.com/apache/nifi/pull/6416#discussion_r1059840281


##
nifi-nar-bundles/nifi-iotdb-bundle/nifi-iotdb-processors/src/main/java/org/apache/nifi/processors/AbstractIoTDB.java:
##
@@ -0,0 +1,365 @@
+/*
+ * 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.processors;
+
+import java.util.ArrayList;
+import java.util.HashMap;
+import java.util.HashSet;
+import java.util.List;
+import java.util.Map;
+import java.util.Set;
+import java.util.concurrent.atomic.AtomicReference;
+
+import com.fasterxml.jackson.core.JsonProcessingException;
+import com.fasterxml.jackson.databind.JsonNode;
+import com.fasterxml.jackson.databind.ObjectMapper;
+import org.apache.commons.lang3.StringUtils;
+import org.apache.nifi.processor.ProcessorInitializationContext;
+import org.apache.nifi.processors.model.Field;
+import org.apache.nifi.processors.model.IoTDBSchema;
+import org.apache.iotdb.rpc.IoTDBConnectionException;
+import org.apache.iotdb.session.Session;
+import org.apache.iotdb.tsfile.file.metadata.enums.CompressionType;
+import org.apache.iotdb.tsfile.file.metadata.enums.TSDataType;
+import org.apache.iotdb.tsfile.file.metadata.enums.TSEncoding;
+import org.apache.iotdb.tsfile.utils.Binary;
+import org.apache.iotdb.tsfile.write.record.Tablet;
+import org.apache.iotdb.tsfile.write.schema.MeasurementSchema;
+import org.apache.nifi.annotation.lifecycle.OnScheduled;
+import org.apache.nifi.components.PropertyDescriptor;
+import org.apache.nifi.processor.AbstractProcessor;
+import org.apache.nifi.processor.ProcessContext;
+import org.apache.nifi.processor.Relationship;
+import org.apache.nifi.processor.util.StandardValidators;
+import org.apache.nifi.processors.model.ValidationResult;
+import org.apache.nifi.serialization.record.DataType;
+import org.apache.nifi.serialization.record.RecordFieldType;
+import org.apache.nifi.serialization.record.RecordSchema;
+
+public abstract class AbstractIoTDB extends AbstractProcessor {
+private static final int DEFAULT_IOTDB_PORT = 6667;
+
+protected static ObjectMapper mapper = new ObjectMapper();
+
+private static final String TIME_NAME = "timeName";
+private static final String FIELDS = "fields";
+private static final String TIME = "Time";
+
+private static final Map typeMap =
+new HashMap<>();
+
+private static final Map reversedTypeMap =
+new HashMap<>();
+
+static final Set supportedType =
+new HashSet<>();
+
+static final PropertyDescriptor IOTDB_HOST =
+new PropertyDescriptor.Builder()
+.name("Host")
+.description("The host of IoTDB.")
+.addValidator(StandardValidators.NON_BLANK_VALIDATOR)
+.required(true)
+.build();
+
+static final PropertyDescriptor IOTDB_PORT =
+new PropertyDescriptor.Builder()
+.name("Port")
+.description("The port of IoTDB.")
+.defaultValue(String.valueOf(DEFAULT_IOTDB_PORT))
+.addValidator(StandardValidators.PORT_VALIDATOR)
+.required(true)
+.addValidator(StandardValidators.PORT_VALIDATOR)
+.build();
+
+static final PropertyDescriptor USERNAME =
+new PropertyDescriptor.Builder()
+.name("Username")
+.description("Username to access the IoTDB.")
+.addValidator(StandardValidators.NON_BLANK_VALIDATOR)
+.required(true)
+.build();
+
+static final PropertyDescriptor PASSWORD =
+new PropertyDescriptor.Builder()
+.name("Password")
+.description("Password to access the IoTDB.")
+.addValidator(StandardValidators.NON_BLANK_VALIDATOR)
+.required(true)
+.sensitive(true)
+.build();
+
+protected List descriptors = new ArrayList<>();
+
+protected final static Relationship REL_SUCCESS =
+new Relationship.Builder()
+   

[GitHub] [nifi] lizhizhou commented on a diff in pull request #6416: NIFI-10234 implement PutIoTDB

2023-01-01 Thread GitBox


lizhizhou commented on code in PR #6416:
URL: https://github.com/apache/nifi/pull/6416#discussion_r1059840281


##
nifi-nar-bundles/nifi-iotdb-bundle/nifi-iotdb-processors/src/main/java/org/apache/nifi/processors/AbstractIoTDB.java:
##
@@ -0,0 +1,365 @@
+/*
+ * 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.processors;
+
+import java.util.ArrayList;
+import java.util.HashMap;
+import java.util.HashSet;
+import java.util.List;
+import java.util.Map;
+import java.util.Set;
+import java.util.concurrent.atomic.AtomicReference;
+
+import com.fasterxml.jackson.core.JsonProcessingException;
+import com.fasterxml.jackson.databind.JsonNode;
+import com.fasterxml.jackson.databind.ObjectMapper;
+import org.apache.commons.lang3.StringUtils;
+import org.apache.nifi.processor.ProcessorInitializationContext;
+import org.apache.nifi.processors.model.Field;
+import org.apache.nifi.processors.model.IoTDBSchema;
+import org.apache.iotdb.rpc.IoTDBConnectionException;
+import org.apache.iotdb.session.Session;
+import org.apache.iotdb.tsfile.file.metadata.enums.CompressionType;
+import org.apache.iotdb.tsfile.file.metadata.enums.TSDataType;
+import org.apache.iotdb.tsfile.file.metadata.enums.TSEncoding;
+import org.apache.iotdb.tsfile.utils.Binary;
+import org.apache.iotdb.tsfile.write.record.Tablet;
+import org.apache.iotdb.tsfile.write.schema.MeasurementSchema;
+import org.apache.nifi.annotation.lifecycle.OnScheduled;
+import org.apache.nifi.components.PropertyDescriptor;
+import org.apache.nifi.processor.AbstractProcessor;
+import org.apache.nifi.processor.ProcessContext;
+import org.apache.nifi.processor.Relationship;
+import org.apache.nifi.processor.util.StandardValidators;
+import org.apache.nifi.processors.model.ValidationResult;
+import org.apache.nifi.serialization.record.DataType;
+import org.apache.nifi.serialization.record.RecordFieldType;
+import org.apache.nifi.serialization.record.RecordSchema;
+
+public abstract class AbstractIoTDB extends AbstractProcessor {
+private static final int DEFAULT_IOTDB_PORT = 6667;
+
+protected static ObjectMapper mapper = new ObjectMapper();
+
+private static final String TIME_NAME = "timeName";
+private static final String FIELDS = "fields";
+private static final String TIME = "Time";
+
+private static final Map typeMap =
+new HashMap<>();
+
+private static final Map reversedTypeMap =
+new HashMap<>();
+
+static final Set supportedType =
+new HashSet<>();
+
+static final PropertyDescriptor IOTDB_HOST =
+new PropertyDescriptor.Builder()
+.name("Host")
+.description("The host of IoTDB.")
+.addValidator(StandardValidators.NON_BLANK_VALIDATOR)
+.required(true)
+.build();
+
+static final PropertyDescriptor IOTDB_PORT =
+new PropertyDescriptor.Builder()
+.name("Port")
+.description("The port of IoTDB.")
+.defaultValue(String.valueOf(DEFAULT_IOTDB_PORT))
+.addValidator(StandardValidators.PORT_VALIDATOR)
+.required(true)
+.addValidator(StandardValidators.PORT_VALIDATOR)
+.build();
+
+static final PropertyDescriptor USERNAME =
+new PropertyDescriptor.Builder()
+.name("Username")
+.description("Username to access the IoTDB.")
+.addValidator(StandardValidators.NON_BLANK_VALIDATOR)
+.required(true)
+.build();
+
+static final PropertyDescriptor PASSWORD =
+new PropertyDescriptor.Builder()
+.name("Password")
+.description("Password to access the IoTDB.")
+.addValidator(StandardValidators.NON_BLANK_VALIDATOR)
+.required(true)
+.sensitive(true)
+.build();
+
+protected List descriptors = new ArrayList<>();
+
+protected final static Relationship REL_SUCCESS =
+new Relationship.Builder()
+   

[GitHub] [nifi] lizhizhou commented on a diff in pull request #6416: NIFI-10234 implement PutIoTDB

2023-01-01 Thread GitBox


lizhizhou commented on code in PR #6416:
URL: https://github.com/apache/nifi/pull/6416#discussion_r1059840281


##
nifi-nar-bundles/nifi-iotdb-bundle/nifi-iotdb-processors/src/main/java/org/apache/nifi/processors/AbstractIoTDB.java:
##
@@ -0,0 +1,365 @@
+/*
+ * 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.processors;
+
+import java.util.ArrayList;
+import java.util.HashMap;
+import java.util.HashSet;
+import java.util.List;
+import java.util.Map;
+import java.util.Set;
+import java.util.concurrent.atomic.AtomicReference;
+
+import com.fasterxml.jackson.core.JsonProcessingException;
+import com.fasterxml.jackson.databind.JsonNode;
+import com.fasterxml.jackson.databind.ObjectMapper;
+import org.apache.commons.lang3.StringUtils;
+import org.apache.nifi.processor.ProcessorInitializationContext;
+import org.apache.nifi.processors.model.Field;
+import org.apache.nifi.processors.model.IoTDBSchema;
+import org.apache.iotdb.rpc.IoTDBConnectionException;
+import org.apache.iotdb.session.Session;
+import org.apache.iotdb.tsfile.file.metadata.enums.CompressionType;
+import org.apache.iotdb.tsfile.file.metadata.enums.TSDataType;
+import org.apache.iotdb.tsfile.file.metadata.enums.TSEncoding;
+import org.apache.iotdb.tsfile.utils.Binary;
+import org.apache.iotdb.tsfile.write.record.Tablet;
+import org.apache.iotdb.tsfile.write.schema.MeasurementSchema;
+import org.apache.nifi.annotation.lifecycle.OnScheduled;
+import org.apache.nifi.components.PropertyDescriptor;
+import org.apache.nifi.processor.AbstractProcessor;
+import org.apache.nifi.processor.ProcessContext;
+import org.apache.nifi.processor.Relationship;
+import org.apache.nifi.processor.util.StandardValidators;
+import org.apache.nifi.processors.model.ValidationResult;
+import org.apache.nifi.serialization.record.DataType;
+import org.apache.nifi.serialization.record.RecordFieldType;
+import org.apache.nifi.serialization.record.RecordSchema;
+
+public abstract class AbstractIoTDB extends AbstractProcessor {
+private static final int DEFAULT_IOTDB_PORT = 6667;
+
+protected static ObjectMapper mapper = new ObjectMapper();
+
+private static final String TIME_NAME = "timeName";
+private static final String FIELDS = "fields";
+private static final String TIME = "Time";
+
+private static final Map typeMap =
+new HashMap<>();
+
+private static final Map reversedTypeMap =
+new HashMap<>();
+
+static final Set supportedType =
+new HashSet<>();
+
+static final PropertyDescriptor IOTDB_HOST =
+new PropertyDescriptor.Builder()
+.name("Host")
+.description("The host of IoTDB.")
+.addValidator(StandardValidators.NON_BLANK_VALIDATOR)
+.required(true)
+.build();
+
+static final PropertyDescriptor IOTDB_PORT =
+new PropertyDescriptor.Builder()
+.name("Port")
+.description("The port of IoTDB.")
+.defaultValue(String.valueOf(DEFAULT_IOTDB_PORT))
+.addValidator(StandardValidators.PORT_VALIDATOR)
+.required(true)
+.addValidator(StandardValidators.PORT_VALIDATOR)
+.build();
+
+static final PropertyDescriptor USERNAME =
+new PropertyDescriptor.Builder()
+.name("Username")
+.description("Username to access the IoTDB.")
+.addValidator(StandardValidators.NON_BLANK_VALIDATOR)
+.required(true)
+.build();
+
+static final PropertyDescriptor PASSWORD =
+new PropertyDescriptor.Builder()
+.name("Password")
+.description("Password to access the IoTDB.")
+.addValidator(StandardValidators.NON_BLANK_VALIDATOR)
+.required(true)
+.sensitive(true)
+.build();
+
+protected List descriptors = new ArrayList<>();
+
+protected final static Relationship REL_SUCCESS =
+new Relationship.Builder()
+   

[GitHub] [nifi] lizhizhou commented on a diff in pull request #6416: NIFI-10234 implement PutIoTDB

2023-01-01 Thread GitBox


lizhizhou commented on code in PR #6416:
URL: https://github.com/apache/nifi/pull/6416#discussion_r1059837395


##
nifi-nar-bundles/nifi-iotdb-bundle/nifi-iotdb-processors/src/main/java/org/apache/nifi/processors/AbstractIoTDB.java:
##
@@ -0,0 +1,365 @@
+/*
+ * 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.processors;
+
+import java.util.ArrayList;
+import java.util.HashMap;
+import java.util.HashSet;
+import java.util.List;
+import java.util.Map;
+import java.util.Set;
+import java.util.concurrent.atomic.AtomicReference;
+
+import com.fasterxml.jackson.core.JsonProcessingException;
+import com.fasterxml.jackson.databind.JsonNode;
+import com.fasterxml.jackson.databind.ObjectMapper;
+import org.apache.commons.lang3.StringUtils;
+import org.apache.nifi.processor.ProcessorInitializationContext;
+import org.apache.nifi.processors.model.Field;
+import org.apache.nifi.processors.model.IoTDBSchema;
+import org.apache.iotdb.rpc.IoTDBConnectionException;
+import org.apache.iotdb.session.Session;
+import org.apache.iotdb.tsfile.file.metadata.enums.CompressionType;
+import org.apache.iotdb.tsfile.file.metadata.enums.TSDataType;
+import org.apache.iotdb.tsfile.file.metadata.enums.TSEncoding;
+import org.apache.iotdb.tsfile.utils.Binary;
+import org.apache.iotdb.tsfile.write.record.Tablet;
+import org.apache.iotdb.tsfile.write.schema.MeasurementSchema;
+import org.apache.nifi.annotation.lifecycle.OnScheduled;
+import org.apache.nifi.components.PropertyDescriptor;
+import org.apache.nifi.processor.AbstractProcessor;
+import org.apache.nifi.processor.ProcessContext;
+import org.apache.nifi.processor.Relationship;
+import org.apache.nifi.processor.util.StandardValidators;
+import org.apache.nifi.processors.model.ValidationResult;
+import org.apache.nifi.serialization.record.DataType;
+import org.apache.nifi.serialization.record.RecordFieldType;
+import org.apache.nifi.serialization.record.RecordSchema;
+
+public abstract class AbstractIoTDB extends AbstractProcessor {
+private static final int DEFAULT_IOTDB_PORT = 6667;
+
+protected static ObjectMapper mapper = new ObjectMapper();
+
+private static final String TIME_NAME = "timeName";
+private static final String FIELDS = "fields";
+private static final String TIME = "Time";
+
+private static final Map typeMap =
+new HashMap<>();
+
+private static final Map reversedTypeMap =
+new HashMap<>();
+
+static final Set supportedType =
+new HashSet<>();
+
+static final PropertyDescriptor IOTDB_HOST =
+new PropertyDescriptor.Builder()
+.name("Host")
+.description("The host of IoTDB.")
+.addValidator(StandardValidators.NON_BLANK_VALIDATOR)
+.required(true)
+.build();
+
+static final PropertyDescriptor IOTDB_PORT =
+new PropertyDescriptor.Builder()
+.name("Port")
+.description("The port of IoTDB.")
+.defaultValue(String.valueOf(DEFAULT_IOTDB_PORT))
+.addValidator(StandardValidators.PORT_VALIDATOR)
+.required(true)
+.addValidator(StandardValidators.PORT_VALIDATOR)
+.build();
+
+static final PropertyDescriptor USERNAME =
+new PropertyDescriptor.Builder()
+.name("Username")
+.description("Username to access the IoTDB.")
+.addValidator(StandardValidators.NON_BLANK_VALIDATOR)
+.required(true)
+.build();
+
+static final PropertyDescriptor PASSWORD =
+new PropertyDescriptor.Builder()
+.name("Password")
+.description("Password to access the IoTDB.")
+.addValidator(StandardValidators.NON_BLANK_VALIDATOR)
+.required(true)
+.sensitive(true)
+.build();
+
+protected List descriptors = new ArrayList<>();

Review Comment:
   Resolved



-- 
This is an automated message from the Apache Git Service.
To respond to the 

[GitHub] [nifi] ChrisSamo632 commented on a diff in pull request #6814: [NIFI-11018] Upgraded from Junit4 to Junit5

2023-01-01 Thread GitBox


ChrisSamo632 commented on code in PR #6814:
URL: https://github.com/apache/nifi/pull/6814#discussion_r1059721500


##
nifi-nar-bundles/nifi-framework-bundle/nifi-framework/nifi-web/nifi-web-security/src/test/java/org/apache/nifi/web/security/jwt/key/service/StandardVerificationKeyServiceTest.java:
##
@@ -38,13 +40,14 @@
 import java.util.Map;
 import java.util.UUID;
 
-import static org.junit.Assert.assertNotNull;
-import static org.junit.Assert.assertTrue;
+import static org.junit.jupiter.api.Assertions.assertNotNull;
+import static org.junit.jupiter.api.Assertions.assertTrue;
 import static org.mockito.ArgumentMatchers.eq;
 import static org.mockito.Mockito.verify;
 import static org.mockito.Mockito.when;
 
-@RunWith(MockitoJUnitRunner.class)
+@ExtendWith(MockitoExtension.class)
+@MockitoSettings(strictness = Strictness.LENIENT)

Review Comment:
   https://github.com/apache/nifi/pull/6813#discussion_r1059721468



-- 
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] ChrisSamo632 commented on a diff in pull request #6813: [NIFI-11006] Upgraded from Junit4 to Junit5

2023-01-01 Thread GitBox


ChrisSamo632 commented on code in PR #6813:
URL: https://github.com/apache/nifi/pull/6813#discussion_r1059721468


##
nifi-nar-bundles/nifi-framework-bundle/nifi-framework/nifi-web/nifi-web-api/src/test/java/org/apache/nifi/web/search/attributematchers/SearchableMatcherTest.java:
##
@@ -25,14 +25,17 @@
 import org.apache.nifi.search.SearchContext;
 import org.apache.nifi.search.SearchResult;
 import org.apache.nifi.search.Searchable;
-import org.junit.Before;
-import org.junit.Test;
+import org.junit.jupiter.api.BeforeEach;
+import org.junit.jupiter.api.Test;
 import org.mockito.Mock;
 import org.mockito.Mockito;
+import org.mockito.junit.jupiter.MockitoSettings;
+import org.mockito.quality.Strictness;
 
 import java.util.Collection;
 import java.util.HashSet;
 
+@MockitoSettings(strictness = Strictness.LENIENT)

Review Comment:
   I agree it's not a blocker. If the lenient setting can simply be removed now 
then let's do that (has it been applied by default during some automated 
upgrade routine?)
   
   If it'll be more rework of the tests then fine to raise a tidy-up ticket on 
the backlog
   
   I only raised it because it looks like a change in mock behaviors during the 
junit 5 upgrade - Mockito has had strict on by default since version 2 and that 
shouldn't have changed between junit 4 and 5 runners (that I'm aware of, but I 
could well have missed such a thing)



-- 
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] MikeThomsen commented on a diff in pull request #6814: [NIFI-11018] Upgraded from Junit4 to Junit5

2022-12-31 Thread GitBox


MikeThomsen commented on code in PR #6814:
URL: https://github.com/apache/nifi/pull/6814#discussion_r1059677189


##
nifi-nar-bundles/nifi-framework-bundle/nifi-framework/nifi-web/nifi-web-security/src/test/java/org/apache/nifi/web/security/jwt/key/service/StandardVerificationKeyServiceTest.java:
##
@@ -38,13 +40,14 @@
 import java.util.Map;
 import java.util.UUID;
 
-import static org.junit.Assert.assertNotNull;
-import static org.junit.Assert.assertTrue;
+import static org.junit.jupiter.api.Assertions.assertNotNull;
+import static org.junit.jupiter.api.Assertions.assertTrue;
 import static org.mockito.ArgumentMatchers.eq;
 import static org.mockito.Mockito.verify;
 import static org.mockito.Mockito.when;
 
-@RunWith(MockitoJUnitRunner.class)
+@ExtendWith(MockitoExtension.class)
+@MockitoSettings(strictness = Strictness.LENIENT)

Review Comment:
   I wouldn't consider it a blocker for a merge. AFAIK it doesn't actually 
create real problems aside from runtime bloat which isn't a critical issue for 
us. It's something that we could put in the backlog as a TODO for the whole 
code base as a cleanup activity.



-- 
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] MikeThomsen commented on a diff in pull request #6813: [NIFI-11006] Upgraded from Junit4 to Junit5

2022-12-31 Thread GitBox


MikeThomsen commented on code in PR #6813:
URL: https://github.com/apache/nifi/pull/6813#discussion_r1059677168


##
nifi-nar-bundles/nifi-framework-bundle/nifi-framework/nifi-web/nifi-web-api/src/test/java/org/apache/nifi/web/search/attributematchers/SearchableMatcherTest.java:
##
@@ -25,14 +25,17 @@
 import org.apache.nifi.search.SearchContext;
 import org.apache.nifi.search.SearchResult;
 import org.apache.nifi.search.Searchable;
-import org.junit.Before;
-import org.junit.Test;
+import org.junit.jupiter.api.BeforeEach;
+import org.junit.jupiter.api.Test;
 import org.mockito.Mock;
 import org.mockito.Mockito;
+import org.mockito.junit.jupiter.MockitoSettings;
+import org.mockito.quality.Strictness;
 
 import java.util.Collection;
 import java.util.HashSet;
 
+@MockitoSettings(strictness = Strictness.LENIENT)

Review Comment:
   I wouldn't consider it a blocker for a merge. AFAIK it doesn't actually 
create real problems aside from runtime bloat which isn't a critical issue for 
us. It's something that we could put in the backlog as a TODO for the whole 
code base as a cleanup activity.



-- 
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] ChrisSamo632 opened a new pull request, #6816: NIFI-9206: Add RemoveRecordField processor and implement the ability to remove fields from records

2022-12-31 Thread GitBox


ChrisSamo632 opened a new pull request, #6816:
URL: https://github.com/apache/nifi/pull/6816

   # Summary
   
   [NIFI-9206](https://issues.apache.org/jira/browse/NIFI-9206) add the 
`RemoveRecordField` processor to allow for remove of Record Field(s) from 
FlowFile content using RecordPath specification similar to `UpdateRecord`.
   
   Caters for simple as well as complex, nested, collection and choice 
`DataFieldType`s.
   
   A rebase of @pgyori's #5381 taking @tpalfy's comments into account (as well 
as @Lehel44's comments from #5038).
   
   # 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-9206`
   - [x] Pull Request commit message starts with Apache NiFi Jira issue number, 
as such `NIFI-9206`
   
   ### 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`
 - [ ] JDK 8
 - [ ] JDK 11
 - [x] 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
   
   - [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



[GitHub] [nifi] ChrisSamo632 commented on a diff in pull request #6814: [NIFI-11018] Upgraded from Junit4 to Junit5

2022-12-31 Thread GitBox


ChrisSamo632 commented on code in PR #6814:
URL: https://github.com/apache/nifi/pull/6814#discussion_r1059620434


##
nifi-nar-bundles/nifi-framework-bundle/nifi-framework/nifi-web/nifi-web-security/src/test/java/org/apache/nifi/web/security/jwt/key/service/StandardVerificationKeyServiceTest.java:
##
@@ -38,13 +40,14 @@
 import java.util.Map;
 import java.util.UUID;
 
-import static org.junit.Assert.assertNotNull;
-import static org.junit.Assert.assertTrue;
+import static org.junit.jupiter.api.Assertions.assertNotNull;
+import static org.junit.jupiter.api.Assertions.assertTrue;
 import static org.mockito.ArgumentMatchers.eq;
 import static org.mockito.Mockito.verify;
 import static org.mockito.Mockito.when;
 
-@RunWith(MockitoJUnitRunner.class)
+@ExtendWith(MockitoExtension.class)
+@MockitoSettings(strictness = Strictness.LENIENT)

Review Comment:
   Is `LENIENT` necessary (Mockito default is `strict`)?



-- 
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] ChrisSamo632 commented on a diff in pull request #6813: [NIFI-11006] Upgraded from Junit4 to Junit5

2022-12-31 Thread GitBox


ChrisSamo632 commented on code in PR #6813:
URL: https://github.com/apache/nifi/pull/6813#discussion_r1059619260


##
nifi-nar-bundles/nifi-framework-bundle/nifi-framework/nifi-web/nifi-web-api/src/test/java/org/apache/nifi/web/search/attributematchers/SearchableMatcherTest.java:
##
@@ -25,14 +25,17 @@
 import org.apache.nifi.search.SearchContext;
 import org.apache.nifi.search.SearchResult;
 import org.apache.nifi.search.Searchable;
-import org.junit.Before;
-import org.junit.Test;
+import org.junit.jupiter.api.BeforeEach;
+import org.junit.jupiter.api.Test;
 import org.mockito.Mock;
 import org.mockito.Mockito;
+import org.mockito.junit.jupiter.MockitoSettings;
+import org.mockito.quality.Strictness;
 
 import java.util.Collection;
 import java.util.HashSet;
 
+@MockitoSettings(strictness = Strictness.LENIENT)

Review Comment:
   There's a lot of `lenient` settings being used with Mockito, is this 
necessary for all the classes changed in this MR (whether as part of the 
`@MacktioSettings` annotation on a class or a `@Mock` annotation on a single 
bean)?
   
   The Mockito default is `strict` rather than `lenient` to try and encourage 
(what they believe to be) better testing practices, e.g. don't define 
unnecessary stubs



-- 
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] asfgit closed pull request #6815: NIFI-11015 Correct Registry Trust Store Type handling

2022-12-31 Thread GitBox


asfgit closed pull request #6815: NIFI-11015 Correct Registry Trust Store Type 
handling
URL: https://github.com/apache/nifi/pull/6815


-- 
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 #6416: NIFI-10234 implement PutIoTDB

2022-12-30 Thread GitBox


exceptionfactory commented on code in PR #6416:
URL: https://github.com/apache/nifi/pull/6416#discussion_r1059539872


##
nifi-nar-bundles/nifi-iotdb-bundle/nifi-iotdb-processors/src/main/java/org/apache/nifi/processors/PutIoTDBRecord.java:
##
@@ -0,0 +1,286 @@
+/*
+ * 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.processors;
+
+import java.io.InputStream;
+import java.time.format.DateTimeFormatter;
+import java.util.Set;
+import java.util.List;
+import java.util.HashMap;
+import java.util.Map;
+import java.util.concurrent.atomic.AtomicBoolean;
+
+import org.apache.nifi.processor.ProcessorInitializationContext;
+import org.apache.nifi.processors.model.IoTDBSchema;
+import org.apache.iotdb.tsfile.file.metadata.enums.TSDataType;
+import org.apache.iotdb.tsfile.write.record.Tablet;
+import org.apache.iotdb.tsfile.write.schema.MeasurementSchema;
+import org.apache.nifi.annotation.behavior.InputRequirement;
+import org.apache.nifi.annotation.documentation.CapabilityDescription;
+import org.apache.nifi.annotation.documentation.Tags;
+import org.apache.nifi.components.PropertyDescriptor;
+import org.apache.nifi.expression.ExpressionLanguageScope;
+import org.apache.nifi.flowfile.FlowFile;
+import org.apache.nifi.processor.ProcessContext;
+import org.apache.nifi.processor.ProcessSession;
+import org.apache.nifi.processor.Relationship;
+import org.apache.nifi.processor.exception.ProcessException;
+import org.apache.nifi.processor.util.StandardValidators;
+import org.apache.nifi.processors.model.ValidationResult;
+import org.apache.nifi.serialization.RecordReader;
+import org.apache.nifi.serialization.RecordReaderFactory;
+import org.apache.nifi.serialization.record.Record;
+import java.sql.Timestamp;
+import java.sql.Time;
+import java.sql.Date;
+
+@Tags({"iotdb", "insert", "tablet"})
+@InputRequirement(InputRequirement.Requirement.INPUT_REQUIRED)
+@CapabilityDescription(
+"This is a record aware processor that reads the content of the 
incoming FlowFile as individual records using the "
++ "configured 'Record Reader' and writes them to Apache IoTDB 
using native interface.")
+public class PutIoTDBRecord extends AbstractIoTDB {
+
+static final PropertyDescriptor RECORD_READER_FACTORY =
+new PropertyDescriptor.Builder()
+.name("Record Reader")
+.description(
+"Specifies the type of Record Reader controller 
service to use for parsing the incoming data "
++ "and determining the schema")
+.identifiesControllerService(RecordReaderFactory.class)
+.addValidator(StandardValidators.NON_EMPTY_VALIDATOR)
+.required(true)
+.build();
+
+static final PropertyDescriptor SCHEMA =
+new PropertyDescriptor.Builder()
+.name("Schema Template")
+.description(
+"The Apache IoTDB Schema Template defined using 
JSON.\n" +
+"The Processor will infer the IoTDB Schema 
when this property is not configured.\n" +
+"Besides, you can set encoding type and 
compression type by this method.\n" +

Review Comment:
   ```suggestion
   "The Processor will infer the IoTDB 
Schema when this property is not configured. " +
   "Besides, you can set encoding type and 
compression type by this method. " +
   ```



##
nifi-nar-bundles/nifi-iotdb-bundle/nifi-iotdb-processors/src/main/java/org/apache/nifi/processors/PutIoTDBRecord.java:
##
@@ -0,0 +1,286 @@
+/*
+ * 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
+ *
+ * 

[GitHub] [nifi] exceptionfactory commented on a diff in pull request #6416: NIFI-10234 implement PutIoTDB

2022-12-30 Thread GitBox


exceptionfactory commented on code in PR #6416:
URL: https://github.com/apache/nifi/pull/6416#discussion_r1059537189


##
nifi-nar-bundles/nifi-iotdb-bundle/nifi-iotdb-processors/src/main/java/org/apache/nifi/processors/PutIoTDBRecord.java:
##
@@ -0,0 +1,283 @@
+/*
+ * 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.processors;
+
+import java.io.InputStream;
+import java.time.format.DateTimeFormatter;
+import java.util.Set;
+import java.util.List;
+import java.util.HashMap;
+import java.util.Map;
+import java.util.concurrent.atomic.AtomicBoolean;
+
+import org.apache.nifi.processor.ProcessorInitializationContext;
+import org.apache.nifi.processors.model.IoTDBSchema;
+import org.apache.iotdb.tsfile.file.metadata.enums.TSDataType;
+import org.apache.iotdb.tsfile.write.record.Tablet;
+import org.apache.iotdb.tsfile.write.schema.MeasurementSchema;
+import org.apache.nifi.annotation.behavior.InputRequirement;
+import org.apache.nifi.annotation.documentation.CapabilityDescription;
+import org.apache.nifi.annotation.documentation.Tags;
+import org.apache.nifi.components.PropertyDescriptor;
+import org.apache.nifi.expression.ExpressionLanguageScope;
+import org.apache.nifi.flowfile.FlowFile;
+import org.apache.nifi.processor.ProcessContext;
+import org.apache.nifi.processor.ProcessSession;
+import org.apache.nifi.processor.Relationship;
+import org.apache.nifi.processor.exception.ProcessException;
+import org.apache.nifi.processor.util.StandardValidators;
+import org.apache.nifi.processors.model.ValidationResult;
+import org.apache.nifi.serialization.RecordReader;
+import org.apache.nifi.serialization.RecordReaderFactory;
+import org.apache.nifi.serialization.record.Record;
+import java.sql.Timestamp;
+import java.sql.Time;
+import java.sql.Date;
+
+@Tags({"iotdb", "insert", "tablet"})
+@InputRequirement(InputRequirement.Requirement.INPUT_REQUIRED)
+@CapabilityDescription(
+"This is a record aware processor that reads the content of the 
incoming FlowFile as individual records using the "
++ "configured 'Record Reader' and writes them to Apache IoTDB 
using native interface.")
+public class PutIoTDBRecord extends AbstractIoTDB {
+
+static final PropertyDescriptor RECORD_READER_FACTORY =
+new PropertyDescriptor.Builder()
+.name("Record Reader")
+.description(
+"Specifies the type of Record Reader controller 
service to use for parsing the incoming data "
++ "and determining the schema")
+.identifiesControllerService(RecordReaderFactory.class)
+.addValidator(StandardValidators.NON_EMPTY_VALIDATOR)
+.required(true)
+.build();
+
+static final PropertyDescriptor SCHEMA =
+new PropertyDescriptor.Builder()
+.name("Schema Template")
+.description(
+"The Apache IoTDB Schema Template defined using 
JSON.\n" +
+"The Processor will infer the IoTDB Schema 
when this property is not configured.\n" +
+"Besides, you can set encoding type and 
compression type by this method.\n" +
+"If you want to know more detail about 
this, you can browse this link: 
https://iotdb.apache.org/UserGuide/Master/Ecosystem-Integration/NiFi-IoTDB.html;)
+
.expressionLanguageSupported(ExpressionLanguageScope.FLOWFILE_ATTRIBUTES)
+.addValidator(StandardValidators.NON_EMPTY_VALIDATOR)
+.required(false)
+.build();
+
+static final PropertyDescriptor PREFIX =
+new PropertyDescriptor.Builder()
+.name("Prefix")
+.description(
+"The Prefix begin with root. that will be add to 
the tsName in data.\n")
+
.expressionLanguageSupported(ExpressionLanguageScope.FLOWFILE_ATTRIBUTES)
+.addValidator(StandardValidators.NON_EMPTY_VALIDATOR)
+

[GitHub] [nifi] exceptionfactory commented on pull request #6416: NIFI-10234 implement PutIoTDB

2022-12-30 Thread GitBox


exceptionfactory commented on PR #6416:
URL: https://github.com/apache/nifi/pull/6416#issuecomment-1368107974

   It looks like the current build is failing due to differing parent POM 
versions. Recommend rebasing against the current main branch, which would be a 
good time to squash commits and remove merge commits from the history.


-- 
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 pull request #6416: NIFI-10234 implement PutIoTDB

2022-12-30 Thread GitBox


exceptionfactory commented on PR #6416:
URL: https://github.com/apache/nifi/pull/6416#issuecomment-1368106343

   @lizhizhou I pushed a minor update to correct build errors related to 
removed CompressionType values, and also adjusted the unit test class name to 
match standard conventions. I will continue reviewing other 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



[GitHub] [nifi] exceptionfactory opened a new pull request, #6815: NIFI-11015 Correct Registry Trust Store Type handling

2022-12-30 Thread GitBox


exceptionfactory opened a new pull request, #6815:
URL: https://github.com/apache/nifi/pull/6815

   # Summary
   
   [NIFI-11015](https://issues.apache.org/jira/browse/NIFI-11015) Corrects NiFi 
Registry configuration processing of the Trust Store Type property for the 
internal Jetty Server. Recent refactoring in NiFi 1.19.0 incorrectly used the 
Key Store Type property as the Trust Store Type, resulting in startup failures 
when the Trust Store Type was different from the Key Store Type. Changes 
include adjusting the associated unit test to build a TLS Configuration with 
JKS as the Trust Store Type, instead of the default PKCS12, which validates the 
expected behavior. 
   
   # 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
   
   - [ ] Build completed using `mvn clean install -P contrib-check`
 - [ ] JDK 8
 - [ ] 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 #6689: [NIFI-10754] Initial check in of new getUri NIFI Expression Language …

2022-12-30 Thread GitBox


exceptionfactory commented on code in PR #6689:
URL: https://github.com/apache/nifi/pull/6689#discussion_r1059523853


##
nifi-commons/nifi-expression-language/src/main/java/org/apache/nifi/attribute/expression/language/evaluation/functions/GetUriEvaluator.java:
##
@@ -0,0 +1,63 @@
+/*
+ * 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.attribute.expression.language.evaluation.functions;
+
+import org.apache.nifi.attribute.expression.language.EvaluationContext;
+import org.apache.nifi.attribute.expression.language.evaluation.Evaluator;
+import org.apache.nifi.attribute.expression.language.evaluation.QueryResult;
+import 
org.apache.nifi.attribute.expression.language.evaluation.StringEvaluator;
+import 
org.apache.nifi.attribute.expression.language.evaluation.StringQueryResult;
+import 
org.apache.nifi.attribute.expression.language.exception.AttributeExpressionLanguageException;
+
+import java.net.URI;
+import java.net.URISyntaxException;
+import java.util.List;
+import java.util.stream.Collectors;
+
+public class GetUriEvaluator extends StringEvaluator {
+
+private final List> uriArgs;
+
+public GetUriEvaluator(List> uriArgs) {
+this.uriArgs = uriArgs;
+}
+
+@Override
+public QueryResult evaluate(EvaluationContext evaluationContext) {
+List args = uriArgs.stream()
+.map(uriArg -> uriArg.evaluate(evaluationContext).getValue())
+.collect(Collectors.toList());
+
+try {
+if (args.size() == 7) {
+return new StringQueryResult(new URI(args.get(0), args.get(1), 
args.get(2),
+Integer.parseInt(args.get(3)), args.get(4), 
args.get(5), args.get(6)).toString());

Review Comment:
   Recommend breaking this into multiple lines for readability. I also 
recommend moving the integer parsing to a separate private method, where the 
`NumberFormatException` could be caught apart from the others.
   ```suggestion
   final String scheme = args.get(0);
   final String userInfo = args.get(1);
   final String host = args.get(2);
   final int port = getPort(args.get(3));
   final String path = args.get(4);
   final String query = args.get(5);
   final String fragment = args.get(6);
   final URI uri = new URI(scheme, userInfo, host, port, path, 
query, fragment);
   return new StringQueryResult(uri.toString());
   ```



-- 
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 closed pull request #6806: [NIFI-10979] Made changes to upgrade to JUnit5.

2022-12-30 Thread GitBox


exceptionfactory closed pull request #6806: [NIFI-10979] Made changes to 
upgrade to JUnit5.
URL: https://github.com/apache/nifi/pull/6806


-- 
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 closed pull request #6782: NIFI-10456: Add client authentication strategy option to OAuth2 provider

2022-12-30 Thread GitBox


exceptionfactory closed pull request #6782: NIFI-10456: Add client 
authentication strategy option to OAuth2 provider
URL: https://github.com/apache/nifi/pull/6782


-- 
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 opened a new pull request, #6814: [NIFI-11018] Upgraded from Junit4 to Junit5

2022-12-30 Thread GitBox


dan-s1 opened a new pull request, #6814:
URL: https://github.com/apache/nifi/pull/6814

   
   
   
   
   
   
   
   
   
   
   
   
   
   # Summary
   
   [NIFI-11018](https://issues.apache.org/jira/browse/NIFI-11018)
   
   # 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 8
 - [ ] 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] davyam commented on pull request #6053: NIFI-4239 - Adding CaptureChangePostgreSQL processor to capture data changes (INSERT/UPDATE/DELETE) from PostgreSQL tables via Logical Replicati

2022-12-30 Thread GitBox


davyam commented on PR #6053:
URL: https://github.com/apache/nifi/pull/6053#issuecomment-1368052164

   Hey guys, 
   
   we are a little late, I know, other personal activities get in the way, but 
I'm still working on the improvements.
   
   ASAP we will have the CapctureChangePostgreSQL processor in NiFi.
   
   Best regards


-- 
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] janis-ax commented on pull request #6053: NIFI-4239 - Adding CaptureChangePostgreSQL processor to capture data changes (INSERT/UPDATE/DELETE) from PostgreSQL tables via Logical Replica

2022-12-30 Thread GitBox


janis-ax commented on PR #6053:
URL: https://github.com/apache/nifi/pull/6053#issuecomment-1368036088

   Hey @MaheshKungaria if it's urgent for you: I build the processor, so you 
can try it out by putting the nar file into your lib folder. 
   
   
[nifi-cdc-postgresql-nar-1.20.0-SNAPSHOT.nar.zip](https://github.com/apache/nifi/files/10325786/nifi-cdc-postgresql-nar-1.20.0-SNAPSHOT.nar.zip)
   


-- 
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 #6783: NIFI-10974: Incorrect warning message on memory usage from MonitorMemory

2022-12-30 Thread GitBox


NissimShiman commented on code in PR #6783:
URL: https://github.com/apache/nifi/pull/6783#discussion_r1059474644


##
nifi-nar-bundles/nifi-standard-bundle/nifi-standard-reporting-tasks/src/main/java/org/apache/nifi/controller/MonitorMemory.java:
##
@@ -218,7 +218,11 @@ public void onTrigger(final ReportingContext context) {
 }
 
 final double percentageUsed = (double) usage.getUsed() / (double) 
usage.getMax() * 100D;
-if (bean.isCollectionUsageThresholdSupported() && 
bean.isCollectionUsageThresholdExceeded()) {
+final String percentageThreshold = threshold.substring(0, 
threshold.length() - 1);

Review Comment:
   Maybe rename to percentageUsageThreshold



-- 
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 #6783: NIFI-10974: Incorrect warning message on memory usage from MonitorMemory

2022-12-30 Thread GitBox


NissimShiman commented on code in PR #6783:
URL: https://github.com/apache/nifi/pull/6783#discussion_r1059474487


##
nifi-nar-bundles/nifi-standard-bundle/nifi-standard-reporting-tasks/src/main/java/org/apache/nifi/controller/MonitorMemory.java:
##
@@ -218,7 +218,11 @@ public void onTrigger(final ReportingContext context) {
 }
 
 final double percentageUsed = (double) usage.getUsed() / (double) 
usage.getMax() * 100D;
-if (bean.isCollectionUsageThresholdSupported() && 
bean.isCollectionUsageThresholdExceeded()) {
+final String percentageThreshold = threshold.substring(0, 
threshold.length() - 1);
+final double usageThreshold = Double.parseDouble(percentageThreshold);
+// In certain scenarios in the monitored memory bean the gcSensor can 
get stuck in 'on' state before the usage would reach the threshold
+// and this will cause false exceeded state until the next garbage 
collection. To eliminate this we are adding a condition with the calculated 
usage threshold.
+if (bean.isCollectionUsageThresholdSupported() && 
bean.isCollectionUsageThresholdExceeded() && percentageUsed > usageThreshold) {

Review Comment:
   I don't think we need check for bean.isCollectionUsageThresholdExceeded() 
anymore



-- 
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 opened a new pull request, #6813: [NIFI-11006] Upgraded from Junit4 to Junit5

2022-12-30 Thread GitBox


dan-s1 opened a new pull request, #6813:
URL: https://github.com/apache/nifi/pull/6813

   
   
   
   
   
   
   
   
   
   
   
   
   
   # Summary
   
   [NIFI-11006](https://issues.apache.org/jira/browse/NIFI-11006)
   
   # 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 8
 - [ ] 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] NissimShiman commented on pull request #6783: NIFI-10974: Incorrect warning message on memory usage from MonitorMemory

2022-12-30 Thread GitBox


NissimShiman commented on PR #6783:
URL: https://github.com/apache/nifi/pull/6783#issuecomment-1367926251

   reviewing..


-- 
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 closed pull request #6812: NIFI-11017 Bump hazelcast from 4.2.5 to 4.2.6 in /nifi-nar-bundles/nifi-hazelcast-bundle/nifi-hazelcast-services

2022-12-29 Thread GitBox


exceptionfactory closed pull request #6812: NIFI-11017 Bump hazelcast from 
4.2.5 to 4.2.6 in 
/nifi-nar-bundles/nifi-hazelcast-bundle/nifi-hazelcast-services
URL: https://github.com/apache/nifi/pull/6812


-- 
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] dependabot[bot] commented on pull request #6812: NIFI-11017 Bump hazelcast from 4.2.5 to 4.2.6 in /nifi-nar-bundles/nifi-hazelcast-bundle/nifi-hazelcast-services

2022-12-29 Thread GitBox


dependabot[bot] commented on PR #6812:
URL: https://github.com/apache/nifi/pull/6812#issuecomment-1367708341

   OK, I won't notify you again about this release, but will get in touch when 
a new version is available. If you'd rather skip all updates until the next 
major or minor version, let me know by commenting `@dependabot ignore this 
major version` or `@dependabot ignore this minor version`.
   
   If you change your mind, just re-open this PR and I'll resolve any conflicts 
on it.


-- 
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 closed pull request #6811: NIFI-11012 - Update Twitter SDK to v2

2022-12-29 Thread GitBox


exceptionfactory closed pull request #6811: NIFI-11012 - Update Twitter SDK to 
v2
URL: https://github.com/apache/nifi/pull/6811


-- 
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 closed pull request #6808: NIFI-11009 Update Snowflake SDK to 1.0.2-beta.7

2022-12-29 Thread GitBox


exceptionfactory closed pull request #6808: NIFI-11009 Update Snowflake SDK to 
1.0.2-beta.7
URL: https://github.com/apache/nifi/pull/6808


-- 
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 #6782: NIFI-10456: Add client authentication strategy option to OAuth2 provider

2022-12-29 Thread GitBox


exceptionfactory commented on code in PR #6782:
URL: https://github.com/apache/nifi/pull/6782#discussion_r1059226097


##
nifi-nar-bundles/nifi-standard-services/nifi-oauth2-provider-bundle/nifi-oauth2-provider-service/src/main/java/org/apache/nifi/oauth2/StandardOauth2AccessTokenProvider.java:
##
@@ -236,6 +252,19 @@ protected Collection 
customValidate(ValidationContext validati
 .build());
 }
 
+String clientAuthenticationStrategy = 
validationContext.getProperty(CLIENT_AUTHENTICATION_STRATEGY).getValue();
+try {
+ClientAuthenticationStrategy.valueOf(clientAuthenticationStrategy);
+} catch (IllegalArgumentException ex) {
+validationResults.add(new 
ValidationResult.Builder().subject(CLIENT_AUTHENTICATION_STRATEGY.getDisplayName())
+.valid(false)
+.explanation(String.format("Unrecognized %s value '%s'",
+CLIENT_AUTHENTICATION_STRATEGY.getDisplayName(),
+clientAuthenticationStrategy)
+)
+.build());
+}

Review Comment:
   This custom validation is not necessary because the allowable values will 
prevent unsupported values from being configured.
   ```suggestion
   ```



-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: issues-unsubscr...@nifi.apache.org

For queries about this service, please contact Infrastructure at:
us...@infra.apache.org



[GitHub] [nifi] ChrisSamo632 commented on a diff in pull request #6797: NIFI-10992 - Option to build all include-x profiles

2022-12-29 Thread GitBox


ChrisSamo632 commented on code in PR #6797:
URL: https://github.com/apache/nifi/pull/6797#discussion_r1059090649


##
nifi-assembly/pom.xml:
##
@@ -983,6 +983,9 @@ language governing permissions and limitations under the 
License. -->
 include-graph
 
 false
+
+allProfiles

Review Comment:
   Could `allProfiles` be set as a peppery as part of a new profile, e.g. a 
profile called `include-all` that just contains a
   
   ```xml
   
 true
   
   ```
   
   Block? That way we can still use the `mvn -p` profile flag instead of `-D` 
setting, which may be a bit more obvious for people
   
   I haven't tried this though so don't know whether the profiles 
dependency/linking would work



-- 
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 #6806: [NIFI-10979] Made changes to upgrade to JUnit5.

2022-12-29 Thread GitBox


dan-s1 commented on code in PR #6806:
URL: https://github.com/apache/nifi/pull/6806#discussion_r1059066766


##
nifi-nar-bundles/nifi-framework-bundle/nifi-framework/nifi-site-to-site/src/test/groovy/org/apache/nifi/remote/StandardPublicPortGroovyTest.groovy:
##
@@ -109,6 +98,6 @@ class StandardPublicPortGroovyTest extends GroovyTestCase {
 logger.info("Received ${responses.sum()} total flowfiles")
 
 // Assert
-assert !responses.isEmpty()
+assertFalse(!responses.isEmpty())

Review Comment:
   @ChrisSamo632 Good catch!



-- 
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] ChrisSamo632 commented on a diff in pull request #6806: [NIFI-10979] Made changes to upgrade to JUnit5.

2022-12-29 Thread GitBox


ChrisSamo632 commented on code in PR #6806:
URL: https://github.com/apache/nifi/pull/6806#discussion_r1059062965


##
nifi-nar-bundles/nifi-framework-bundle/nifi-framework/nifi-site-to-site/src/test/groovy/org/apache/nifi/remote/StandardPublicPortGroovyTest.groovy:
##
@@ -109,6 +98,6 @@ class StandardPublicPortGroovyTest extends GroovyTestCase {
 logger.info("Received ${responses.sum()} total flowfiles")
 
 // Assert
-assert !responses.isEmpty()
+assertFalse(!responses.isEmpty())

Review Comment:
   ```suggestion
   assertFalse(responses.isEmpty())
   ```
   
   Need to remove the `!` to retain the original assertion logic (or use 
`assertTrue` with the `!` but that would be more confusing to maintain)



-- 
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] ChrisSamo632 commented on a diff in pull request #6750: NIFI-10934 Adding uniqueness check for Registry Client creation

2022-12-29 Thread GitBox


ChrisSamo632 commented on code in PR #6750:
URL: https://github.com/apache/nifi/pull/6750#discussion_r1059061359


##
nifi-nar-bundles/nifi-framework-bundle/nifi-framework/nifi-web/nifi-web-api/src/main/java/org/apache/nifi/web/api/ControllerResource.java:
##
@@ -494,22 +495,26 @@ public Response createFlowRegistryClient(
 preprocessObsoleteRequest(requestFlowRegistryClientEntity);
 
 if (requestFlowRegistryClientEntity == null || 
requestFlowRegistryClientEntity.getComponent() == null) {
-throw new IllegalArgumentException("Flow registry client details 
must be specified.");
+throw new IllegalArgumentException("Flow Registry client details 
must be specified.");
 }
 
 if (requestFlowRegistryClientEntity.getRevision() == null
 || (requestFlowRegistryClientEntity.getRevision().getVersion() 
== null
 || requestFlowRegistryClientEntity.getRevision().getVersion() 
!= 0)) {
-throw new IllegalArgumentException("A revision of 0 must be 
specified when creating a new Registry.");
+throw new IllegalArgumentException("A revision of 0 must be 
specified when creating a new Flow Registry.");
 }
 
 final FlowRegistryClientDTO requestRegistryClient = 
requestFlowRegistryClientEntity.getComponent();
 if (requestRegistryClient.getId() != null) {
-throw new IllegalArgumentException("Registry ID cannot be 
specified.");
+throw new IllegalArgumentException("Flow Registry ID cannot be 
specified.");
 }
 
 if (StringUtils.isBlank(requestRegistryClient.getName())) {
-throw new IllegalArgumentException("Registry name must be 
specified.");
+throw new IllegalArgumentException("Flow Registry name must be 
specified.");
+}
+
+if (serviceFacade.getRegistryClients().stream().map(rce -> 
rce.getComponent().getName()).collect(Collectors.toSet()).contains(requestRegistryClient.getName()))
 {

Review Comment:
   ```suggestion
   if (serviceFacade.getRegistryClients().stream().anyMatch(rce -> 
requestRegistryClient.getName().equals(rce.getComponent().getName( {
   ```
   
   I think use of the `anyMatch` stream function is more obvious than 
collecting everything into a `Set` and checking for `contains`



-- 
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] ChrisSamo632 commented on a diff in pull request #6806: [NIFI-10979] Made changes to upgrade to JUnit5.

2022-12-29 Thread GitBox


ChrisSamo632 commented on code in PR #6806:
URL: https://github.com/apache/nifi/pull/6806#discussion_r1059057282


##
nifi-nar-bundles/nifi-framework-bundle/nifi-framework/nifi-site-to-site/src/test/groovy/org/apache/nifi/remote/StandardPublicPortGroovyTest.groovy:
##
@@ -24,51 +24,38 @@ import org.apache.nifi.remote.protocol.CommunicationsSession
 import org.apache.nifi.remote.protocol.ServerProtocol
 import org.apache.nifi.reporting.BulletinRepository
 import org.apache.nifi.util.NiFiProperties
-import org.junit.After
-import org.junit.Before
-import org.junit.BeforeClass
-import org.junit.Ignore
-import org.junit.Test
-import org.junit.runner.RunWith
-import org.junit.runners.JUnit4
+import org.junit.jupiter.api.Disabled
+import org.junit.jupiter.api.Test
+import org.junit.jupiter.api.BeforeAll
 import org.slf4j.Logger
 import org.slf4j.LoggerFactory
 
-@RunWith(JUnit4.class)
-class StandardPublicPortGroovyTest extends GroovyTestCase {
+class StandardPublicPortGroovyTest {
 private static final Logger logger = 
LoggerFactory.getLogger(StandardPublicPortGroovyTest.class)
 
-@BeforeClass
+@BeforeAll
 static void setUpOnce() throws Exception {
 logger.metaClass.methodMissing = { String name, args ->
 logger.info("[${name?.toUpperCase()}] ${(args as List).join(" ")}")
 }
 }
 
-@Before
-void setUp() {
-
-}
-
-@After
-void tearDown() {
-
-}
-
 private static PublicPort createPublicPort(NiFiProperties niFiProperties) {
 Authorizer mockAuthorizer = [:] as Authorizer
 BulletinRepository mockBulletinRepository = [:] as BulletinRepository
 ProcessScheduler mockProcessScheduler = [registerEvent: { Connectable 
worker ->
 logger.mock("Registered event for worker: ${worker}")
 }] as ProcessScheduler
 
-StandardPublicPort spp = new StandardPublicPort("id", "name", 
TransferDirection.RECEIVE, ConnectableType.INPUT_PORT, mockAuthorizer, 
mockBulletinRepository, mockProcessScheduler, false, 
niFiProperties.getBoredYieldDuration(), [])
+StandardPublicPort spp =
+new StandardPublicPort("id", "name", 
TransferDirection.RECEIVE, ConnectableType.INPUT_PORT,
+mockAuthorizer, mockBulletinRepository, 
mockProcessScheduler, false, niFiProperties.getBoredYieldDuration(), [])
 logger.info("Created SPP with mocked collaborators: ${spp}")
 spp
 }
 
 // TODO: Implement test
-@Ignore("Not yet implemented")
+@Disabled("Not yet implemented")

Review Comment:
   I guess leaving it `Disabled` for now makes sense then and hope it is fixed 
in the future, but if the `Test` method is being retained now then replacing 
the raw `assert` would at least seem worthwhile



-- 
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 #6806: [NIFI-10979] Made changes to upgrade to JUnit5.

2022-12-29 Thread GitBox


dan-s1 commented on code in PR #6806:
URL: https://github.com/apache/nifi/pull/6806#discussion_r1059053833


##
nifi-nar-bundles/nifi-framework-bundle/nifi-framework/nifi-site-to-site/src/test/groovy/org/apache/nifi/remote/StandardPublicPortGroovyTest.groovy:
##
@@ -24,51 +24,38 @@ import org.apache.nifi.remote.protocol.CommunicationsSession
 import org.apache.nifi.remote.protocol.ServerProtocol
 import org.apache.nifi.reporting.BulletinRepository
 import org.apache.nifi.util.NiFiProperties
-import org.junit.After
-import org.junit.Before
-import org.junit.BeforeClass
-import org.junit.Ignore
-import org.junit.Test
-import org.junit.runner.RunWith
-import org.junit.runners.JUnit4
+import org.junit.jupiter.api.Disabled
+import org.junit.jupiter.api.Test
+import org.junit.jupiter.api.BeforeAll
 import org.slf4j.Logger
 import org.slf4j.LoggerFactory
 
-@RunWith(JUnit4.class)
-class StandardPublicPortGroovyTest extends GroovyTestCase {
+class StandardPublicPortGroovyTest {
 private static final Logger logger = 
LoggerFactory.getLogger(StandardPublicPortGroovyTest.class)
 
-@BeforeClass
+@BeforeAll
 static void setUpOnce() throws Exception {
 logger.metaClass.methodMissing = { String name, args ->
 logger.info("[${name?.toUpperCase()}] ${(args as List).join(" ")}")
 }
 }
 
-@Before
-void setUp() {
-
-}
-
-@After
-void tearDown() {
-
-}
-
 private static PublicPort createPublicPort(NiFiProperties niFiProperties) {
 Authorizer mockAuthorizer = [:] as Authorizer
 BulletinRepository mockBulletinRepository = [:] as BulletinRepository
 ProcessScheduler mockProcessScheduler = [registerEvent: { Connectable 
worker ->
 logger.mock("Registered event for worker: ${worker}")
 }] as ProcessScheduler
 
-StandardPublicPort spp = new StandardPublicPort("id", "name", 
TransferDirection.RECEIVE, ConnectableType.INPUT_PORT, mockAuthorizer, 
mockBulletinRepository, mockProcessScheduler, false, 
niFiProperties.getBoredYieldDuration(), [])
+StandardPublicPort spp =
+new StandardPublicPort("id", "name", 
TransferDirection.RECEIVE, ConnectableType.INPUT_PORT,
+mockAuthorizer, mockBulletinRepository, 
mockProcessScheduler, false, niFiProperties.getBoredYieldDuration(), [])
 logger.info("Created SPP with mocked collaborators: ${spp}")
 spp
 }
 
 // TODO: Implement test
-@Ignore("Not yet implemented")
+@Disabled("Not yet implemented")

Review Comment:
   @ChrisSamo632 Even with that change it is still failing. I see this at the 
console:
   ```
   [main] INFO org.apache.nifi.remote.StandardPublicPortGroovyTest - Created 
SPP with mocked collaborators: StandardPublicPort[id=id,name=name]
   [main] INFO org.apache.nifi.remote.StandardPublicPortGroovyTest - Listening 
on port for 5 seconds
   [main] INFO org.apache.nifi.remote.StandardPublicPortGroovyTest - [MOCK] 
Registered event for worker: StandardPublicPort[id=id,name=name]
   
   org.apache.nifi.processor.exception.ProcessException: 
java.net.SocketTimeoutException: Read timed out
   
at 
org.apache.nifi.remote.StandardPublicPort.receiveFlowFiles(StandardPublicPort.java:585)
at org.apache.nifi.remote.PublicPort$receiveFlowFiles.call(Unknown 
Source)
at 
org.codehaus.groovy.runtime.callsite.CallSiteArray.defaultCall(CallSiteArray.java:47)
at 
org.codehaus.groovy.runtime.callsite.AbstractCallSite.call(AbstractCallSite.java:125)
at 
org.codehaus.groovy.runtime.callsite.AbstractCallSite.call(AbstractCallSite.java:148)
at 
org.apache.nifi.remote.StandardPublicPortGroovyTest.testReceiveFlowFilesShouldHandleBlockedRequestDueToContentLength(StandardPublicPortGroovyTest.groovy:93)
at 
java.base/jdk.internal.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
at 
java.base/jdk.internal.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62)
at 
java.base/jdk.internal.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
at java.base/java.lang.reflect.Method.invoke(Method.java:566)
at 
org.junit.platform.commons.util.ReflectionUtils.invokeMethod(ReflectionUtils.java:727)
at 
org.junit.jupiter.engine.execution.MethodInvocation.proceed(MethodInvocation.java:60)
at 
org.junit.jupiter.engine.execution.InvocationInterceptorChain$ValidatingInvocation.proceed(InvocationInterceptorChain.java:131)
at 
org.junit.jupiter.engine.extension.TimeoutExtension.intercept(TimeoutExtension.java:156)
at 
org.junit.jupiter.engine.extension.TimeoutExtension.interceptTestableMethod(TimeoutExtension.java:147)
at 
org.junit.jupiter.engine.extension.TimeoutExtension.interceptTestMethod(TimeoutExtension.java:86)
at 

[GitHub] [nifi] dan-s1 commented on a diff in pull request #6806: [NIFI-10979] Made changes to upgrade to JUnit5.

2022-12-29 Thread GitBox


dan-s1 commented on code in PR #6806:
URL: https://github.com/apache/nifi/pull/6806#discussion_r1059053833


##
nifi-nar-bundles/nifi-framework-bundle/nifi-framework/nifi-site-to-site/src/test/groovy/org/apache/nifi/remote/StandardPublicPortGroovyTest.groovy:
##
@@ -24,51 +24,38 @@ import org.apache.nifi.remote.protocol.CommunicationsSession
 import org.apache.nifi.remote.protocol.ServerProtocol
 import org.apache.nifi.reporting.BulletinRepository
 import org.apache.nifi.util.NiFiProperties
-import org.junit.After
-import org.junit.Before
-import org.junit.BeforeClass
-import org.junit.Ignore
-import org.junit.Test
-import org.junit.runner.RunWith
-import org.junit.runners.JUnit4
+import org.junit.jupiter.api.Disabled
+import org.junit.jupiter.api.Test
+import org.junit.jupiter.api.BeforeAll
 import org.slf4j.Logger
 import org.slf4j.LoggerFactory
 
-@RunWith(JUnit4.class)
-class StandardPublicPortGroovyTest extends GroovyTestCase {
+class StandardPublicPortGroovyTest {
 private static final Logger logger = 
LoggerFactory.getLogger(StandardPublicPortGroovyTest.class)
 
-@BeforeClass
+@BeforeAll
 static void setUpOnce() throws Exception {
 logger.metaClass.methodMissing = { String name, args ->
 logger.info("[${name?.toUpperCase()}] ${(args as List).join(" ")}")
 }
 }
 
-@Before
-void setUp() {
-
-}
-
-@After
-void tearDown() {
-
-}
-
 private static PublicPort createPublicPort(NiFiProperties niFiProperties) {
 Authorizer mockAuthorizer = [:] as Authorizer
 BulletinRepository mockBulletinRepository = [:] as BulletinRepository
 ProcessScheduler mockProcessScheduler = [registerEvent: { Connectable 
worker ->
 logger.mock("Registered event for worker: ${worker}")
 }] as ProcessScheduler
 
-StandardPublicPort spp = new StandardPublicPort("id", "name", 
TransferDirection.RECEIVE, ConnectableType.INPUT_PORT, mockAuthorizer, 
mockBulletinRepository, mockProcessScheduler, false, 
niFiProperties.getBoredYieldDuration(), [])
+StandardPublicPort spp =
+new StandardPublicPort("id", "name", 
TransferDirection.RECEIVE, ConnectableType.INPUT_PORT,
+mockAuthorizer, mockBulletinRepository, 
mockProcessScheduler, false, niFiProperties.getBoredYieldDuration(), [])
 logger.info("Created SPP with mocked collaborators: ${spp}")
 spp
 }
 
 // TODO: Implement test
-@Ignore("Not yet implemented")
+@Disabled("Not yet implemented")

Review Comment:
   @ChrisSamo632 Even with that change it is still failing. I see this at the 
console:
   `[main] INFO org.apache.nifi.remote.StandardPublicPortGroovyTest - Created 
SPP with mocked collaborators: StandardPublicPort[id=id,name=name]
   [main] INFO org.apache.nifi.remote.StandardPublicPortGroovyTest - Listening 
on port for 5 seconds
   [main] INFO org.apache.nifi.remote.StandardPublicPortGroovyTest - [MOCK] 
Registered event for worker: StandardPublicPort[id=id,name=name]
   
   org.apache.nifi.processor.exception.ProcessException: 
java.net.SocketTimeoutException: Read timed out
   
at 
org.apache.nifi.remote.StandardPublicPort.receiveFlowFiles(StandardPublicPort.java:585)
at org.apache.nifi.remote.PublicPort$receiveFlowFiles.call(Unknown 
Source)
at 
org.codehaus.groovy.runtime.callsite.CallSiteArray.defaultCall(CallSiteArray.java:47)
at 
org.codehaus.groovy.runtime.callsite.AbstractCallSite.call(AbstractCallSite.java:125)
at 
org.codehaus.groovy.runtime.callsite.AbstractCallSite.call(AbstractCallSite.java:148)
at 
org.apache.nifi.remote.StandardPublicPortGroovyTest.testReceiveFlowFilesShouldHandleBlockedRequestDueToContentLength(StandardPublicPortGroovyTest.groovy:93)
at 
java.base/jdk.internal.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
at 
java.base/jdk.internal.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62)
at 
java.base/jdk.internal.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
at java.base/java.lang.reflect.Method.invoke(Method.java:566)
at 
org.junit.platform.commons.util.ReflectionUtils.invokeMethod(ReflectionUtils.java:727)
at 
org.junit.jupiter.engine.execution.MethodInvocation.proceed(MethodInvocation.java:60)
at 
org.junit.jupiter.engine.execution.InvocationInterceptorChain$ValidatingInvocation.proceed(InvocationInterceptorChain.java:131)
at 
org.junit.jupiter.engine.extension.TimeoutExtension.intercept(TimeoutExtension.java:156)
at 
org.junit.jupiter.engine.extension.TimeoutExtension.interceptTestableMethod(TimeoutExtension.java:147)
at 
org.junit.jupiter.engine.extension.TimeoutExtension.interceptTestMethod(TimeoutExtension.java:86)
at 

[GitHub] [nifi] dan-s1 commented on a diff in pull request #6806: [NIFI-10979] Made changes to upgrade to JUnit5.

2022-12-29 Thread GitBox


dan-s1 commented on code in PR #6806:
URL: https://github.com/apache/nifi/pull/6806#discussion_r1059053833


##
nifi-nar-bundles/nifi-framework-bundle/nifi-framework/nifi-site-to-site/src/test/groovy/org/apache/nifi/remote/StandardPublicPortGroovyTest.groovy:
##
@@ -24,51 +24,38 @@ import org.apache.nifi.remote.protocol.CommunicationsSession
 import org.apache.nifi.remote.protocol.ServerProtocol
 import org.apache.nifi.reporting.BulletinRepository
 import org.apache.nifi.util.NiFiProperties
-import org.junit.After
-import org.junit.Before
-import org.junit.BeforeClass
-import org.junit.Ignore
-import org.junit.Test
-import org.junit.runner.RunWith
-import org.junit.runners.JUnit4
+import org.junit.jupiter.api.Disabled
+import org.junit.jupiter.api.Test
+import org.junit.jupiter.api.BeforeAll
 import org.slf4j.Logger
 import org.slf4j.LoggerFactory
 
-@RunWith(JUnit4.class)
-class StandardPublicPortGroovyTest extends GroovyTestCase {
+class StandardPublicPortGroovyTest {
 private static final Logger logger = 
LoggerFactory.getLogger(StandardPublicPortGroovyTest.class)
 
-@BeforeClass
+@BeforeAll
 static void setUpOnce() throws Exception {
 logger.metaClass.methodMissing = { String name, args ->
 logger.info("[${name?.toUpperCase()}] ${(args as List).join(" ")}")
 }
 }
 
-@Before
-void setUp() {
-
-}
-
-@After
-void tearDown() {
-
-}
-
 private static PublicPort createPublicPort(NiFiProperties niFiProperties) {
 Authorizer mockAuthorizer = [:] as Authorizer
 BulletinRepository mockBulletinRepository = [:] as BulletinRepository
 ProcessScheduler mockProcessScheduler = [registerEvent: { Connectable 
worker ->
 logger.mock("Registered event for worker: ${worker}")
 }] as ProcessScheduler
 
-StandardPublicPort spp = new StandardPublicPort("id", "name", 
TransferDirection.RECEIVE, ConnectableType.INPUT_PORT, mockAuthorizer, 
mockBulletinRepository, mockProcessScheduler, false, 
niFiProperties.getBoredYieldDuration(), [])
+StandardPublicPort spp =
+new StandardPublicPort("id", "name", 
TransferDirection.RECEIVE, ConnectableType.INPUT_PORT,
+mockAuthorizer, mockBulletinRepository, 
mockProcessScheduler, false, niFiProperties.getBoredYieldDuration(), [])
 logger.info("Created SPP with mocked collaborators: ${spp}")
 spp
 }
 
 // TODO: Implement test
-@Ignore("Not yet implemented")
+@Disabled("Not yet implemented")

Review Comment:
   @ChrisSamo632 Even with that change it is still failing. I see this at the 
console:
   >[main] INFO org.apache.nifi.remote.StandardPublicPortGroovyTest - Created 
SPP with mocked collaborators: StandardPublicPort[id=id,name=name]
   [main] INFO org.apache.nifi.remote.StandardPublicPortGroovyTest - Listening 
on port for 5 seconds
   [main] INFO org.apache.nifi.remote.StandardPublicPortGroovyTest - [MOCK] 
Registered event for worker: StandardPublicPort[id=id,name=name]
   
   org.apache.nifi.processor.exception.ProcessException: 
java.net.SocketTimeoutException: Read timed out
   
at 
org.apache.nifi.remote.StandardPublicPort.receiveFlowFiles(StandardPublicPort.java:585)
at org.apache.nifi.remote.PublicPort$receiveFlowFiles.call(Unknown 
Source)
at 
org.codehaus.groovy.runtime.callsite.CallSiteArray.defaultCall(CallSiteArray.java:47)
at 
org.codehaus.groovy.runtime.callsite.AbstractCallSite.call(AbstractCallSite.java:125)
at 
org.codehaus.groovy.runtime.callsite.AbstractCallSite.call(AbstractCallSite.java:148)
at 
org.apache.nifi.remote.StandardPublicPortGroovyTest.testReceiveFlowFilesShouldHandleBlockedRequestDueToContentLength(StandardPublicPortGroovyTest.groovy:93)
at 
java.base/jdk.internal.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
at 
java.base/jdk.internal.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62)
at 
java.base/jdk.internal.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
at java.base/java.lang.reflect.Method.invoke(Method.java:566)
at 
org.junit.platform.commons.util.ReflectionUtils.invokeMethod(ReflectionUtils.java:727)
at 
org.junit.jupiter.engine.execution.MethodInvocation.proceed(MethodInvocation.java:60)
at 
org.junit.jupiter.engine.execution.InvocationInterceptorChain$ValidatingInvocation.proceed(InvocationInterceptorChain.java:131)
at 
org.junit.jupiter.engine.extension.TimeoutExtension.intercept(TimeoutExtension.java:156)
at 
org.junit.jupiter.engine.extension.TimeoutExtension.interceptTestableMethod(TimeoutExtension.java:147)
at 
org.junit.jupiter.engine.extension.TimeoutExtension.interceptTestMethod(TimeoutExtension.java:86)
at 

[GitHub] [nifi] ChrisSamo632 commented on a diff in pull request #6778: NIFI-10970: Added a count RecordPath function

2022-12-29 Thread GitBox


ChrisSamo632 commented on code in PR #6778:
URL: https://github.com/apache/nifi/pull/6778#discussion_r1058952730


##
nifi-docs/src/main/asciidoc/record-path-guide.adoc:
##
@@ -1071,6 +1071,37 @@ take the value of the supplied record path and use it as 
the namespace.
 Please note that the namespace must always be a valid UUID string. An empty 
string, another data type, etc. will result
 in an error. This is by design because the most common use case for UUID v5 is 
to uniquely identify records across data sets.
 
+
+=== count
+
+Returns the count of the number of elements. This is commonly used in 
conjunction with arrays. For example, if we have the following record:
+
+
+{
+"id": "1234",
+"elements": [{
+"name": "book",
+"color": "red"
+}, {
+"name": "computer",
+"color": "black"
+}]
+}
+
+
+We could determine the number of `elements` by using the `count` function. 
Using:
+
+
+count(/elements[*])
+
+
+Would yield a value of `2`. We could also use this as a filter, such as:
+
+/id[ count(/elements[*]) ]

Review Comment:
   This would reflect the unit test you've written with a `> 2` example



-- 
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] ChrisSamo632 commented on a diff in pull request #6778: NIFI-10970: Added a count RecordPath function

2022-12-29 Thread GitBox


ChrisSamo632 commented on code in PR #6778:
URL: https://github.com/apache/nifi/pull/6778#discussion_r1058951771


##
nifi-docs/src/main/asciidoc/record-path-guide.adoc:
##
@@ -1071,6 +1071,37 @@ take the value of the supplied record path and use it as 
the namespace.
 Please note that the namespace must always be a valid UUID string. An empty 
string, another data type, etc. will result
 in an error. This is by design because the most common use case for UUID v5 is 
to uniquely identify records across data sets.
 
+
+=== count
+
+Returns the count of the number of elements. This is commonly used in 
conjunction with arrays. For example, if we have the following record:
+
+
+{
+"id": "1234",
+"elements": [{
+"name": "book",
+"color": "red"
+}, {
+"name": "computer",
+"color": "black"
+}]
+}
+
+
+We could determine the number of `elements` by using the `count` function. 
Using:
+
+
+count(/elements[*])
+
+
+Would yield a value of `2`. We could also use this as a filter, such as:
+
+/id[ count(/elements[*]) ]

Review Comment:
   ```suggestion
   /id[ count(/elements[*]) = 2]
   ```
   
   Presumably for this to be a [filter 
function](https://nifi.apache.org/docs/nifi-docs/html/record-path-guide.html#filters),
 there needs to be some sort of 
[predicate](https://nifi.apache.org/docs/nifi-docs/html/record-path-guide.html#predicates),
 worth reflecting that within the docs



-- 
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] asfgit closed pull request #6810: NIFI-11011 - Update AWS SDK versions to 1.12.371 and 2.17.295

2022-12-29 Thread GitBox


asfgit closed pull request #6810: NIFI-11011 - Update AWS SDK versions to 
1.12.371 and 2.17.295
URL: https://github.com/apache/nifi/pull/6810


-- 
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] ChrisSamo632 commented on a diff in pull request #6806: [NIFI-10979] Made changes to upgrade to JUnit5.

2022-12-29 Thread GitBox


ChrisSamo632 commented on code in PR #6806:
URL: https://github.com/apache/nifi/pull/6806#discussion_r1058905623


##
nifi-nar-bundles/nifi-framework-bundle/nifi-framework/nifi-site-to-site/src/test/groovy/org/apache/nifi/remote/StandardPublicPortGroovyTest.groovy:
##
@@ -24,51 +24,38 @@ import org.apache.nifi.remote.protocol.CommunicationsSession
 import org.apache.nifi.remote.protocol.ServerProtocol
 import org.apache.nifi.reporting.BulletinRepository
 import org.apache.nifi.util.NiFiProperties
-import org.junit.After
-import org.junit.Before
-import org.junit.BeforeClass
-import org.junit.Ignore
-import org.junit.Test
-import org.junit.runner.RunWith
-import org.junit.runners.JUnit4
+import org.junit.jupiter.api.Disabled
+import org.junit.jupiter.api.Test
+import org.junit.jupiter.api.BeforeAll
 import org.slf4j.Logger
 import org.slf4j.LoggerFactory
 
-@RunWith(JUnit4.class)
-class StandardPublicPortGroovyTest extends GroovyTestCase {
+class StandardPublicPortGroovyTest {
 private static final Logger logger = 
LoggerFactory.getLogger(StandardPublicPortGroovyTest.class)
 
-@BeforeClass
+@BeforeAll
 static void setUpOnce() throws Exception {
 logger.metaClass.methodMissing = { String name, args ->
 logger.info("[${name?.toUpperCase()}] ${(args as List).join(" ")}")
 }
 }
 
-@Before
-void setUp() {
-
-}
-
-@After
-void tearDown() {
-
-}
-
 private static PublicPort createPublicPort(NiFiProperties niFiProperties) {
 Authorizer mockAuthorizer = [:] as Authorizer
 BulletinRepository mockBulletinRepository = [:] as BulletinRepository
 ProcessScheduler mockProcessScheduler = [registerEvent: { Connectable 
worker ->
 logger.mock("Registered event for worker: ${worker}")
 }] as ProcessScheduler
 
-StandardPublicPort spp = new StandardPublicPort("id", "name", 
TransferDirection.RECEIVE, ConnectableType.INPUT_PORT, mockAuthorizer, 
mockBulletinRepository, mockProcessScheduler, false, 
niFiProperties.getBoredYieldDuration(), [])
+StandardPublicPort spp =
+new StandardPublicPort("id", "name", 
TransferDirection.RECEIVE, ConnectableType.INPUT_PORT,
+mockAuthorizer, mockBulletinRepository, 
mockProcessScheduler, false, niFiProperties.getBoredYieldDuration(), [])
 logger.info("Created SPP with mocked collaborators: ${spp}")
 spp
 }
 
 // TODO: Implement test
-@Ignore("Not yet implemented")
+@Disabled("Not yet implemented")

Review Comment:
   Although this test is `Disabled` (does it still need to be?), it's probably 
sensible to remove the raw `assert` at the end and replace it with something 
like `assertFalse(responses.isEmpty())`



-- 
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] ChrisSamo632 commented on a diff in pull request #6806: [NIFI-10979] Made changes to upgrade to JUnit5.

2022-12-29 Thread GitBox


ChrisSamo632 commented on code in PR #6806:
URL: https://github.com/apache/nifi/pull/6806#discussion_r1058903579


##
nifi-nar-bundles/nifi-framework-bundle/nifi-framework/nifi-framework-nar-utils/src/test/java/org/apache/nifi/nar/NarThreadContextClassLoaderTest.java:
##
@@ -63,16 +63,12 @@ public void validateWithDefaultConstructor() throws 
Exception {
 Bundle systemBundle = SystemBundle.create(properties);
 ExtensionDiscoveringManager extensionManager = new 
StandardExtensionDiscoveringManager();
 extensionManager.discoverExtensions(systemBundle, 
Collections.emptySet());
-
assertTrue(NarThreadContextClassLoader.createInstance(extensionManager, 
WithDefaultConstructor.class.getName(),
-WithDefaultConstructor.class, properties) instanceof 
WithDefaultConstructor);
+
assertNotNull(NarThreadContextClassLoader.createInstance(extensionManager, 
WithDefaultConstructor.class.getName(),

Review Comment:
   ```suggestion
   assertInstanceOf(WithDefaultConstructor.class, 
NarThreadContextClassLoader.createInstance(extensionManager, 
WithDefaultConstructor.class.getName(),
   ```



-- 
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] asfgit closed pull request #6809: NIFI-11010 - Update Kinesis client to 1.14.9

2022-12-29 Thread GitBox


asfgit closed pull request #6809: NIFI-11010 - Update Kinesis client to 1.14.9
URL: https://github.com/apache/nifi/pull/6809


-- 
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] ChrisSamo632 commented on pull request #6628: NIFI-10067 enable use of script for Elasticsearch updates

2022-12-29 Thread GitBox


ChrisSamo632 commented on PR #6628:
URL: https://github.com/apache/nifi/pull/6628#issuecomment-1367243167

   > My vision for that processor...
   
   @MikeThomsen FYI I raised 
[NIFI-11016](https://issues.apache.org/jira/browse/NIFI-11016) to cover your 
future update to the `UpdateByQueryElasticsearch` processor if you wanted to do 
that in future


-- 
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] jynolen commented on pull request #5745: NIFI-9492: Fix for Chinese VPCE - Tests included

2022-12-29 Thread GitBox


jynolen commented on PR #5745:
URL: https://github.com/apache/nifi/pull/5745#issuecomment-1367174310

   Not closed


-- 
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] github-actions[bot] closed pull request #5745: NIFI-9492: Fix for Chinese VPCE - Tests included

2022-12-28 Thread GitBox


github-actions[bot] closed pull request #5745: NIFI-9492: Fix for Chinese VPCE 
- Tests included
URL: https://github.com/apache/nifi/pull/5745


-- 
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 pull request #6689: [NIFI-10754] Initial check in of new getUri NIFI Expression Language …

2022-12-28 Thread GitBox


dan-s1 commented on PR #6689:
URL: https://github.com/apache/nifi/pull/6689#issuecomment-1366789116

   @exceptionfactory I added the null literal as you requested and modified the 
documentation to reflect this. Please let me know if my changes are what you 
were intending. Thanks!


-- 
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] dependabot[bot] opened a new pull request, #6812: Bump hazelcast from 4.2.5 to 4.2.6 in /nifi-nar-bundles/nifi-hazelcast-bundle/nifi-hazelcast-services

2022-12-27 Thread GitBox


dependabot[bot] opened a new pull request, #6812:
URL: https://github.com/apache/nifi/pull/6812

   Bumps [hazelcast](https://github.com/hazelcast/hazelcast) from 4.2.5 to 
4.2.6.
   
   Release notes
   Sourced from https://github.com/hazelcast/hazelcast/releases;>hazelcast's 
releases.
   
   v4.2.6
   This document lists the new features, enhancements, fixed issues and, 
removed or deprecated features for Hazelcast IMDG 4.2.z releases. The numbers 
in the square brackets refer to the issues in Hazelcast's GitHub 
repositories.
    4.2.6 
   Enhancements
   
   Upgrade jackson-databind to 2.14.0. https://github-redirect.dependabot.com/hazelcast/hazelcast/issues/22391;>#22391
   
   Fixes
   
   Fixed an issue where replication over WAN was failing on the source 
cluster members, when there are multiple batch publishers configured in a 
single WAN replication. https://github-redirect.dependabot.com/hazelcast/hazelcast/issues/22496;>#22496
   Fixed a memory leak due to incomplete clean-up of backup replica sync 
operations. https://github-redirect.dependabot.com/hazelcast/hazelcast/issues/22406;>#22406
   Fixed the cluster failure occurred after requesting healthcheck of a 
member using REST API while the hazelcast.socket.buffer.direct 
property is enabled. https://github-redirect.dependabot.com/hazelcast/hazelcast/issues/21702;>#21702
   Improved connection handling. https://github-redirect.dependabot.com/hazelcast/hazelcast/issues/21643;>#21643
   Fixed an issue where a cluster could not be formed when security is 
enabled, various client permissions are set,
   and multiple members are started simultaneously. https://github-redirect.dependabot.com/hazelcast/hazelcast/issues/21508;>#21508
   
    4.2.5 
   If you’re using eviction or expiration for maps, you must set the 
per-entry-stats-enabled property to true to fix an issue in version 4.2.x where 
some map entries are not always evicted or expired according to their 
time-to-live or maximum idle duration configurations.
   Enhancements
   
   Introduced a system property for allowing you to audit that all the 
Hazelcast instances running in your environment have the instance tracking file 
name set correctly in the configuration. See the note in Instance Tracking. https://github-redirect.dependabot.com/hazelcast/hazelcast/issues/19929;>#19929
   Enabled XXE (XML External Entity Reference) protection for 
XMLInputFactory. The issue was reported through https://huntr.dev/bounties/d63972a2-b910-480a-a86b-d1f75d24d563/;>https://huntr.dev/bounties/d63972a2-b910-480a-a86b-d1f75d24d563/.
 https://github-redirect.dependabot.com/hazelcast/hazelcast/issues/20942;>#20942
   The probe level for most of the network related statistics has been 
changed to DEBUG to decrease the pressure on Management Center; now 
they are not sent to Management Center by default. If you want to see these 
statistics, you need to set the hazelcast.metrics.debug.enabled 
property to true. https://github-redirect.dependabot.com/hazelcast/hazelcast/issues/21275;>#21275
   
   Fixes
   
   Fixed an issue where the statistics like puts and removals were not 
increasing when these operations are executed through Transactional interface. 
https://github-redirect.dependabot.com/hazelcast/hazelcast/issues/21105;>#21105
   Fixed an issue where Hazelcast clients, which have only the IP address 
of a member to connect (but the member also has a hostname), were not able to 
connect to the cluster. https://github-redirect.dependabot.com/hazelcast/hazelcast/issues/20631;>#20631
   Hazelcast’s memcached implementation was interpreting the number values 
and parameters for incr and decr wrongly (numbers were being converted into 
byte arrays instead of decimals). This has been fixed by making these commands' 
implementations strictly follow the memcached protocol specification. https://github-redirect.dependabot.com/hazelcast/hazelcast/issues/19676;>#19676
   Fixed an issue where the totalPublishes statistics for the Reliable 
Topic data structure were always generated as 0. https://github-redirect.dependabot.com/hazelcast/hazelcast/issues/19656;>#19656
   Fixed an issue where the map.clear() and cache.clear() methods were 
evicting all entries in all near caches of all the maps in a cluster, not only 
the map on which these methods are called. https://github-redirect.dependabot.com/hazelcast/hazelcast/issues/19501;>#19501
   Fixed an issue that caused some map entries to remain in Hazelcast even 
when you configured eviction or expiration. https://github-redirect.dependabot.com/hazelcast/hazelcast/issues/19483;>#19483
   
   Removed/Deprecated Features
   The following system properties have been deprecated:
   
   hazelcast.client.statistics.enabled
   hazelcast.client.statistics.period.seconds
   
    4.2.4 =
   For the distributions packages of IMDG, we updated the vulnerable version 
of log4j2 in Management Center to 2.17.0. No changes were made to the IMDG 
code.
   

[GitHub] [nifi] asfgit closed pull request #6563: NIFI-10677: Add Choice data type handling to Iceberg record converter

2022-12-25 Thread GitBox


asfgit closed pull request #6563: NIFI-10677: Add Choice data type handling to 
Iceberg record converter
URL: https://github.com/apache/nifi/pull/6563


-- 
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] asfgit closed pull request #6780: NIFI-10971: improved edge case handling while fetching objects using …

2022-12-25 Thread GitBox


asfgit closed pull request #6780: NIFI-10971: improved edge case handling while 
fetching objects using …
URL: https://github.com/apache/nifi/pull/6780


-- 
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 #6802: NIFI-11004 Add documentation for OIDC groups claim property

2022-12-24 Thread GitBox


Lehel44 commented on PR #6802:
URL: https://github.com/apache/nifi/pull/6802#issuecomment-1364593106

   Thank you. LGTM+1


-- 
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] pvillard31 opened a new pull request, #6811: NIFI-11012 - Update Twitter SDK to v2

2022-12-24 Thread GitBox


pvillard31 opened a new pull request, #6811:
URL: https://github.com/apache/nifi/pull/6811

   
   
   
   
   
   
   
   
   
   
   
   
   
   # Summary
   
   [NIFI-11012](https://issues.apache.org/jira/browse/NIFI-11012)
   
   # 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 8
 - [ ] 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] pvillard31 opened a new pull request, #6810: NIFI-11011 - Update AWS SDK versions to 1.12.371 and 2.17.295

2022-12-24 Thread GitBox


pvillard31 opened a new pull request, #6810:
URL: https://github.com/apache/nifi/pull/6810

   
   
   
   
   
   
   
   
   
   
   
   
   
   # Summary
   
   [NIFI-11011](https://issues.apache.org/jira/browse/NIFI-11011)
   
   # 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 8
 - [ ] 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] pvillard31 opened a new pull request, #6809: NIFI-11010 - Update Kinesis client to 1.14.9

2022-12-24 Thread GitBox


pvillard31 opened a new pull request, #6809:
URL: https://github.com/apache/nifi/pull/6809

   # Summary
   
   [NIFI-11010](https://issues.apache.org/jira/browse/NIFI-11010)
   
   # 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 8
 - [ ] 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] pvillard31 opened a new pull request, #6808: NIFI-11009 Update Snowflake SDK to 1.0.2-beta.7

2022-12-24 Thread GitBox


pvillard31 opened a new pull request, #6808:
URL: https://github.com/apache/nifi/pull/6808

   # Summary
   
   [NIFI-11009](https://issues.apache.org/jira/browse/NIFI-11009)
   
   # 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 8
 - [ ] 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] pvillard31 closed pull request #6807: NIFI-11009 Update Snowflake SDK to 1.0.2-beta.7

2022-12-24 Thread GitBox


pvillard31 closed pull request #6807: NIFI-11009 Update Snowflake SDK to 
1.0.2-beta.7
URL: https://github.com/apache/nifi/pull/6807


-- 
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] pvillard31 opened a new pull request, #6807: NIFI-11009 Update Snowflake SDK to 1.0.2-beta.7

2022-12-24 Thread GitBox


pvillard31 opened a new pull request, #6807:
URL: https://github.com/apache/nifi/pull/6807

   # Summary
   
   [NIFI-11009](https://issues.apache.org/jira/browse/NIFI-11009)
   
   # 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 8
 - [ ] 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] asfgit closed pull request #6805: NIFI-10855 Add Documentation on CSRF Protection

2022-12-24 Thread GitBox


asfgit closed pull request #6805: NIFI-10855 Add Documentation on CSRF 
Protection
URL: https://github.com/apache/nifi/pull/6805


-- 
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 pull request #6689: [NIFI-10754] Initial check in of new getUri NIFI Expression Language …

2022-12-23 Thread GitBox


exceptionfactory commented on PR #6689:
URL: https://github.com/apache/nifi/pull/6689#issuecomment-1364408883

   > What did you have in mind for implementing a literal null as a function 
argument? I only question if it is more clearer than specifying to users to use 
an empty string which we can convert to null on the back end.
   
   I was thinking that `null` would be handled as a literal along the following 
lines:
   
   ```
   ${getUri('https', null, 'nifi.apache.org', 8443, '/docs.html', null, null)}
   ```
   
   An empty string could be passed to any of the string arguments, but it 
allowing a `null` would avoid the need to convert the arguments and clarify 
expected behavior.
   


-- 
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 pull request #6689: [NIFI-10754] Initial check in of new getUri NIFI Expression Language …

2022-12-23 Thread GitBox


dan-s1 commented on PR #6689:
URL: https://github.com/apache/nifi/pull/6689#issuecomment-1364270877

   @exceptionfactory I am fine with only implementing the the seven argument 
constructor. What did you have in mind for implementing a literal null as a 
function argument? I only question if it is more clearer than specifying to 
users to use an empty string which we can convert to null on the back end.


-- 
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 pull request #6689: [NIFI-10754] Initial check in of new getUri NIFI Expression Language …

2022-12-23 Thread GitBox


exceptionfactory commented on PR #6689:
URL: https://github.com/apache/nifi/pull/6689#issuecomment-1364267630

   Thanks for the reply @dan-s1.
   
   As you observed, the Expression Language parser does not support a literal 
`null` as a function argument. It would take a bit more work, but it seems 
worth evaluating what it would take to support a literal `null` argument for 
`getUri`. It seems like it could be scoped to this function.
   
   For `getUri` itself, there does not seem to be much value in the 
three-argument non-hierarchical option for `mailto` and similar links. This 
could be added later, but I think it makes more sense to focus on the 
hierarchical URI constructors unless you have a specific use case in mind for 
non-hierarchical URIs.
   
   For hierarchical URIs, the four and five argument constructors appear to 
fall into the convenience category. For simplicity of the initial 
implementation, what do you think of limiting the implementation to the seven 
argument constructor? Although it is the most verbose, it provides the clearest 
implementation for documentation and usage.


-- 
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 opened a new pull request, #6806: [NIFI-10979] Made changes to upgrade to JUnit5.

2022-12-23 Thread GitBox


dan-s1 opened a new pull request, #6806:
URL: https://github.com/apache/nifi/pull/6806

   
   
   
   
   
   
   
   
   
   
   
   
   
   # Summary
   
   [NIFI-10979](https://issues.apache.org/jira/browse/NIFI-10979)
   
   # 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 8
 - [ ] 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] dan-s1 commented on pull request #6689: [NIFI-10754] Initial check in of new getUri NIFI Expression Language …

2022-12-23 Thread GitBox


dan-s1 commented on PR #6689:
URL: https://github.com/apache/nifi/pull/6689#issuecomment-1364180293

   > Thanks for clarifying the intent @dan-s1, constructing the complete URI in 
a single function makes sense.
   > 
   > With that background, do you need all of the possible constructor options? 
It might be simpler to support just one or two options, as opposed to all of 
the convenience constructors.
   > 
   That is a hard call because I am not sure what different people need.
   
   > To the other question, is there a possibility that an empty string should 
be allowed as an argument instead of treated as `null`? That kind of implicit 
conversion to `null` seems like it could create confusion, and might actually 
be a reason to provide a different set of supported arguments so that 
particular values can be `null` when passed to the `URI` constructors.
   Per the URI javadocs
   
   > a component of the new URI may be left undefined by passing null for the 
corresponding parameter.
   I did not see a way of explicitly passing null except if a blank string was 
passed. Please let me know otherwise if null can be passed.
   
   


-- 
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 pull request #6689: [NIFI-10754] Initial check in of new getUri NIFI Expression Language …

2022-12-23 Thread GitBox


exceptionfactory commented on PR #6689:
URL: https://github.com/apache/nifi/pull/6689#issuecomment-1364167903

   Thanks for clarifying the intent @dan-s1, constructing the complete URI in a 
single function makes sense.
   
   With that background, do you need all of the possible constructor options? 
It might be simpler to support just one or two options, as opposed to all of 
the convenience constructors.
   
   To the other question, is there a possibility that an empty string should be 
allowed as an argument instead of treated as `null`? That kind of implicit 
conversion to `null` seems like it could create confusion, and might actually 
be a reason to provide a different set of supported arguments so that 
particular values can be `null` when passed to the `URI` constructors.


-- 
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] ChrisSamo632 commented on a diff in pull request #6687: NIFI-10844 allow _source only output for GetElasticsearch and JsonQueryElasticsearch processors

2022-12-23 Thread GitBox


ChrisSamo632 commented on code in PR #6687:
URL: https://github.com/apache/nifi/pull/6687#discussion_r1056535336


##
nifi-nar-bundles/nifi-elasticsearch-bundle/nifi-elasticsearch-restapi-processors/src/main/java/org/apache/nifi/processors/elasticsearch/api/ResultOutputStrategy.java:
##
@@ -0,0 +1,50 @@
+/*
+ * 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.processors.elasticsearch.api;
+
+import org.apache.nifi.components.DescribedValue;
+
+public enum ResultOutputStrategy implements DescribedValue {
+PER_HIT("Flowfile per hit."),

Review Comment:
   Used the existing property `value`s for the new `enum`s to maintain 
backwards compatibility



##
nifi-nar-bundles/nifi-elasticsearch-bundle/nifi-elasticsearch-restapi-processors/src/main/java/org/apache/nifi/processors/elasticsearch/api/PaginationType.java:
##
@@ -0,0 +1,47 @@
+/*
+ * 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.processors.elasticsearch.api;
+
+import org.apache.nifi.components.DescribedValue;
+
+public enum PaginationType implements DescribedValue {
+SCROLL("Use Elasticsearch \"scroll\" to page results."),

Review Comment:
   Used the existing property `value`s for the new `enum`s to maintain 
backwards compatibility



-- 
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] asfgit closed pull request #6804: NIFI-11005 Add New Import Modules to Checkstyle Configuration

2022-12-23 Thread GitBox


asfgit closed pull request #6804: NIFI-11005 Add New Import Modules to 
Checkstyle Configuration
URL: https://github.com/apache/nifi/pull/6804


-- 
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] asfgit closed pull request #6788: NIFI-10988 - Fix `ConsumeGCPubSubLite` processors delivering incorrect messages

2022-12-23 Thread GitBox


asfgit closed pull request #6788: NIFI-10988 - Fix `ConsumeGCPubSubLite` 
processors delivering incorrect messages
URL: https://github.com/apache/nifi/pull/6788


-- 
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 pull request #6805: NIFI-10855 Add Documentation on CSRF Protection

2022-12-23 Thread GitBox


exceptionfactory commented on PR #6805:
URL: https://github.com/apache/nifi/pull/6805#issuecomment-1364127208

   Thanks for the feedback and suggestions @Lehel44, I updated the wording in 
several places and included links to OWASP and Spring Security reference pages.


-- 
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 pull request #6802: NIFI-11004 Add documentation for OIDC groups claim property

2022-12-23 Thread GitBox


exceptionfactory commented on PR #6802:
URL: https://github.com/apache/nifi/pull/6802#issuecomment-1364109162

   > Why do we need to update nifi-resources.pom?
   
   Thanks for the feedback @Lehel44. The updates to `pom.xml` in 
`nifi-resources` sets the default value for the `nifi.properties` configuration 
included in the standard distribution. This follows the convention of other 
default property values, and also allows custom builds to set different default 
values using Maven properties.


-- 
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-minifi-cpp] fgerlits commented on a diff in pull request #1460: MINIFICPP-1995 Add configuring path for flowfile_checkpoint directory

2022-12-23 Thread GitBox


fgerlits commented on code in PR #1460:
URL: https://github.com/apache/nifi-minifi-cpp/pull/1460#discussion_r1056437169


##
extensions/rocksdb-repos/FlowFileRepository.h:
##
@@ -100,11 +100,17 @@ class FlowFileRepository : public ThreadedRepository, 
public SwapManager {
 config_ = configure;
 std::string value;
 
-if (configure->get(Configure::nifi_flowfile_repository_directory_default, 
value)) {
+if (configure->get(Configure::nifi_flowfile_repository_directory_default, 
value) && !value.empty()) {
   directory_ = value;
 }
 logger_->log_debug("NiFi FlowFile Repository Directory %s", directory_);
 
+value.clear();
+if (configure->get(Configure::nifi_flowfile_checkpoint_directory_default, 
value) && !value.empty()) {
+  checkpoint_dir_ = value;
+}
+logger_->log_debug("NiFi FlowFile Checkpoint Directory %s", 
checkpoint_dir_);

Review Comment:
   I think you need to either add `.string()` here, or make the conversion 
templates in `Logger.h` smarter to accept `path`s.



-- 
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 a diff in pull request #6802: NIFI-11004 Add documentation for OIDC groups claim property

2022-12-23 Thread GitBox


Lehel44 commented on code in PR #6802:
URL: https://github.com/apache/nifi/pull/6802#discussion_r1056363577


##
nifi-docs/src/main/asciidoc/administration-guide.adoc:
##
@@ -503,6 +503,9 @@ JSON Web Key (JWK) provided through the jwks_uri in the 
metadata found at the di
 |`nifi.security.user.oidc.additional.scopes` | Comma separated scopes that are 
sent to OpenId Connect Provider in addition to `openid` and `email`.
 |`nifi.security.user.oidc.claim.identifying.user` | Claim that identifies the 
user to be logged in; default is `email`. May need to be requested via the 
`nifi.security.user.oidc.additional.scopes` before usage.
 |`nifi.security.user.oidc.fallback.claims.identifying.user` | Comma separated 
possible fallback claims used to identify the user in case 
`nifi.security.user.oidc.claim.identifying.user` claim is not present for the 
login user.
+|`nifi.security.user.oidc.claim.groups` | Name of the ID token claim that 
contains an array of group names of which the
+user is a member. Application groups must be supplied from a User Group 
Provider with matching names in order for the
+authorization process to use ID token claim groups. The default value is 
`groups`.

Review Comment:
   ```suggestion
   user is a member. Application groups must be supplied by a User Group 
Provider with matching names for the
   authorization process to use ID token claim groups. The default value is 
`groups`.
   ```



-- 
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 a diff in pull request #6803: NIFI-10998: Fix SplitJson to always compile new JsonPath when property changes

2022-12-23 Thread GitBox


Lehel44 commented on code in PR #6803:
URL: https://github.com/apache/nifi/pull/6803#discussion_r1056360444


##
nifi-nar-bundles/nifi-standard-bundle/nifi-standard-processors/src/test/java/org/apache/nifi/processors/standard/TestSplitJson.java:
##
@@ -112,6 +112,43 @@ public void testSplit_arrayResult_multipleValues() throws 
Exception {
 originalOut.assertContentEquals(JSON_SNIPPET);
 }
 
+@Test
+public void testSplit_change_jsonpath() throws Exception {
+final TestRunner testRunner = TestRunners.newTestRunner(new 
SplitJson());
+testRunner.setProperty(SplitJson.ARRAY_JSON_PATH_EXPRESSION, 
"$[0].range");
+
+testRunner.enqueue(JSON_SNIPPET);
+testRunner.run();
+
+int numSplitsExpected = 10;
+
+testRunner.assertTransferCount(SplitJson.REL_ORIGINAL, 1);
+
testRunner.getFlowFilesForRelationship(SplitJson.REL_ORIGINAL).get(0).assertAttributeEquals(FRAGMENT_COUNT.key(),
 String.valueOf(numSplitsExpected));
+testRunner.assertTransferCount(SplitJson.REL_SPLIT, numSplitsExpected);
+final MockFlowFile originalOut = 
testRunner.getFlowFilesForRelationship(SplitJson.REL_ORIGINAL).get(0);
+originalOut.assertContentEquals(JSON_SNIPPET);
+
+// Change JsonPath Expression, verify it is being applied correctly
+testRunner.clearTransferState();
+testRunner.setProperty(SplitJson.ARRAY_JSON_PATH_EXPRESSION, 
"$[*].name");
+
+testRunner.enqueue(JSON_SNIPPET, new HashMap<>() {
+{
+put(CoreAttributes.FILENAME.key(), "test.json");
+}
+});

Review Comment:
   Using diamond with anonymous inner classes is not supported for some reason, 
this change fixes the build, too.



-- 
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 a diff in pull request #6805: NIFI-10855 Add Documentation on CSRF Protection

2022-12-23 Thread GitBox


Lehel44 commented on code in PR #6805:
URL: https://github.com/apache/nifi/pull/6805#discussion_r1056337558


##
nifi-docs/src/main/asciidoc/administration-guide.adoc:
##
@@ -582,6 +582,36 @@ The following settings can be configured in 
_nifi.properties_ to control JSON We
 |`nifi.security.user.jws.key.rotation.period` | JSON Web Signature Key 
Rotation Period defines how often the system generates a new RSA Key Pair, 
expressed as an ISO 8601 duration. The default is one hour: `PT1H`
 
|==
 
+[[csrf-protection]]
+=== Cross-Site Request Forgery Protection
+
+NiFi 1.15.0 introduced Cross-Site Request Forgery protection as part of user 
interface access based on session cookies.

Review Comment:
   In case someone goes through the documentation but now aware of what CSRF is 
we may leave a brief introduction or a link for the context.
   "[Cross-Site Request Forgery 
(CSRF)](https://owasp.org/www-community/attacks/csrf) is a type of attack that 
occurs when a malicious web site, email, blog, instant message, or program 
causes a user's web browser to perform an unwanted action on a trusted site 
when the user is authenticated."



##
nifi-docs/src/main/asciidoc/administration-guide.adoc:
##
@@ -582,6 +582,36 @@ The following settings can be configured in 
_nifi.properties_ to control JSON We
 |`nifi.security.user.jws.key.rotation.period` | JSON Web Signature Key 
Rotation Period defines how often the system generates a new RSA Key Pair, 
expressed as an ISO 8601 duration. The default is one hour: `PT1H`
 
|==
 
+[[csrf-protection]]
+=== Cross-Site Request Forgery Protection
+
+NiFi 1.15.0 introduced Cross-Site Request Forgery protection as part of user 
interface access based on session cookies.
+CSRF protection builds on a standard Spring Security Filter and implements the 
double submit cookie strategy. The

Review Comment:
   If we can add links, I'd add 
https://cheatsheetseries.owasp.org/cheatsheets/Cross-Site_Request_Forgery_Prevention_Cheat_Sheet.html#double-submit-cookie
 to the double submit cookie strategy.



##
nifi-docs/src/main/asciidoc/administration-guide.adoc:
##
@@ -582,6 +582,36 @@ The following settings can be configured in 
_nifi.properties_ to control JSON We
 |`nifi.security.user.jws.key.rotation.period` | JSON Web Signature Key 
Rotation Period defines how often the system generates a new RSA Key Pair, 
expressed as an ISO 8601 duration. The default is one hour: `PT1H`
 
|==
 
+[[csrf-protection]]
+=== Cross-Site Request Forgery Protection
+
+NiFi 1.15.0 introduced Cross-Site Request Forgery protection as part of user 
interface access based on session cookies.
+CSRF protection builds on a standard Spring Security Filter and implements the 
double submit cookie strategy. The
+implementation strategy relies on sending a random request token cookie at the 
beginning of the session, and requiring
+the JavaScript user interface to send the value in a corresponding request 
header. NiFi applies the `SameSite`
+attribute with a value of `strict` to the authorization session cookie, which 
instructs supporting web browsers to
+avoid sending the cookie on requests that a third party initiates. These 
protections mitigate a number of potential
+threats.
+
+Cookie names are not considered part of the public REST API and are subject to 
change in minor release
+versions. Programmatic HTTP requests to the NiFi REST API should use the 
standard HTTP `Authorization` header when
+sending access tokens instead of the session cookie that the NiFi user 
interface uses.
+
+NiFi deployments that include HTTP load balanced access with 
<> depend on custom HTTP cookies, which
+requires custom programmatic clients to store and send cookies for the 
duration of an authenticated session.

Review Comment:
   ```suggestion
   NiFi deployments that include HTTP load-balanced access with 
<> depend on custom HTTP cookies, which
   require custom programmatic clients to store and send cookies for the 
duration of an authenticated session.
   ```



##
nifi-docs/src/main/asciidoc/administration-guide.adoc:
##
@@ -582,6 +582,36 @@ The following settings can be configured in 
_nifi.properties_ to control JSON We
 |`nifi.security.user.jws.key.rotation.period` | JSON Web Signature Key 
Rotation Period defines how often the system generates a new RSA Key Pair, 
expressed as an ISO 8601 duration. The default is one hour: `PT1H`
 

[GitHub] [nifi] dan-s1 commented on pull request #6689: [NIFI-10754] Initial check in of new getUri NIFI Expression Language …

2022-12-23 Thread GitBox


dan-s1 commented on PR #6689:
URL: https://github.com/apache/nifi/pull/6689#issuecomment-1363956081

   > Thanks for working on this new feature @dan-s1. Although most of the 
implementation makes sense, it raises some questions about treating blanks 
strings as nulls. Although the `java.net.URI` has a number of constructors, it 
seems like this may provide more options than necessary. There is some value in 
simplicity, versus exposing all the possible options, which could also avoid 
potential confusion related to handling blank strings as nulls.
   > 
   > The discussion on NIFI-10754 originated out of issues with the `urlEncode` 
function. If the implementation were to be scoped down to just something like 
`uriEncodePath`, for instance, would that provide the desired functionality?
   
   @exceptionfactory  If I understand you correctly that means there would have 
to be potentially two calls when constructing a URI, one to urlEncodePath and 
one to urlEncode to encode the parameters. I was actually intending to simplify 
that process of URI construction with one call which would take care of the 
encoding for both the path and the parameters.


-- 
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-minifi-cpp] fgerlits opened a new pull request, #1483: MINIFICPP-2019 Fix auto-generation of PROCESSORS.md

2022-12-23 Thread GitBox


fgerlits opened a new pull request, #1483:
URL: https://github.com/apache/nifi-minifi-cpp/pull/1483

   https://issues.apache.org/jira/browse/MINIFICPP-2019
   
   The `PROCESSORS.md` file included in this PR is almost auto-generated (by 
merging the output of `minifi docs ...` on Linux and on Windows), except for a 
few sections mentioned in https://issues.apache.org/jira/browse/MINIFICPP-2021.
   
   `CollectKubernetesPodMetrics`, `ExecuteJavaProcessor` and 
`SourceInitiatedSubscriptionListener` were missing from `PROCESSORS.md`; I have 
added the auto-generated docs of these.
   
   Also, the ordering of the processors was inconsistent; now they are ordered 
in case-insensitive lexicographic order.
   
   ---
   
   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:
   - [x] Is there a JIRA ticket associated with this PR? Is it referenced
in the commit message?
   
   - [x] Does your PR title start with MINIFICPP- where  is the JIRA 
number you are trying to resolve? Pay particular attention to the hyphen "-" 
character.
   
   - [x] 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



[GitHub] [nifi] ChrisSamo632 commented on a diff in pull request #6687: NIFI-10844 allow _source only output for GetElasticsearch and JsonQueryElasticsearch processors

2022-12-23 Thread GitBox


ChrisSamo632 commented on code in PR #6687:
URL: https://github.com/apache/nifi/pull/6687#discussion_r1056252416


##
nifi-nar-bundles/nifi-elasticsearch-bundle/nifi-elasticsearch-restapi-processors/src/main/java/org/apache/nifi/processors/elasticsearch/api/PaginationType.java:
##
@@ -0,0 +1,47 @@
+/*
+ * 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.processors.elasticsearch.api;
+
+import org.apache.nifi.components.DescribedValue;
+
+public enum PaginationType implements DescribedValue {
+SCROLL("Use Elasticsearch \"scroll\" to page results."),

Review Comment:
   Need to make the backwards-compatible for the existing `AllowableValues` 
they're replacing in the processors



-- 
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] ChrisSamo632 commented on a diff in pull request #6687: NIFI-10844 allow _source only output for GetElasticsearch and JsonQueryElasticsearch processors

2022-12-23 Thread GitBox


ChrisSamo632 commented on code in PR #6687:
URL: https://github.com/apache/nifi/pull/6687#discussion_r1056252276


##
nifi-nar-bundles/nifi-elasticsearch-bundle/nifi-elasticsearch-restapi-processors/src/main/java/org/apache/nifi/processors/elasticsearch/api/ResultOutputStrategy.java:
##
@@ -0,0 +1,50 @@
+/*
+ * 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.processors.elasticsearch.api;
+
+import org.apache.nifi.components.DescribedValue;
+
+public enum ResultOutputStrategy implements DescribedValue {
+PER_HIT("Flowfile per hit."),

Review Comment:
   Need to make the backwards-compatible for the existing `AllowableValues` 
they're replacing in the processors



-- 
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-minifi-cpp] fgerlits commented on a diff in pull request #1481: MINIFICPP-1948 Add the UUID to the end of Processor and Controller Service log lines

2022-12-23 Thread GitBox


fgerlits commented on code in PR #1481:
URL: https://github.com/apache/nifi-minifi-cpp/pull/1481#discussion_r1055622646


##
libminifi/include/core/logging/LoggerConfiguration.h:
##
@@ -133,16 +132,21 @@ class LoggerConfiguration {
 
   class LoggerImpl : public Logger {
public:
-explicit LoggerImpl(std::string name, const std::shared_ptr 
, const std::shared_ptr )
+explicit LoggerImpl(std::string name, std::optional id, const 
std::shared_ptr , const 
std::shared_ptr )

Review Comment:
   I have changed everything to `Identifier` in 
8e2a3e25602436e36b686114ea7ad4daef5f6be8



-- 
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 opened a new pull request, #6805: NIFI-10855 Add Documentation on CSRF Protection

2022-12-22 Thread GitBox


exceptionfactory opened a new pull request, #6805:
URL: https://github.com/apache/nifi/pull/6805

   # Summary
   
   [NIFI-10855](https://issues.apache.org/jira/browse/NIFI-10855) Updates the 
Administrator's Guide with a new section describing Cross-Site Request Forgery 
Protection under the User Authentication section.
   
   # 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
   
   - [ ] Build completed using `mvn clean install -P contrib-check`
 - [ ] JDK 8
 - [ ] 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
   
   - [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



[GitHub] [nifi] exceptionfactory commented on a diff in pull request #6689: [NIFI-10754] Initial check in of new getUri NIFI Expression Language …

2022-12-22 Thread GitBox


exceptionfactory commented on code in PR #6689:
URL: https://github.com/apache/nifi/pull/6689#discussion_r1056009178


##
nifi-commons/nifi-expression-language/src/main/java/org/apache/nifi/attribute/expression/language/evaluation/functions/GetUriEvaluator.java:
##
@@ -0,0 +1,77 @@
+/*
+ * 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.attribute.expression.language.evaluation.functions;
+
+import org.apache.commons.lang3.StringUtils;
+import org.apache.nifi.attribute.expression.language.EvaluationContext;
+import org.apache.nifi.attribute.expression.language.evaluation.Evaluator;
+import org.apache.nifi.attribute.expression.language.evaluation.QueryResult;
+import 
org.apache.nifi.attribute.expression.language.evaluation.StringEvaluator;
+import 
org.apache.nifi.attribute.expression.language.evaluation.StringQueryResult;
+import 
org.apache.nifi.attribute.expression.language.exception.AttributeExpressionLanguageException;
+
+import java.net.URI;
+import java.net.URISyntaxException;
+import java.util.Arrays;
+import java.util.List;
+import java.util.stream.Collectors;
+
+public class GetUriEvaluator extends StringEvaluator {
+
+private final Evaluator[] uriArgs;
+
+public GetUriEvaluator(Evaluator[] uriArgs) {
+this.uriArgs = uriArgs;
+}
+
+@Override
+public QueryResult evaluate(EvaluationContext evaluationContext) {
+List args = Arrays.stream(uriArgs)
+.map(uriArg -> uriArg.evaluate(evaluationContext).getValue())
+.map(string -> StringUtils.isBlank(string) ? null : string)

Review Comment:
   The `StringUtils.isBlank()` check would convert both empty strings such as 
`""` as well as strings with spaces such as `"  "` to `null`. Although these 
seem to be unlikely arguments, it raises a larger question about passing empty 
arguments. The check should probably be simplified to check for an empty string:
   ```suggestion
   .map(string -> string == null || string.isEmpty() ? null : 
string)
   ```



-- 
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 opened a new pull request, #6804: NIFI-11005 Add New Import Modules to Checkstyle Configuration

2022-12-22 Thread GitBox


exceptionfactory opened a new pull request, #6804:
URL: https://github.com/apache/nifi/pull/6804

   # Summary
   
   [NIFI-11005](https://issues.apache.org/jira/browse/NIFI-11005) Adds 
`IllegalImport` and `RedundantImport` modules to the Checkstyle configuration 
to flag usage of classes from the `sun` namespace and detect unnecessary 
imports. Changes include updated several classes to remove redundant imports 
and removing `WebUtilsGroovyTest` due to its dependence on internal 
`sun.security` classes.
   
   # 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 8
 - [ ] 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 closed pull request #6480: NIFI-10585: Add GenerateFakeRecord processor

2022-12-22 Thread GitBox


exceptionfactory closed pull request #6480: NIFI-10585: Add GenerateFakeRecord 
processor
URL: https://github.com/apache/nifi/pull/6480


-- 
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 #6791: NIFI-6501: Refactor CaptureChangeMySQL to not use an unbounded event queue

2022-12-22 Thread GitBox


exceptionfactory commented on code in PR #6791:
URL: https://github.com/apache/nifi/pull/6791#discussion_r1055922009


##
nifi-nar-bundles/nifi-cdc/nifi-cdc-mysql-bundle/nifi-cdc-mysql-processors/src/main/java/org/apache/nifi/cdc/mysql/processors/CaptureChangeMySQL.java:
##
@@ -433,7 +434,7 @@ public class CaptureChangeMySQL extends 
AbstractSessionFactoryProcessor {
 private BinlogLifecycleListener lifecycleListener;
 private GtidSet gtidSet;
 
-private final LinkedBlockingQueue queue = new 
LinkedBlockingQueue<>();
+private final BlockingQueue queue = new 
LinkedBlockingQueue<>(100);

Review Comment:
   A large number of events can build up depending on the initial starting 
position in the binary log, or lots of activity. The value of `100` may still 
be best to avoid memory consumption, but I would have to take a closer look at 
the polling behavior to see whether there is value in a larger buffer to handle 
this kind of scenario.



-- 
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 #6803: NIFI-10998: Fix SplitJson to always compile new JsonPath when property changes

2022-12-22 Thread GitBox


exceptionfactory commented on code in PR #6803:
URL: https://github.com/apache/nifi/pull/6803#discussion_r1055920409


##
nifi-nar-bundles/nifi-standard-bundle/nifi-standard-processors/src/test/java/org/apache/nifi/processors/standard/TestSplitJson.java:
##
@@ -112,6 +112,43 @@ public void testSplit_arrayResult_multipleValues() throws 
Exception {
 originalOut.assertContentEquals(JSON_SNIPPET);
 }
 
+@Test
+public void testSplit_change_jsonpath() throws Exception {
+final TestRunner testRunner = TestRunners.newTestRunner(new 
SplitJson());
+testRunner.setProperty(SplitJson.ARRAY_JSON_PATH_EXPRESSION, 
"$[0].range");
+
+testRunner.enqueue(JSON_SNIPPET);
+testRunner.run();
+
+int numSplitsExpected = 10;
+
+testRunner.assertTransferCount(SplitJson.REL_ORIGINAL, 1);
+
testRunner.getFlowFilesForRelationship(SplitJson.REL_ORIGINAL).get(0).assertAttributeEquals(FRAGMENT_COUNT.key(),
 String.valueOf(numSplitsExpected));
+testRunner.assertTransferCount(SplitJson.REL_SPLIT, numSplitsExpected);
+final MockFlowFile originalOut = 
testRunner.getFlowFilesForRelationship(SplitJson.REL_ORIGINAL).get(0);
+originalOut.assertContentEquals(JSON_SNIPPET);
+
+// Change JsonPath Expression, verify it is being applied correctly
+testRunner.clearTransferState();
+testRunner.setProperty(SplitJson.ARRAY_JSON_PATH_EXPRESSION, 
"$[*].name");
+
+testRunner.enqueue(JSON_SNIPPET, new HashMap<>() {
+{
+put(CoreAttributes.FILENAME.key(), "test.json");
+}
+});

Review Comment:
   This can be simplified using `Collections.singletonMap`
   ```suggestion
   testRunner.enqueue(JSON_SNIPPET, 
Collections.singletonMap(CoreAttributes.FILENAME.key(), "test.json"));
   ```



-- 
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] mattyb149 commented on a diff in pull request #6791: NIFI-6501: Refactor CaptureChangeMySQL to not use an unbounded event queue

2022-12-22 Thread GitBox


mattyb149 commented on code in PR #6791:
URL: https://github.com/apache/nifi/pull/6791#discussion_r1055910980


##
nifi-nar-bundles/nifi-cdc/nifi-cdc-mysql-bundle/nifi-cdc-mysql-processors/src/main/java/org/apache/nifi/cdc/mysql/processors/CaptureChangeMySQL.java:
##
@@ -433,7 +434,7 @@ public class CaptureChangeMySQL extends 
AbstractSessionFactoryProcessor {
 private BinlogLifecycleListener lifecycleListener;
 private GtidSet gtidSet;
 
-private final LinkedBlockingQueue queue = new 
LinkedBlockingQueue<>();
+private final BlockingQueue queue = new 
LinkedBlockingQueue<>(100);

Review Comment:
   Since we're blocking waiting on the event to be added to the queue, 
@markap14 suggested we wouldn't need a very large buffer at all. I'm thinking 
maybe a larger buffer size would be for times when the processor is scheduled 
for a longer period than it should be? I welcome your and Mark's comments here, 
just went with his suggestion :)



-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: issues-unsubscr...@nifi.apache.org

For queries about this service, please contact Infrastructure at:
us...@infra.apache.org



[GitHub] [nifi] mattyb149 commented on pull request #6480: NIFI-10585: Add GenerateFakeRecord processor

2022-12-22 Thread GitBox


mattyb149 commented on PR #6480:
URL: https://github.com/apache/nifi/pull/6480#issuecomment-1363411973

   Ah looks like I missed the property name update and your other changes look 
good too. thanks much!


-- 
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] ChrisSamo632 commented on pull request #6687: NIFI-10844 allow _source only output for GetElasticsearch and JsonQueryElasticsearch processors

2022-12-22 Thread GitBox


ChrisSamo632 commented on PR #6687:
URL: https://github.com/apache/nifi/pull/6687#issuecomment-1363395679

   @exceptionfactory refactored to use `DescribedValue` enums for the new and 
other existing properties in these processors - led to me uncovering the fact 
that I'd mistakenly not added the new result formatting properties to the 
Paginated processors, which has now been corrected


-- 
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] ChrisSamo632 commented on a diff in pull request #6687: NIFI-10844 allow _source only output for GetElasticsearch and JsonQueryElasticsearch processors

2022-12-22 Thread GitBox


ChrisSamo632 commented on code in PR #6687:
URL: https://github.com/apache/nifi/pull/6687#discussion_r1055894635


##
nifi-nar-bundles/nifi-elasticsearch-bundle/nifi-elasticsearch-client-service/src/test/java/org/apache/nifi/elasticsearch/integration/ElasticSearchClientService_IT.java:
##
@@ -205,19 +206,29 @@ void testVerifyFailedApiKeyAuth() {
 
 @Test
 void testBasicSearch() throws Exception {
+assertBasicSearch(null);
+}
+
+@Test
+void testBasicSearchRequestParameters() throws Exception {
+assertBasicSearch(createParameters("preference", "_local"));
+}
+
+private void assertBasicSearch(final Map 
requestParameters) throws JsonProcessingException {
 final Map temp = new MapBuilder()
-.of("size", 10, "query", new MapBuilder().of("match_all", new 
HashMap<>()).build(),
-"aggs", new MapBuilder()
-.of("term_counts", new MapBuilder()
-.of("terms", new MapBuilder()
-.of("field", "msg", "size", 5)
-.build())
-.build())
-.build())
+.of("size", 10, "query", new MapBuilder().of("match_all", new 
HashMap<>()).build(),

Review Comment:
   I don't think this is required, the use of `HashMap` here (and throughout 
all uses of the `MapBuilder` class in the tests) has been to create an empty 
Map (i.e. JSON Object) for the `match_all` part of the Elasticsearch Query DSL 
request body
   
   I have, however, changed the `MapBuilder` to use a `LinkedHashMap` 
internally instead of a `HashMap`, which might be relevant for keeping things 
in order (although that shouldn't matter for the submission to Elasticsearch)



-- 
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] mattyb149 opened a new pull request, #6803: NIFI-10998: Fix SplitJson to always compile new JsonPath when property changes

2022-12-22 Thread GitBox


mattyb149 opened a new pull request, #6803:
URL: https://github.com/apache/nifi/pull/6803

   # Summary
   
   [NIFI-10998](https://issues.apache.org/jira/browse/NIFI-10998) This PR 
removes the check for `oldValue == null` before compiling and caching the new 
JsonPath value
   
   # 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
   
   - [ ] Build completed using `mvn clean install -P contrib-check`
 - [ ] JDK 8
 - [x] 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



<    1   2   3   4   5   6   7   8   9   10   >