nifi git commit: NIFI-5875 Improve docs around the PriorityAttributePrioritizer
Repository: nifi Updated Branches: refs/heads/master 1ac5b9314 -> 1a937b651 NIFI-5875 Improve docs around the PriorityAttributePrioritizer Clear up the documentation around the PriorityAttributePrioritizer to make it clearer that if the attributes are both number the largest wins but if they are not numbers they sort the other way around. I had to go and look at the code to work out what was going on after reading the existing documentation. Simplify PriorityAttributePrioritzer docs Simplify the main section of documentation for PriorityAttributePrioritzer and then add a notes section with more details about the ordering. Fix example. Put back comment setting the priority attribute Further improvements to the Priority ordering This closes #3205. Signed-off-by: Koji Kawamura Project: http://git-wip-us.apache.org/repos/asf/nifi/repo Commit: http://git-wip-us.apache.org/repos/asf/nifi/commit/1a937b65 Tree: http://git-wip-us.apache.org/repos/asf/nifi/tree/1a937b65 Diff: http://git-wip-us.apache.org/repos/asf/nifi/diff/1a937b65 Branch: refs/heads/master Commit: 1a937b6573d77255984f9856bbc63f2c22f0 Parents: 1ac5b93 Author: Wil Selwood Authored: Thu Dec 6 10:17:19 2018 + Committer: Koji Kawamura Committed: Tue Dec 11 10:43:25 2018 +0900 -- nifi-docs/src/main/asciidoc/user-guide.adoc | 6 +- 1 file changed, 5 insertions(+), 1 deletion(-) -- http://git-wip-us.apache.org/repos/asf/nifi/blob/1a937b65/nifi-docs/src/main/asciidoc/user-guide.adoc -- diff --git a/nifi-docs/src/main/asciidoc/user-guide.adoc b/nifi-docs/src/main/asciidoc/user-guide.adoc index 873b949..ba62327 100644 --- a/nifi-docs/src/main/asciidoc/user-guide.adoc +++ b/nifi-docs/src/main/asciidoc/user-guide.adoc @@ -1091,7 +1091,11 @@ The following prioritizers are available: - *FirstInFirstOutPrioritizer*: Given two FlowFiles, the one that reached the connection first will be processed first. - *NewestFlowFileFirstPrioritizer*: Given two FlowFiles, the one that is newest in the dataflow will be processed first. - *OldestFlowFileFirstPrioritizer*: Given two FlowFiles, the one that is oldest in the dataflow will be processed first. 'This is the default scheme that is used if no prioritizers are selected'. -- *PriorityAttributePrioritizer*: Given two FlowFiles that both have a "priority" attribute, the one that has the highest priority value will be processed first. Note that an UpdateAttribute processor should be used to add the "priority" attribute to the FlowFiles before they reach a connection that has this prioritizer set. Values for the "priority" attribute may be alphanumeric, where "a" is a higher priority than "z", and "1" is a higher priority than "9", for example. +- *PriorityAttributePrioritizer*: Given two FlowFiles, an attribute called âpriorityâ will be extracted. The one that has the lowest priority value will be processed first. +** Note that an UpdateAttribute processor should be used to add the "priority" attribute to the FlowFiles before they reach a connection that has this prioritizer set. +** If only one has that attribute it will go first. +** Values for the "priority" attribute can be alphanumeric, where "a" will come before "z" and "1" before "9" +** If "priority" attribute cannot be parsed as a long, unicode string ordering will be used. For example: "99" and "100" will be ordered so the flowfile with "99" comes first, but "A-99" and "A-100" will sort so the flowfile with "A-100" comes first. NOTE: With a <> configured, the connection has a queue per node in addition to the local queue. The prioritizer will sort the data in each queue independently.
[jira] [Created] (MINIFI-487) Support change ingestors
Aldrin Piri created MINIFI-487: -- Summary: Support change ingestors Key: MINIFI-487 URL: https://issues.apache.org/jira/browse/MINIFI-487 Project: Apache NiFi MiNiFi Issue Type: Sub-task Reporter: Aldrin Piri -- This message was sent by Atlassian JIRA (v7.6.3#76005)
[jira] [Created] (MINIFI-488) Allow flow construction from YAML config
Aldrin Piri created MINIFI-488: -- Summary: Allow flow construction from YAML config Key: MINIFI-488 URL: https://issues.apache.org/jira/browse/MINIFI-488 Project: Apache NiFi MiNiFi Issue Type: Sub-task Reporter: Aldrin Piri -- This message was sent by Atlassian JIRA (v7.6.3#76005)
[jira] [Created] (MINIFI-489) Migrate documentation
Aldrin Piri created MINIFI-489: -- Summary: Migrate documentation Key: MINIFI-489 URL: https://issues.apache.org/jira/browse/MINIFI-489 Project: Apache NiFi MiNiFi Issue Type: Sub-task Reporter: Aldrin Piri -- This message was sent by Atlassian JIRA (v7.6.3#76005)
[jira] [Commented] (MINIFI-484) Fix new lines formatting of system admin guide
[ https://issues.apache.org/jira/browse/MINIFI-484?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=16715062#comment-16715062 ] ASF GitHub Bot commented on MINIFI-484: --- Github user asfgit closed the pull request at: https://github.com/apache/nifi-minifi/pull/149 > Fix new lines formatting of system admin guide > -- > > Key: MINIFI-484 > URL: https://issues.apache.org/jira/browse/MINIFI-484 > Project: Apache NiFi MiNiFi > Issue Type: Improvement > Components: Documentation >Affects Versions: 0.6.0 >Reporter: Jeff Zemerick >Assignee: Jeff Zemerick >Priority: Trivial > Fix For: 0.6.0 > > > Fix new lines formatting of system admin guide. -- This message was sent by Atlassian JIRA (v7.6.3#76005)
[jira] [Resolved] (MINIFI-484) Fix new lines formatting of system admin guide
[ https://issues.apache.org/jira/browse/MINIFI-484?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ] Aldrin Piri resolved MINIFI-484. Resolution: Fixed > Fix new lines formatting of system admin guide > -- > > Key: MINIFI-484 > URL: https://issues.apache.org/jira/browse/MINIFI-484 > Project: Apache NiFi MiNiFi > Issue Type: Improvement > Components: Documentation >Affects Versions: 0.6.0 >Reporter: Jeff Zemerick >Assignee: Jeff Zemerick >Priority: Trivial > Fix For: 0.6.0 > > > Fix new lines formatting of system admin guide. -- This message was sent by Atlassian JIRA (v7.6.3#76005)
nifi-minifi git commit: MINIFI-484: Fixing line breaks in system admin guide.
Repository: nifi-minifi Updated Branches: refs/heads/master 0181629ff -> 65cd7c590 MINIFI-484: Fixing line breaks in system admin guide. This closes #149. Signed-off-by: Aldrin Piri Project: http://git-wip-us.apache.org/repos/asf/nifi-minifi/repo Commit: http://git-wip-us.apache.org/repos/asf/nifi-minifi/commit/65cd7c59 Tree: http://git-wip-us.apache.org/repos/asf/nifi-minifi/tree/65cd7c59 Diff: http://git-wip-us.apache.org/repos/asf/nifi-minifi/diff/65cd7c59 Branch: refs/heads/master Commit: 65cd7c590363cc52b6c5f4a1cf531f2eb708dd8b Parents: 0181629 Author: jzonthemtn Authored: Fri Dec 7 11:59:57 2018 -0500 Committer: Aldrin Piri Committed: Mon Dec 10 11:47:11 2018 -0500 -- .../src/main/markdown/System_Admin_Guide.md | 37 +--- 1 file changed, 9 insertions(+), 28 deletions(-) -- http://git-wip-us.apache.org/repos/asf/nifi-minifi/blob/65cd7c59/minifi-docs/src/main/markdown/System_Admin_Guide.md -- diff --git a/minifi-docs/src/main/markdown/System_Admin_Guide.md b/minifi-docs/src/main/markdown/System_Admin_Guide.md index ef9baea..0e8b482 100644 --- a/minifi-docs/src/main/markdown/System_Admin_Guide.md +++ b/minifi-docs/src/main/markdown/System_Admin_Guide.md @@ -342,15 +342,11 @@ Bootstrap Config File: /Users/user/projects/nifi-minifi/minifi-assembly/target/m # Config File -The *config.yml* in the `conf` directory is the main configuration file for controlling how MiNiFi runs. This section provides an overview of the properties in this file. The file is a YAML -and follows the YAML format laid out [here](http://www.yaml.org/). +The *config.yml* in the `conf` directory is the main configuration file for controlling how MiNiFi runs. This section provides an overview of the properties in this file. The file is a YAML file and follows the YAML format laid out [here](http://www.yaml.org/). -Alternatively, the MiNiFi Toolkit Converter can aid in creating a *config.yml* from a generated template exported from a NiFi instance. This -tool can be downloaded from https://nifi.apache.org/minifi/download.html under the "MiNiFi Toolkit Binaries" section. Information on the toolkit's usage is -available at https://nifi.apache.org/minifi/minifi-toolkit.html. +Alternatively, the MiNiFi Toolkit Converter can aid in creating a *config.yml* from a generated template exported from a NiFi instance. This tool can be downloaded from https://nifi.apache.org/minifi/download.html under the "MiNiFi Toolkit Binaries" section. Information on the toolkit's usage is available at https://nifi.apache.org/minifi/minifi-toolkit.html. -**Note:** Values for periods of time and data sizes must include the unit of measure, -for example "10 sec" or "10 MB", not simply "10". +**Note:** Values for periods of time and data sizes must include the unit of measure, for example "10 sec" or "10 MB", not simply "10". ## Versioning @@ -396,9 +392,7 @@ The "Core Properties" section applies to the core framework as a whole. ## FlowFile Repository -The FlowFile repository keeps track of the attributes and current state of each FlowFile in the system. By default, -this repository is installed in the same root installation directory as all the other repositories; however, it is advisable -to configure it on a separate drive if available. +The FlowFile repository keeps track of the attributes and current state of each FlowFile in the system. By default, this repository is installed in the same root installation directory as all the other repositories; however, it is advisable to configure it on a separate drive if available. *Property* | *Description* - | @@ -410,10 +404,7 @@ to configure it on a separate drive if available. A part of the "FlowFile Repository" section there is a "Swap" subsection. -NiFi keeps FlowFile information in memory (the JVM) -but during surges of incoming data, the FlowFile information can start to take up so much of the JVM that system performance -suffers. To counteract this effect, NiFi "swaps" the FlowFile information to disk temporarily until more JVM space becomes -available again. The "Swap" subsection of properties govern how that process occurs. +NiFi keeps FlowFile information in memory (the JVM) but during surges of incoming data, the FlowFile information can start to take up so much of the JVM that system performance suffers. To counteract this effect, NiFi "swaps" the FlowFile information to disk temporarily until more JVM space becomes available again. The "Swap" subsection of properties govern how that process occurs. *Property*| *Description* --- | @@ -425,11 +416,7 @@ available again. The "Swap" subsection of properties govern how that process occ #
[2/2] nifi git commit: NIFI-5859: Added XML-based documentation writer that can be used to document a component. - Found several instances of nifi-framework-api's ProviderException being thrown from p
NIFI-5859: Added XML-based documentation writer that can be used to document a component. - Found several instances of nifi-framework-api's ProviderException being thrown from processors. Changed those to IllegalStateException, as ProviderException is not an appropriate Exception in those cases, and extensions should not depend on nifi-framework-api. - Performed some cleanup, moving Property Descriptors from Controller Service API's/specs into the implementations. Adding to the Service API results in bringing in nifi-utils to the nifi-standard-services-api-nar, which is a bad practice. The 'main' service api nar should not have a dependency on a util class. NIFI-5859: Added javadocs. Fixed pom.xml that was left pointing to snapshot version of nar maven plugin NIFI-5859: Addressing review feedback: adding component type, multiple additional details into separate file(s) This closes #3192. Signed-off-by: Bryan Bende Project: http://git-wip-us.apache.org/repos/asf/nifi/repo Commit: http://git-wip-us.apache.org/repos/asf/nifi/commit/1ac5b931 Tree: http://git-wip-us.apache.org/repos/asf/nifi/tree/1ac5b931 Diff: http://git-wip-us.apache.org/repos/asf/nifi/diff/1ac5b931 Branch: refs/heads/master Commit: 1ac5b93144ebd92c907fb49664a524e196ae20c6 Parents: 4e7a856 Author: Mark Payne Authored: Thu Nov 15 12:07:08 2018 -0500 Committer: Bryan Bende Committed: Mon Dec 10 11:16:01 2018 -0500 -- .../AbstractDocumentationWriter.java| 285 + .../ExtensionDocumentationWriter.java | 42 ++ .../nifi/documentation/ExtensionType.java | 25 ++ .../nifi/documentation/ProvidedServiceAPI.java | 51 +++ .../StandardProvidedServiceAPI.java | 51 +++ ...nControllerServiceInitializationContext.java | 66 +++ ...mentationProcessorInitializationContext.java | 65 +++ ...mentationReportingInitializationContext.java | 89 .../init/EmptyControllerServiceLookup.java | 54 +++ .../documentation/init/NopComponentLog.java | 172 .../documentation/init/NopStateManager.java | 43 ++ .../init/StandaloneNodeTypeProvider.java| 31 ++ .../xml/XmlDocumentationWriter.java | 407 +++ .../amqp/processors/AbstractAMQPProcessor.java | 25 +- .../processors/AbstractAMQPProcessorTest.java | 12 +- .../nifi-druid-controller-service-api/pom.xml | 1 - .../pom.xml | 1 - .../nifi-elasticsearch-client-service/pom.xml | 1 - .../apache/nifi/documentation/DocGenerator.java | 2 +- .../html/HtmlDocumentationWriterTest.java | 2 +- .../html/ProcessorDocumentationWriterTest.java | 12 +- .../org/apache/nifi/web/server/JettyServer.java | 5 +- .../nifi-groovyx-processors/pom.xml | 1 - .../mongodb/AbstractMongoProcessor.java | 3 +- .../mongodb/AbstractMongoProcessorTest.java | 20 +- .../nifi/mongodb/MongoDBControllerService.java | 3 +- .../nifi-hbase-client-service-api/pom.xml | 5 - .../apache/nifi/hbase/HBaseClientService.java | 50 --- .../hbase/validate/ConfigFilesValidator.java| 38 -- .../nifi/hbase/HBase_1_1_2_ClientService.java | 47 +++ .../hbase/validate/ConfigFilesValidator.java| 38 ++ .../nifi-standard-services-api-nar/pom.xml | 6 + pom.xml | 74 ++-- 33 files changed, 1548 insertions(+), 179 deletions(-) -- http://git-wip-us.apache.org/repos/asf/nifi/blob/1ac5b931/nifi-api/src/main/java/org/apache/nifi/documentation/AbstractDocumentationWriter.java -- diff --git a/nifi-api/src/main/java/org/apache/nifi/documentation/AbstractDocumentationWriter.java b/nifi-api/src/main/java/org/apache/nifi/documentation/AbstractDocumentationWriter.java new file mode 100644 index 000..c6e793b --- /dev/null +++ b/nifi-api/src/main/java/org/apache/nifi/documentation/AbstractDocumentationWriter.java @@ -0,0 +1,285 @@ +/* + * 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.documenta
[1/2] nifi git commit: NIFI-5859: Added XML-based documentation writer that can be used to document a component. - Found several instances of nifi-framework-api's ProviderException being thrown from p
Repository: nifi Updated Branches: refs/heads/master 4e7a856f7 -> 1ac5b9314 http://git-wip-us.apache.org/repos/asf/nifi/blob/1ac5b931/nifi-nar-bundles/nifi-standard-services/nifi-hbase-client-service-api/src/main/java/org/apache/nifi/hbase/HBaseClientService.java -- diff --git a/nifi-nar-bundles/nifi-standard-services/nifi-hbase-client-service-api/src/main/java/org/apache/nifi/hbase/HBaseClientService.java b/nifi-nar-bundles/nifi-standard-services/nifi-hbase-client-service-api/src/main/java/org/apache/nifi/hbase/HBaseClientService.java index e5455fd..fdcf285 100644 --- a/nifi-nar-bundles/nifi-standard-services/nifi-hbase-client-service-api/src/main/java/org/apache/nifi/hbase/HBaseClientService.java +++ b/nifi-nar-bundles/nifi-standard-services/nifi-hbase-client-service-api/src/main/java/org/apache/nifi/hbase/HBaseClientService.java @@ -18,15 +18,11 @@ package org.apache.nifi.hbase; import org.apache.nifi.annotation.documentation.CapabilityDescription; import org.apache.nifi.annotation.documentation.Tags; -import org.apache.nifi.components.PropertyDescriptor; import org.apache.nifi.controller.ControllerService; -import org.apache.nifi.expression.ExpressionLanguageScope; import org.apache.nifi.hbase.put.PutColumn; import org.apache.nifi.hbase.put.PutFlowFile; import org.apache.nifi.hbase.scan.Column; import org.apache.nifi.hbase.scan.ResultHandler; -import org.apache.nifi.hbase.validate.ConfigFilesValidator; -import org.apache.nifi.processor.util.StandardValidators; import java.io.IOException; import java.util.Collection; @@ -36,52 +32,6 @@ import java.util.List; @CapabilityDescription("A controller service for accessing an HBase client.") public interface HBaseClientService extends ControllerService { -PropertyDescriptor HADOOP_CONF_FILES = new PropertyDescriptor.Builder() -.name("Hadoop Configuration Files") -.description("Comma-separated list of Hadoop Configuration files," + - " such as hbase-site.xml and core-site.xml for kerberos, " + - "including full paths to the files.") -.addValidator(new ConfigFilesValidator()) - .expressionLanguageSupported(ExpressionLanguageScope.VARIABLE_REGISTRY) -.build(); - -PropertyDescriptor ZOOKEEPER_QUORUM = new PropertyDescriptor.Builder() -.name("ZooKeeper Quorum") -.description("Comma-separated list of ZooKeeper hosts for HBase. Required if Hadoop Configuration Files are not provided.") -.addValidator(StandardValidators.NON_EMPTY_VALIDATOR) - .expressionLanguageSupported(ExpressionLanguageScope.VARIABLE_REGISTRY) -.build(); - -PropertyDescriptor ZOOKEEPER_CLIENT_PORT = new PropertyDescriptor.Builder() -.name("ZooKeeper Client Port") -.description("The port on which ZooKeeper is accepting client connections. Required if Hadoop Configuration Files are not provided.") -.addValidator(StandardValidators.PORT_VALIDATOR) - .expressionLanguageSupported(ExpressionLanguageScope.VARIABLE_REGISTRY) -.build(); - -PropertyDescriptor ZOOKEEPER_ZNODE_PARENT = new PropertyDescriptor.Builder() -.name("ZooKeeper ZNode Parent") -.description("The ZooKeeper ZNode Parent value for HBase (example: /hbase). Required if Hadoop Configuration Files are not provided.") -.addValidator(StandardValidators.NON_EMPTY_VALIDATOR) - .expressionLanguageSupported(ExpressionLanguageScope.VARIABLE_REGISTRY) -.build(); - -PropertyDescriptor HBASE_CLIENT_RETRIES = new PropertyDescriptor.Builder() -.name("HBase Client Retries") -.description("The number of times the HBase client will retry connecting. Required if Hadoop Configuration Files are not provided.") -.addValidator(StandardValidators.POSITIVE_INTEGER_VALIDATOR) -.defaultValue("1") - .expressionLanguageSupported(ExpressionLanguageScope.VARIABLE_REGISTRY) -.build(); - -PropertyDescriptor PHOENIX_CLIENT_JAR_LOCATION = new PropertyDescriptor.Builder() -.name("Phoenix Client JAR Location") -.description("The full path to the Phoenix client JAR. Required if Phoenix is installed on top of HBase.") -.addValidator(StandardValidators.FILE_EXISTS_VALIDATOR) - .expressionLanguageSupported(ExpressionLanguageScope.VARIABLE_REGISTRY) -.dynamicallyModifiesClasspath(true) -.build(); - /** * Puts a batch of mutations to the given table. * http://git-wip-us.apache.org/repos/asf/nifi/blob/1ac5b931/nifi-nar-bundles/nifi-standard-services/nifi-hbase-client-service-api/src/main/java/org/apache/nifi/hbase/validate/ConfigFilesValidator.java -- diff --git a/nifi-nar
nifi-minifi-cpp git commit: MINIFICPP-691: Add method for getting processor description. Internal API change, but is strictly voluntary for contributors
Repository: nifi-minifi-cpp Updated Branches: refs/heads/master 627d8fe2c -> 524118e13 MINIFICPP-691: Add method for getting processor description. Internal API change, but is strictly voluntary for contributors This closes #457. Signed-off-by: Aldrin Piri Project: http://git-wip-us.apache.org/repos/asf/nifi-minifi-cpp/repo Commit: http://git-wip-us.apache.org/repos/asf/nifi-minifi-cpp/commit/524118e1 Tree: http://git-wip-us.apache.org/repos/asf/nifi-minifi-cpp/tree/524118e1 Diff: http://git-wip-us.apache.org/repos/asf/nifi-minifi-cpp/diff/524118e1 Branch: refs/heads/master Commit: 524118e137f50957ad0b38ee8c38faba76d98825 Parents: 627d8fe Author: Marc Parisi Authored: Thu Dec 6 07:25:37 2018 -0500 Committer: Aldrin Piri Committed: Mon Dec 10 10:53:10 2018 -0500 -- CMakeLists.txt | 3 +- PROCESSORS.md | 1 + extensions/bustache/ApplyTemplate.cpp | 2 +- extensions/bustache/ApplyTemplate.h | 3 +- extensions/bustache/CMakeLists.txt | 2 +- extensions/civetweb/processors/ListenHTTP.h | 7 +- extensions/gps/CMakeLists.txt | 2 +- extensions/gps/GetGPS.h | 3 + extensions/http-curl/processors/InvokeHTTP.h| 4 +- extensions/http-curl/protocols/AgentPrinter.h | 2 +- extensions/http-curl/protocols/RESTReceiver.h | 2 +- extensions/http-curl/protocols/RESTSender.h | 2 +- .../tests/ControllerServiceIntegrationTests.cpp | 4 +- extensions/libarchive/BinFiles.h| 2 +- extensions/libarchive/CompressContent.h | 2 +- extensions/libarchive/FocusArchiveEntry.h | 4 +- extensions/libarchive/ManipulateArchive.h | 2 +- extensions/libarchive/MergeContent.h| 4 +- extensions/libarchive/UnfocusArchiveEntry.h | 2 +- extensions/librdkafka/PublishKafka.h| 4 +- .../mqtt/processors/AbstractMQTTProcessor.h | 1 - extensions/mqtt/processors/ConsumeMQTT.h| 2 +- extensions/mqtt/processors/PublishMQTT.h| 2 +- extensions/mqtt/protocol/MQTTC2Protocol.cpp | 2 +- extensions/pcap/CapturePacket.h | 4 +- extensions/script/ExecuteScript.h | 6 +- extensions/sensors/GetEnvironmentalSensors.h| 2 +- extensions/sensors/GetMovementSensors.h | 2 +- extensions/sqlite/ExecuteSQL.h | 5 +- extensions/sqlite/PutSQL.h | 5 +- extensions/tensorflow/TFApplyGraph.h| 4 +- extensions/tensorflow/TFConvertImageToTensor.h | 2 +- extensions/tensorflow/TFExtractTopLabels.h | 2 +- extensions/usb-camera/GetUSBCamera.h| 2 +- extensions/windows-event-log/TailEventLog.h | 2 +- libminifi/include/agent/agent_docs.h| 108 ++- libminifi/include/c2/ControllerSocketProtocol.h | 2 +- .../include/c2/triggers/FileUpdateTrigger.h | 2 +- .../controllers/LinuxPowerManagementService.h | 2 +- .../controllers/NetworkPrioritizerService.h | 2 +- .../include/controllers/SSLContextService.h | 2 +- .../controllers/UpdatePolicyControllerService.h | 3 +- libminifi/include/core/Core.h | 2 + libminifi/include/core/Resource.h | 10 +- .../include/core/state/nodes/AgentInformation.h | 6 +- .../include/core/state/nodes/BuildInformation.h | 2 +- .../core/state/nodes/DeviceInformation.h| 2 +- .../include/core/state/nodes/FlowInformation.h | 2 +- .../include/core/state/nodes/ProcessMetrics.h | 2 +- .../include/core/state/nodes/SystemMetrics.h| 2 +- libminifi/include/processors/AppendHostInfo.h | 2 +- libminifi/include/processors/ExecuteProcess.h | 13 ++- libminifi/include/processors/ExtractText.h | 2 +- libminifi/include/processors/GenerateFlowFile.h | 2 +- libminifi/include/processors/GetFile.h | 2 +- libminifi/include/processors/GetTCP.h | 2 +- libminifi/include/processors/HashContent.h | 2 +- libminifi/include/processors/ListenSyslog.h | 7 +- libminifi/include/processors/LogAttribute.h | 2 +- libminifi/include/processors/PutFile.h | 2 +- libminifi/include/processors/RouteOnAttribute.h | 2 +- libminifi/include/processors/TailFile.h | 7 +- libminifi/include/processors/UpdateAttribute.h | 3 +- libminifi/test/unit/ProcessorTests.cpp | 2 +- main/Main.h | 3 +- nanofi/include/cxx/CallbackProcessor.h | 2 +- 66 files changed, 182 insertions(+), 122 deletions(-) -- http://git-wip-us.apache.org/repos/asf/nifi-minifi-cpp/blob/524118e1/CMakeLists.txt -- diff --git a/CMak
nifi git commit: NIFI-5885 ArrayOutOfBoundsException at EL 'or' and 'and' functions
Repository: nifi Updated Branches: refs/heads/master a6f91a197 -> 4e7a856f7 NIFI-5885 ArrayOutOfBoundsException at EL 'or' and 'and' functions EL 'or' and 'and' functions can be called multiple times within the same context using the same evaluator instance. That happens if their subject is derived from an IteratingEvaluator such as 'anyDelineatedValues'. And if the right hand side expression for such 'or' and 'and' contains another IteratingEvaluator, then it can be evaluated more than the number of its candidates, ultimately an ArrayOutOfBoundsException is thrown. This commit makes Or/AndEvaluator caching its right hand side result to prevent that happens. For 'or' and 'and' functions, the right hand side expression is independant from their subject boolean value. It's enough evaluating right hand side once, because it returns the same result even with different subjects. Signed-off-by: Pierre Villard This closes #3212. Project: http://git-wip-us.apache.org/repos/asf/nifi/repo Commit: http://git-wip-us.apache.org/repos/asf/nifi/commit/4e7a856f Tree: http://git-wip-us.apache.org/repos/asf/nifi/tree/4e7a856f Diff: http://git-wip-us.apache.org/repos/asf/nifi/diff/4e7a856f Branch: refs/heads/master Commit: 4e7a856f77fb8b7fbe1067ce667d8dff93dbd271 Parents: a6f91a1 Author: Koji Kawamura Authored: Mon Dec 10 14:31:16 2018 +0900 Committer: Pierre Villard Committed: Mon Dec 10 11:47:58 2018 +0100 -- .../evaluation/functions/AndEvaluator.java | 12 ++- .../evaluation/functions/OrEvaluator.java | 14 ++-- .../expression/language/TestQuery.java | 36 3 files changed, 59 insertions(+), 3 deletions(-) -- http://git-wip-us.apache.org/repos/asf/nifi/blob/4e7a856f/nifi-commons/nifi-expression-language/src/main/java/org/apache/nifi/attribute/expression/language/evaluation/functions/AndEvaluator.java -- diff --git a/nifi-commons/nifi-expression-language/src/main/java/org/apache/nifi/attribute/expression/language/evaluation/functions/AndEvaluator.java b/nifi-commons/nifi-expression-language/src/main/java/org/apache/nifi/attribute/expression/language/evaluation/functions/AndEvaluator.java index 232fc26..adc41da 100644 --- a/nifi-commons/nifi-expression-language/src/main/java/org/apache/nifi/attribute/expression/language/evaluation/functions/AndEvaluator.java +++ b/nifi-commons/nifi-expression-language/src/main/java/org/apache/nifi/attribute/expression/language/evaluation/functions/AndEvaluator.java @@ -27,6 +27,7 @@ public class AndEvaluator extends BooleanEvaluator { private final Evaluator subjectEvaluator; private final Evaluator rhsEvaluator; +private BooleanQueryResult rhsResult; public AndEvaluator(final Evaluator subjectEvaluator, final Evaluator rhsEvaluator) { this.subjectEvaluator = subjectEvaluator; @@ -44,9 +45,18 @@ public class AndEvaluator extends BooleanEvaluator { return new BooleanQueryResult(false); } +// Returning previously evaluated result. +// The same AndEvaluator can be evaluated multiple times if subjectEvaluator is IteratingEvaluator. +// In that case, it's enough to evaluate the right hand side. +if (rhsResult != null) { +return rhsResult; +} + final QueryResult rhsValue = rhsEvaluator.evaluate(attributes); if (rhsValue == null) { -return new BooleanQueryResult(false); +rhsResult = new BooleanQueryResult(false); +} else { +rhsResult = new BooleanQueryResult(rhsValue.getValue()); } return new BooleanQueryResult(rhsValue.getValue()); http://git-wip-us.apache.org/repos/asf/nifi/blob/4e7a856f/nifi-commons/nifi-expression-language/src/main/java/org/apache/nifi/attribute/expression/language/evaluation/functions/OrEvaluator.java -- diff --git a/nifi-commons/nifi-expression-language/src/main/java/org/apache/nifi/attribute/expression/language/evaluation/functions/OrEvaluator.java b/nifi-commons/nifi-expression-language/src/main/java/org/apache/nifi/attribute/expression/language/evaluation/functions/OrEvaluator.java index 719fa11..9c63c27 100644 --- a/nifi-commons/nifi-expression-language/src/main/java/org/apache/nifi/attribute/expression/language/evaluation/functions/OrEvaluator.java +++ b/nifi-commons/nifi-expression-language/src/main/java/org/apache/nifi/attribute/expression/language/evaluation/functions/OrEvaluator.java @@ -27,6 +27,7 @@ public class OrEvaluator extends BooleanEvaluator { private final Evaluator subjectEvaluator; private final Evaluator rhsEvaluator; +private BooleanQueryResult rhsResult; public OrEvaluator(final Evaluator