Skip to content

Commit

Permalink
Squashed commit of the following:
Browse files Browse the repository at this point in the history
commit 7cb39d6
Author: Jeff Storck <jtswork@gmail.com>
Date:   Fri Oct 12 16:57:15 2018 -0400

    NIFI-5696 Update references to default value for nifi.cluster.node.load.load.balance.port

    This closes apache#3071.

    Signed-off-by: Koji Kawamura <ijokarumawak@apache.org>

commit 0229a5c
Author: zenfenan <sivaprasanna246@gmail.com>
Date:   Sun Oct 14 13:18:25 2018 +0530

    NIFI-5698: Fixed DeleteAzureBlobStorage bug

    This closes apache#3073.

    Signed-off-by: Koji Kawamura <ijokarumawak@apache.org>

commit e30a21c
Author: Brad Hards <bradh@frogmouth.net>
Date:   Sat Oct 13 19:25:43 2018 +1100

    [NIFI-5697] Trivial description fix for GenerateFlowFile processor

    This closes apache#3072.

    Signed-off-by: Aldrin Piri <aldrin@apache.org>

commit 270ce85
Author: Mark Payne <markap14@hotmail.com>
Date:   Fri Oct 12 15:27:10 2018 -0400

    NIFI-5695: Fixed bug that caused ports to not properly map to their correct child group on Flow Import if the child group is independently versioned

    This closes apache#3070.

    Signed-off-by: Bryan Bende <bbende@apache.org>

commit 5eb5e96
Author: thenatog <thenatog@gmail.com>
Date:   Mon Oct 8 12:58:20 2018 -0400

    NIFI-5665 - Changed netty versions to more closely match the original netty dependency version.
    NIFI-5665 - Fixed version for nifi-spark-bundle.
    NIFI-5665 - Fixing copy and paste error.

    This closes apache#3067

commit 02e0a16
Author: Bryan Bende <bbende@apache.org>
Date:   Thu Oct 11 15:58:55 2018 -0400

    NIFI-5680 Handling trailing slashes on URLs of registry clients

    This closes apache#3065.

    Signed-off-by: Mark Payne <markap14@hotmail.com>

commit 0f88805
Author: Matt Gilman <matt.c.gilman@gmail.com>
Date:   Fri Oct 12 10:23:47 2018 -0400

    NIFI-5691:
    - Overriding the version of jackson in aws java sdk.

    This closes apache#3066.

    Signed-off-by: Aldrin Piri <aldrin@apache.org>

commit e25b26e
Author: joewitt <joewitt@apache.org>
Date:   Fri Oct 12 11:27:48 2018 -0400

    Revert "NIFI-5448 Added failure relationship to UpdateAttributes to handle bad expression language logic."

    This reverts commit 32ee552.

commit 6b77e7d
Author: joewitt <joewitt@apache.org>
Date:   Fri Oct 12 11:08:22 2018 -0400

    Revert "NIFI-5448 Changed from 'stop' to 'penalize' in allowablevalue field to make the popup more consistent."

    This reverts commit 9d2b698.

commit a6b9364
Author: Carl Gieringer <carl.gieringer@snagajob.com>
Date:   Thu Oct 4 12:50:08 2018 -0400

    NIFI-5664 Support ArrayList in DataTypeUtils#toArray
    NIFI-5664 Generalize to handling List

    This closes apache#3049

    Signed-off-by: Mike Thomsen <mikerthomsen@gmail.com>

commit 5aa4263
Author: Endre Zoltan Kovacs <ekovacs@hortonworks.com>
Date:   Mon Oct 8 13:10:37 2018 +0200

    NIFI-1490: better field naming / displayname and description mix up fix

    This closes apache#2994.

    Signed-off-by: Mark Payne <markap14@hotmail.com>

commit c81a135
Author: Endre Zoltan Kovacs <andrewsmith87@protonmail.com>
Date:   Thu Sep 6 17:33:33 2018 +0200

    NIFI-1490: multipart/form-data support for ListenHTTP processor
    - introducing a in-memory-file-size-threashold, above which the incoming file is written to local disk
    - using java.io.tmpdir for such file writes
    - enhancing documentation

commit 8398ea7
Author: Mark Payne <markap14@hotmail.com>
Date:   Thu Oct 11 14:57:31 2018 -0400

    NIFI-5688: Ensure that when we map our flow to a VersionedProcessGroup that we include the connections' Load Balance Compression flag

    This closes apache#3064

commit 8da403c
Author: Matt Gilman <matt.c.gilman@gmail.com>
Date:   Thu Oct 11 13:21:20 2018 -0400

    NIFI-5661:
    - Allowing load balance settings to be applied during creation.
    - Clearing the load balance settings when the dialog is closed.

commit 79c03ca
Author: Matt Gilman <matt.c.gilman@gmail.com>
Date:   Thu Oct 11 12:23:53 2018 -0400

    NIFI-5661:
    - Allowing the load balance configuration to be shown/edited in both clustered and standalone mode.

commit 64de5c7
Author: thenatog <thenatog@gmail.com>
Date:   Fri Sep 7 12:39:18 2018 -0400

    NIFI-5479 - Supressed the AnnotationParser logs using the logback.xml. Dependency changes can be look at in future.
    NIFI-5479 - Updated comment.

    This closes apache#3034

commit 8a751e8
Author: Koji Kawamura <ijokarumawak@apache.org>
Date:   Fri Sep 14 21:18:04 2018 +0900

    NIFI-5661: Adding Load Balance config UI
    Incorporated review comments.
    Move combo options to a common place.

    This closes apache#3046

commit a6f7222
Author: Koji Kawamura <ijokarumawak@apache.org>
Date:   Fri Sep 28 17:37:34 2018 +0900

    NIFI-5645: Auto reconnect ConsumeWindowsEventLog

    This commit also contains following refactoring:
    - Catch URISyntaxException inside subscribe when constructing provenance
    URI as it does not affect the core responsibility of this processor.
    Even if it fails to be a proper URI, if the query works for consuming
    logs, the processor should proceed forward.

    Upgrade JNA version.

    Do not update lastActivityTimestamp when subscribe failed.

    This closes apache#3037

commit 97afa4e
Author: Mark Payne <markap14@hotmail.com>
Date:   Tue Oct 9 14:54:21 2018 -0400

    NIFI-5585: Addressed bug in calculating swap size of a queue partition when rebalancing

    This closes apache#3010.

    Signed-off-by: Mark Payne <markap14@hotmail.com>

commit a1a4c99
Author: Mark Payne <markap14@hotmail.com>
Date:   Mon Oct 8 09:53:14 2018 -0400

    NIFI-5585: Adjustments to the Connection Load Balancing to ensure that node offloading works smoothly

    Signed-off-by: Jeff Storck <jtswork@gmail.com>

commit 01e2098
Author: Jeff Storck <jtswork@gmail.com>
Date:   Tue Sep 25 15:17:19 2018 -0400

    NIFI-5585 A node that was previously offloaded can now be reconnected to the cluster and queue flowfiles again
    Added Spock test for NonLocalPartitionPartitioner
    Updated NOTICE files for FontAwesome with the updated version (4.7.0) and URL to the free license
    Updated package-lock.json with the updated version of FontAwesome (4.7.0)
    Added method to FlowFileQueue interface to reset an offloaded queue
    Queues that are now immediately have the offloaded status reset once offloading finishes
    SocketLoadBalancedFlowFileQueue now ignores back-pressure when offloading flowfiles
    Cleaned up javascript in nf-cluster-table.js when creating markup for the node operation icons
    Fixed incorrect handling of a heartbeat from an offloaded node.  Heartbeats from offloading or offloaded nodes will now be reported as an event, the heartbeat will be removed and ignored.
    Added unit tests and integration tests to cover offloading nodes
    Updated Cluster integration test class with accessor for the current cluster coordinator
    Updated Node integration test class's custom NiFiProperties implementation to return the load balancing port and a method to assert an offloaded node
    Added exclusion to top-level pom for ITSpec.class

commit be2c24c
Author: Mark Payne <markap14@hotmail.com>
Date:   Mon Sep 24 09:17:22 2018 -0400

    NIFI-5585: Fixed bug that arised when multiple nodes were decommissioning at same time; could get into state where the nodes queued up data for one another so the data just stayed put

commit 04d8da8
Author: Jeff Storck <jtswork@gmail.com>
Date:   Tue Sep 18 17:09:13 2018 -0400

    NIFI-5585 Added capability to offload a node that is disconnected from the cluster.
    Updated NodeClusterCoordinator to allow idempotent requests to offload a cluster
    Added capability to connect/delete/disconnect/offload a node from the cluster to the Toolkit CLI
    Added capability to get the status of nodes from the cluster to the Toolkit CLI
    Upgraded FontAwesome to 4.7.0 (from 4.6.1)
    Added icon "fa-upload" for offloading nodes in the cluster table UI

commit 83ca676
Author: Kotaro Terada <koterada@yahoo-corp.jp>
Date:   Tue Oct 9 18:31:41 2018 +0900

    NIFI-5681: Fix a locale-dependent test in TestVersionedFlowSnapshotMetadataResult

    Signed-off-by: Pierre Villard <pierre.villard.fr@gmail.com>

    This closes apache#3061.

commit 6c17685
Author: Kotaro Terada <koterada@yahoo-corp.jp>
Date:   Fri Oct 5 16:43:44 2018 +0900

    NIFI-5675: Fix some locale-dependent tests in ConvertExcelToCSVProcessorTest

    Signed-off-by: Pierre Villard <pierre.villard.fr@gmail.com>

    This closes apache#3058.

commit fc5c8ba
Author: Kotaro Terada <koterada@yahoo-corp.jp>
Date:   Tue Oct 9 14:12:53 2018 +0900

    NIFI-5676: Fix a timezone-dependent test in PutORCTest

    Signed-off-by: Pierre Villard <pierre.villard.fr@gmail.com>

    This closes apache#3059.

commit dd50322
Author: Matt Gilman <matt.c.gilman@gmail.com>
Date:   Tue Oct 9 12:49:31 2018 -0400

    NIFI-5600: Recalculating the available columns for the queue listing and component state because they contain conditions which need to be re-evaluated.

    Signed-off-by: Pierre Villard <pierre.villard.fr@gmail.com>

    This closes apache#3055.

commit 9dfc668
Author: Mark Payne <markap14@hotmail.com>
Date:   Tue Oct 9 12:19:24 2018 -0400

    NIFI-5672: Do not compare Load Balancing address/port for logical equivalence of Node Identifiers. Added more details to logging of Node Identifiers

    This closes apache#3054

commit 77edddd
Author: joewitt <joewitt@apache.org>
Date:   Mon Oct 8 13:35:01 2018 -0400

    NIFI-5666 Updated all usages of Spring, beanutils, collections to move beyond deps with cves

    This closes apache#3052

commit 117e60c
Author: Mark Payne <markap14@hotmail.com>
Date:   Tue Oct 9 12:23:44 2018 -0400

    Empty commit to force Github sync

commit c425bd2
Author: Mark Payne <markap14@hotmail.com>
Date:   Fri Aug 17 14:08:14 2018 -0400

    NIFI-5533: Be more efficient with heap utilization
     - Updated FlowFile Repo / Write Ahead Log so that any update that writes more than 1 MB of data is written to a file inside the FlowFile Repo rather than being buffered in memory
     - Update SplitText so that it does not hold FlowFiles that are not the latest version in heap. Doing them from being garbage collected, so while the Process Session is holding the latest version of the FlowFile, SplitText is holding an older version, and this results in two copies of the same FlowFile object

    NIFI-5533: Checkpoint

    NIFI-5533: Bug Fixes

    Signed-off-by: Matthew Burgess <mattyb149@apache.org>

    This closes apache#2974

commit c87d791
Author: Mark Payne <markap14@hotmail.com>
Date:   Fri Oct 5 12:06:39 2018 -0400

    NIFI-5663: Ensure that when sort Node Identifiers that we use both the node's API Address as well as API Port, in case 2 nodes are running on same host. Also ensure that when Local Node ID is determined that we update all Load Balancing Partitions, if necessary

    This closes apache#3048.

    Signed-off-by: Koji Kawamura <ijokarumawak@apache.org>

commit 768bcfb
Author: Pierre Villard <pierre.villard.fr@gmail.com>
Date:   Tue Sep 25 22:53:28 2018 +0200

    NIFI-5635 - Description PutEmail properties with multiple senders/recipients

    This closes apache#3031

    Signed-off-by: Mike Moser <mosermw@apache.org>

commit 246c090
Author: thenatog <thenatog@gmail.com>
Date:   Thu Sep 13 21:45:00 2018 -0400

    NIFI-5595 - Added the CORS filter to the templates/upload endpoint using a URL matcher.
    Explicitly allow methods GET, HEAD. These are the Spring defaults when the allowedMethods is empty but now it is explicit. This will require other methods like POST etc to be from the same origin (for the template/upload URL).

    This closes apache#3024.

    Signed-off-by: Andy LoPresto <alopresto@apache.org>

commit c6572f0
Author: Matthew Burgess <mattyb149@apache.org>
Date:   Fri Aug 10 16:49:25 2018 -0400

    NIFI-4517: Added ExecuteSQLRecord and QueryDatabaseTableRecord processors

    Signed-off-by: Pierre Villard <pierre.villard.fr@gmail.com>

    This closes apache#2945.

commit b4810b8
Author: Mark Payne <markap14@hotmail.com>
Date:   Fri Oct 5 12:08:55 2018 -0400

    Empty commit to force sync with mirrors

commit 619f1ff
Author: Mark Payne <markap14@hotmail.com>
Date:   Thu Jun 14 11:57:21 2018 -0400

    NIFI-5516: Implement Load-Balanced Connections
    Refactoring StandardFlowFileQueue to have an AbstractFlowFileQueue
    Refactored more into AbstractFlowFileQueue
    Added documentation, cleaned up code some
    Refactored FlowFileQueue so that there is SwappablePriorityQueue
    Several unit tests written
    Added REST API Endpoint to allow PUT to update connection to use load balancing or not. When enabling load balancing, though, I saw the queue size go from 9 to 18. Then was only able to process 9 FlowFiles.
    Bug fixes
    Code refactoring
    Added integration tests, bug fixes
    Refactored clients to use NIO
    Bug fixes. Appears to finally be working with NIO Client!!!!!
    NIFI-5516: Refactored some code from NioAsyncLoadBalanceClient to LoadBalanceSession
    Bug fixes and allowed load balancing socket connections to be reused
    Implemented ability to compress Nothing, Attributes, or Content + Attributes when performing load-balancing
    Added flag to ConnectionDTO to indicate Load Balance Status
    Updated Diagnostics DTO for connections
    Store state about cluster topology in NodeClusterCoordinator so that the state is known upon restart
    Code cleanup
    Fixed checkstyle and unit tests
    NIFI-5516: Updating logic for Cluster Node Firewall so that the node's identity comes from its certificate, not from whatever it says it is.
    NIFI-5516: FIxed missing License headers
    NIFI-5516: Some minor code cleanup
    NIFI-5516: Adddressed review feedback; Bug fixes; some code cleanup. Changed dependency on nifi-registry from SNAPSHOT to official 0.3.0 release
    NIFI-5516: Take backpressure configuration into account
    NIFI-5516: Fixed ConnectionDiagnosticsSnapshot to include node identifier
    NIFI-5516: Addressed review feedback

    This closes apache#2947

commit 5872eb3
Author: Mark Payne <markap14@hotmail.com>
Date:   Wed Aug 15 10:23:49 2018 -0400

    NIFI-5331: When checkpointing SequentialAccessWriteAheadLog, if the journal is not healthy, ensure that we roll it over and ensure that if an Exception is thrown when attempting to fsync() or close() the journal, we continue creating a new one.
    This closes apache#2952.
    Signed-off-by: Brandon Devries <devriesb@apache.org>

commit 8f4d13e
Author: Koji Kawamura <ijokarumawak@apache.org>
Date:   Thu Oct 4 13:48:26 2018 +0900

    NIFI-5581: Fix replicate request timeout

    This closes apache#3044

    - Revert 87cf474 to enable connection
    pooling
    - Changes the expected HTTP status code for the 1st request of a
    two-phase commit transaction from 150 (NiFi custom) to 202 Accepted
    - Corrected RevisionManager Javadoc about revision varidation protocol

commit f65286b
Author: Andy LoPresto <alopresto@apache.org>
Date:   Fri Sep 21 19:26:10 2018 -0700

    NIFI-5622 Updated test resource keystores and truststores with SubjectAlternativeNames to be compliant with RFC 6125.
    Refactored some test code to be clearer.
    Renamed some resources to be consistent across modules.
    Changed passwords to meet new minimum length requirements.

    This closes apache#3018

commit 8e233ca
Author: joewitt <joewitt@apache.org>
Date:   Thu Sep 20 23:24:17 2018 -0400

    NIFI-4806 updated tika and a ton of other deps as found by dependency versions plugin

    This closes apache#3028

commit de685a7
Author: pepov <peterwilcsinszky@gmail.com>
Date:   Tue Oct 2 15:21:36 2018 +0200

    NIFI-5656 Handly empty "Node Group" property in FileAccessPolicyProvider consistently, add some logs to help with debugging, add test for the invalid group name and for the empty case.

    This closes apache#3043.

    Signed-off-by: Kevin Doran <kdoran@apache.org>

commit b4c8e01
Merge: 895323f 76a9f98
Author: Brandon Devries <devriesb@apache.org>
Date:   Tue Oct 2 11:08:43 2018 -0400

    Merge branch 'pr2931'

commit 76a9f98
Author: Mike Moser <mosermw@apache.org>
Date:   Wed Sep 5 15:49:44 2018 -0400

    NIFI-3531 Catch and rethrow generic Exception to handle RuntimeExceptions, and allow test to pass
    This closes apache#2931.
    Signed-off-by: Brandon Devries <devriesb@apache.org>

commit 895323f
Merge: 813cc1f 4f538f1
Author: Brandon Devries <devriesb@apache.org>
Date:   Tue Oct 2 09:40:36 2018 -0400

    Merge branch 'pr2949'

commit 4f538f1
Author: Mike Moser <mosermw@apache.org>
Date:   Tue Aug 14 18:55:10 2018 +0000

    NIFI-3672 updated PublishJMS message property docs

    This closes apache#2949

    Signed-off-by: Brandon Devries <devriesb@apache.org>

commit 813cc1f
Author: Matthew Burgess <mattyb149@apache.org>
Date:   Mon Oct 1 10:23:44 2018 -0400

    NIFI-5650: Added Xerces to scripting bundle for Jython 2.7.1

    This closes apache#3042

    Signed-off-by: Mike Thomsen <mikerthomsen@gmail.com>

commit b1478cd
Author: Mike Thomsen <mikerthomsen@gmail.com>
Date:   Fri Apr 6 21:38:07 2018 -0400

    NIFI-5051 Created ElasticSearch lookup service.

    NIFI-5051 Fixed checkstyle issue.

    NIFI-5051 Converted ES lookup service to use a SchemaRegistry.

    NIFI-5051 Cleaned up POM and added a simple unit test that uses a mock client service.

    NIFI-5051 Added change; waiting for feedback.

    NIFI-5051 Changed query setup based on code review. Changed tests to Groovy to make them easier to read with all of the inline JSON.

    NIFI-5051 fixed a checkstyle issue.

    NIFI-5051 Rebased to cleanup merge issues

    NIFI-5051 Added changes from a code review.

    NIFI-5051 Fixed a checkstyle issue.

    NIFI-5051 Added coverage generator for tests.

    Rebased.

    NIFI-5051 Updated service and switched it over to JsonInferenceSchemaRegistryService.

    NIFI-5051 Removed dead code.

    NIFI-5051 Fixed checkstyle errors.

    NIFI-5051 Refactored query builder.

    NIFI-5051 Added placeholder gitignore to force test compile.

    NIFI-5051 Added note explaining why the .gitignore file was needed.

    NIFI-5051 Made constructor public.

    NIFI-5051 Fixed path issue in client service integration tests.

    NIFI-5051 Added additional mapping capabilities to let users massage the result set into the fields they want.

    Signed-off-by: Matthew Burgess <mattyb149@apache.org>

    This closes apache#2615

commit 748cf74
Author: Andy LoPresto <alopresto@apache.org>
Date:   Wed Sep 26 18:18:22 2018 -0700

    NIFI-5628 Added content length check to OkHttpReplicationClient.
    Added unit tests.

    This closes apache#3035

commit 0dd3823
Author: Colin Dean <colin.dean@arcadia.io>
Date:   Wed Sep 19 20:27:47 2018 -0400

    NIFI-5612: Support JDBC drivers that return Long for unsigned ints

    Refactors tests in order to share code repeated in tests and to enable
    some parameterized testing.

    MySQL Connector/J 5.1.x in conjunction with MySQL 5.0.x will return
    a Long for ResultSet#getObject when the SQL type is an unsigned integer.
    This change prevents that error from occurring while implementing a more
    informational exception describing what the failing object's POJO type
    is in addition to its string value.

    Signed-off-by: Matthew Burgess <mattyb149@apache.org>

    This closes apache#3032

commit e24388a
Author: Jeff Storck <jtswork@gmail.com>
Date:   Tue Sep 25 18:30:19 2018 -0400

    NIFI-5557 Added test in PutHDFSTest for IOException with a nested GSSException
    Resolved most of the code warnings in PutHDFSTest

    This closes apache#2971.

commit 0f55cbf
Author: Endre Zoltan Kovacs <ekovacs@hortonworks.com>
Date:   Tue Aug 28 10:47:59 2018 +0200

    NIFI-5557: handling expired ticket by rollback and penalization

commit 2e1005e
Author: Mark Payne <markap14@hotmail.com>
Date:   Thu Sep 27 10:10:48 2018 -0400

    NIFI-5640: Improved efficiency of Avro Reader and some methods of AvroTypeUtil. Also switched ServiceStateTransition to using read/write locks instead of synchronized blocks because profiling showed that significant time was spent in determining state of a Controller Service when attempting to use it. Switching to a ReadLock should provide better performance there.

    Signed-off-by: Matthew Burgess <mattyb149@apache.org>

    This closes apache#3036

commit ad4c886
Author: Mark Payne <markap14@hotmail.com>
Date:   Tue Sep 25 09:05:06 2018 -0400

    NIFI-5634: When merging RPG entities, ensure that we only send back the ports that are common to all nodes - even if that means sending back no ports

    This closes apache#3030

commit 66eeb48
Author: Mike Moser <mosermw@apache.org>
Date:   Mon Aug 13 17:40:54 2018 +0000

    NIFI-3672 Add support for strongly typed message properties in PublishJMS

commit 8309747
Author: Mike Moser <mosermw@apache.org>
Date:   Wed Aug 1 20:11:35 2018 +0000

    NIFI-3531 Moved session.recover in JMSConsumer to exceptional situations
  • Loading branch information
adyoun2 committed Oct 15, 2018
1 parent d065346 commit b6475b5
Show file tree
Hide file tree
Showing 500 changed files with 24,825 additions and 5,671 deletions.
Expand Up @@ -63,6 +63,10 @@ public QueueSize add(final QueueSize other) {
return new QueueSize(objectCount + other.getObjectCount(), totalSizeBytes + other.getByteCount());
}

public QueueSize add(final int count, final long bytes) {
return new QueueSize(objectCount + count, totalSizeBytes + bytes);
}

@Override
public String toString() {
return "QueueSize[FlowFiles=" + objectCount + ", ContentSize=" + NumberFormat.getNumberInstance().format(totalSizeBytes) + " Bytes]";
Expand Down
4 changes: 4 additions & 0 deletions nifi-api/src/main/java/org/apache/nifi/flowfile/FlowFile.java
Expand Up @@ -121,5 +121,9 @@ public static String validateKey(final String key) {
}
return key;
}

public static boolean isValid(final String key) {
return key != null && !key.trim().isEmpty();
}
}
}
2 changes: 1 addition & 1 deletion nifi-assembly/NOTICE
Expand Up @@ -1873,4 +1873,4 @@ SIL OFL 1.1
******************

The following binary components are provided under the SIL Open Font License 1.1
(SIL OFL 1.1) FontAwesome (4.6.1 - http://fortawesome.github.io/Font-Awesome/license/)
(SIL OFL 1.1) FontAwesome (4.7.0 - https://fontawesome.com/license/free)
Expand Up @@ -81,6 +81,4 @@ public void notify(NotificationContext context, NotificationType type, String su
logger.info(context.getProperty(CUSTOM_USERNAME).evaluateAttributeExpressions().getValue());
logger.info(context.getProperty(CUSTOM_PASSWORD).evaluateAttributeExpressions().getValue());
}


}
Expand Up @@ -42,12 +42,12 @@ public class TestHttpNotificationServiceSSL extends TestHttpNotificationService
" <id>http-notification</id>\n"+
" <class>org.apache.nifi.bootstrap.notification.http.HttpNotificationService</class>\n"+
" <property name=\"URL\">${test.server}</property>\n"+
" <property name=\"Truststore Filename\">./src/test/resources/localhost-ts.jks</property>\n"+
" <property name=\"Truststore Filename\">./src/test/resources/truststore.jks</property>\n"+
" <property name=\"Truststore Type\">JKS</property>\n"+
" <property name=\"Truststore Password\">localtest</property>\n"+
" <property name=\"Keystore Filename\">./src/test/resources/localhost-ks.jks</property>\n"+
" <property name=\"Truststore Password\">passwordpassword</property>\n"+
" <property name=\"Keystore Filename\">./src/test/resources/keystore.jks</property>\n"+
" <property name=\"Keystore Type\">JKS</property>\n"+
" <property name=\"Keystore Password\">localtest</property>\n"+
" <property name=\"Keystore Password\">passwordpassword</property>\n"+
" <property name=\"testProp\">${literal('testing')}</property>\n"+
" </service>\n"+
"</services>";
Expand All @@ -62,12 +62,12 @@ public static void startServer() throws IOException, UnrecoverableKeyException,
mockWebServer = new MockWebServer();

final SSLContext sslContext = SslContextFactory.createSslContext(
"./src/test/resources/localhost-ks.jks",
"localtest".toCharArray(),
"./src/test/resources/keystore.jks",
"passwordpassword".toCharArray(),
null,
"JKS",
"./src/test/resources/localhost-ts.jks",
"localtest".toCharArray(),
"./src/test/resources/truststore.jks",
"passwordpassword".toCharArray(),
"JKS",
SslContextFactory.ClientAuth.REQUIRED,
"TLS");
Expand Down
Binary file added nifi-bootstrap/src/test/resources/keystore.jks
Binary file not shown.
Binary file removed nifi-bootstrap/src/test/resources/localhost-ks.jks
Binary file not shown.
Binary file removed nifi-bootstrap/src/test/resources/localhost-ts.jks
Binary file not shown.
Binary file added nifi-bootstrap/src/test/resources/truststore.jks
Binary file not shown.
2 changes: 1 addition & 1 deletion nifi-commons/nifi-data-provenance-utils/pom.xml
Expand Up @@ -45,7 +45,7 @@
<dependency>
<groupId>org.bouncycastle</groupId>
<artifactId>bcprov-jdk15on</artifactId>
<version>1.59</version>
<version>1.60</version>
</dependency>
<dependency>
<groupId>org.apache.nifi</groupId>
Expand Down
6 changes: 3 additions & 3 deletions nifi-commons/nifi-expression-language/pom.xml
Expand Up @@ -81,12 +81,12 @@
<dependency>
<groupId>com.fasterxml.jackson.core</groupId>
<artifactId>jackson-databind</artifactId>
<version>2.9.5</version>
<version>2.9.7</version>
</dependency>
<dependency>
<groupId>org.apache.commons</groupId>
<artifactId>commons-lang3</artifactId>
<version>3.7</version>
<artifactId>commons-text</artifactId>
<version>1.4</version>
</dependency>
</dependencies>
</project>
Expand Up @@ -16,12 +16,6 @@
*/
package org.apache.nifi.attribute.expression.language;

import java.util.Collections;
import java.util.HashSet;
import java.util.List;
import java.util.Map;
import java.util.Set;

import org.apache.nifi.attribute.expression.language.evaluation.Evaluator;
import org.apache.nifi.attribute.expression.language.evaluation.literals.StringLiteralEvaluator;
import org.apache.nifi.attribute.expression.language.evaluation.selection.AllAttributesEvaluator;
Expand All @@ -34,7 +28,14 @@
import org.apache.nifi.expression.AttributeValueDecorator;
import org.apache.nifi.processor.exception.ProcessException;

import java.util.Collections;
import java.util.HashSet;
import java.util.List;
import java.util.Map;
import java.util.Set;

public class StandardPreparedQuery implements PreparedQuery {
private static final String EMPTY_STRING = "";

private final List<Expression> expressions;
private volatile VariableImpact variableImpact;
Expand All @@ -45,6 +46,14 @@ public StandardPreparedQuery(final List<Expression> expressions) {

@Override
public String evaluateExpressions(final Map<String, String> valMap, final AttributeValueDecorator decorator, final Map<String, String> stateVariables) throws ProcessException {
if (expressions.isEmpty()) {
return EMPTY_STRING;
}
if (expressions.size() == 1) {
final String evaluated = expressions.get(0).evaluate(valMap, decorator, stateVariables);
return evaluated == null ? EMPTY_STRING : evaluated;
}

final StringBuilder sb = new StringBuilder();

for (final Expression expression : expressions) {
Expand Down
Expand Up @@ -18,8 +18,8 @@

import java.util.Map;

import org.apache.commons.lang3.StringEscapeUtils;
import org.apache.commons.lang3.text.translate.CharSequenceTranslator;
import org.apache.commons.text.StringEscapeUtils;
import org.apache.commons.text.translate.CharSequenceTranslator;
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;
Expand Down
9 changes: 7 additions & 2 deletions nifi-commons/nifi-flowfile-packager/pom.xml
Expand Up @@ -25,12 +25,17 @@
<dependency>
<groupId>org.apache.commons</groupId>
<artifactId>commons-compress</artifactId>
<version>1.16.1</version>
<version>1.18</version>
</dependency>
<dependency>
<groupId>org.apache.commons</groupId>
<artifactId>commons-lang3</artifactId>
<version>3.7</version>
<version>3.8.1</version>
</dependency>
<dependency>
<groupId>org.apache.commons</groupId>
<artifactId>commons-text</artifactId>
<version>1.4</version>
</dependency>
</dependencies>
</project>
Expand Up @@ -24,7 +24,7 @@

import org.apache.commons.compress.archivers.tar.TarArchiveEntry;
import org.apache.commons.compress.archivers.tar.TarArchiveOutputStream;
import org.apache.commons.lang3.StringEscapeUtils;
import org.apache.commons.text.StringEscapeUtils;

public class FlowFilePackagerV1 implements FlowFilePackager {

Expand Down
18 changes: 9 additions & 9 deletions nifi-commons/nifi-hl7-query-language/pom.xml
Expand Up @@ -65,47 +65,47 @@
<dependency>
<groupId>ca.uhn.hapi</groupId>
<artifactId>hapi-base</artifactId>
<version>2.2</version>
<version>2.3</version>
</dependency>
<dependency>
<groupId>ca.uhn.hapi</groupId>
<artifactId>hapi-structures-v21</artifactId>
<version>2.2</version>
<version>2.3</version>
</dependency>
<dependency>
<groupId>ca.uhn.hapi</groupId>
<artifactId>hapi-structures-v22</artifactId>
<version>2.2</version>
<version>2.3</version>
</dependency>
<dependency>
<groupId>ca.uhn.hapi</groupId>
<artifactId>hapi-structures-v23</artifactId>
<version>2.2</version>
<version>2.3</version>
</dependency>
<dependency>
<groupId>ca.uhn.hapi</groupId>
<artifactId>hapi-structures-v231</artifactId>
<version>2.2</version>
<version>2.3</version>
</dependency>
<dependency>
<groupId>ca.uhn.hapi</groupId>
<artifactId>hapi-structures-v24</artifactId>
<version>2.2</version>
<version>2.3</version>
</dependency>
<dependency>
<groupId>ca.uhn.hapi</groupId>
<artifactId>hapi-structures-v25</artifactId>
<version>2.2</version>
<version>2.3</version>
</dependency>
<dependency>
<groupId>ca.uhn.hapi</groupId>
<artifactId>hapi-structures-v251</artifactId>
<version>2.2</version>
<version>2.3</version>
</dependency>
<dependency>
<groupId>ca.uhn.hapi</groupId>
<artifactId>hapi-structures-v26</artifactId>
<version>2.2</version>
<version>2.3</version>
</dependency>
</dependencies>
</project>
Expand Up @@ -27,7 +27,6 @@
import ca.uhn.hl7v2.model.ExtraComponents;
import ca.uhn.hl7v2.model.Primitive;
import ca.uhn.hl7v2.model.Type;
import ca.uhn.hl7v2.model.Varies;
import ca.uhn.hl7v2.parser.EncodingCharacters;
import ca.uhn.hl7v2.parser.PipeParser;

Expand Down Expand Up @@ -59,8 +58,7 @@ public HapiField(final Type type) {
componentList.add(new SingleValueField(singleFieldValue));

for (int i = 0; i < extra.numComponents(); i++) {
final Varies varies = extra.getComponent(i);
componentList.add(new HapiField(varies));
componentList.add(new HapiField(extra.getComponent(i)));
}
}

Expand Down
2 changes: 1 addition & 1 deletion nifi-commons/nifi-json-utils/pom.xml
Expand Up @@ -32,7 +32,7 @@
<dependency>
<groupId>com.fasterxml.jackson.core</groupId>
<artifactId>jackson-databind</artifactId>
<version>2.9.5</version>
<version>2.9.7</version>
<scope>compile</scope>
</dependency>
</dependencies>
Expand Down
Expand Up @@ -204,6 +204,13 @@ public abstract class NiFiProperties {
public static final String FLOW_ELECTION_MAX_WAIT_TIME = "nifi.cluster.flow.election.max.wait.time";
public static final String FLOW_ELECTION_MAX_CANDIDATES = "nifi.cluster.flow.election.max.candidates";

// cluster load balance properties
public static final String LOAD_BALANCE_ADDRESS = "nifi.cluster.load.balance.address";
public static final String LOAD_BALANCE_PORT = "nifi.cluster.load.balance.port";
public static final String LOAD_BALANCE_CONNECTIONS_PER_NODE = "nifi.cluster.load.balance.connections.per.node";
public static final String LOAD_BALANCE_MAX_THREAD_COUNT = "nifi.cluster.load.balance.max.thread.count";
public static final String LOAD_BALANCE_COMMS_TIMEOUT = "nifi.cluster.load.balance.comms.timeout";

// zookeeper properties
public static final String ZOOKEEPER_CONNECT_STRING = "nifi.zookeeper.connect.string";
public static final String ZOOKEEPER_CONNECT_TIMEOUT = "nifi.zookeeper.connect.timeout";
Expand Down Expand Up @@ -287,6 +294,13 @@ public abstract class NiFiProperties {
public static final String DEFAULT_REQUEST_REPLICATION_CLAIM_TIMEOUT = "15 secs";
public static final String DEFAULT_FLOW_ELECTION_MAX_WAIT_TIME = "5 mins";

// cluster load balance defaults
public static final int DEFAULT_LOAD_BALANCE_PORT = 6342;
public static final int DEFAULT_LOAD_BALANCE_CONNECTIONS_PER_NODE = 4;
public static final int DEFAULT_LOAD_BALANCE_MAX_THREAD_COUNT = 8;
public static final String DEFAULT_LOAD_BALANCE_COMMS_TIMEOUT = "30 sec";


// state management defaults
public static final String DEFAULT_STATE_MANAGEMENT_CONFIG_FILE = "conf/state-management.xml";

Expand Down Expand Up @@ -736,6 +750,23 @@ public InetSocketAddress getClusterNodeProtocolAddress() {
}
}

public InetSocketAddress getClusterLoadBalanceAddress() {
try {
String address = getProperty(LOAD_BALANCE_ADDRESS);
if (StringUtils.isBlank(address)) {
address = getProperty(CLUSTER_NODE_ADDRESS);
}
if (StringUtils.isBlank(address)) {
address = "localhost";
}

final int port = getIntegerProperty(LOAD_BALANCE_PORT, DEFAULT_LOAD_BALANCE_PORT);
return InetSocketAddress.createUnresolved(address, port);
} catch (final Exception e) {
throw new RuntimeException("Invalid load balance address/port due to: " + e, e);
}
}

public Integer getClusterNodeProtocolPort() {
try {
return Integer.parseInt(getProperty(CLUSTER_NODE_PROTOCOL_PORT));
Expand Down

0 comments on commit b6475b5

Please sign in to comment.