diff --git a/nifi/nifi-commons/nifi-site-to-site-client/src/main/java/org/apache/nifi/remote/client/socket/EndpointConnectionPool.java b/nifi/nifi-commons/nifi-site-to-site-client/src/main/java/org/apache/nifi/remote/client/socket/EndpointConnectionPool.java index 36d8bac8d4..b162b3fb8d 100644 --- a/nifi/nifi-commons/nifi-site-to-site-client/src/main/java/org/apache/nifi/remote/client/socket/EndpointConnectionPool.java +++ b/nifi/nifi-commons/nifi-site-to-site-client/src/main/java/org/apache/nifi/remote/client/socket/EndpointConnectionPool.java @@ -258,7 +258,7 @@ public class EndpointConnectionPool { } final PeerDescription peerDescription = peerStatus.getPeerDescription(); - BlockingQueue connectionQueue = connectionQueueMap.get(peerStatus); + BlockingQueue connectionQueue = connectionQueueMap.get(peerDescription); if (connectionQueue == null) { connectionQueue = new LinkedBlockingQueue<>(); BlockingQueue existing = connectionQueueMap.putIfAbsent(peerDescription, connectionQueue); diff --git a/nifi/nifi-nar-bundles/nifi-standard-bundle/nifi-standard-processors/src/main/java/org/apache/nifi/processors/standard/GetHTTP.java b/nifi/nifi-nar-bundles/nifi-standard-bundle/nifi-standard-processors/src/main/java/org/apache/nifi/processors/standard/GetHTTP.java index 11e75edd01..a1f57dab24 100644 --- a/nifi/nifi-nar-bundles/nifi-standard-bundle/nifi-standard-processors/src/main/java/org/apache/nifi/processors/standard/GetHTTP.java +++ b/nifi/nifi-nar-bundles/nifi-standard-bundle/nifi-standard-processors/src/main/java/org/apache/nifi/processors/standard/GetHTTP.java @@ -434,8 +434,8 @@ public class GetHTTP extends AbstractSessionFactoryProcessor { if (timeToPersist < System.currentTimeMillis()) { readLock.unlock(); writeLock.lock(); - if (timeToPersist < System.currentTimeMillis()) { - try { + try { + if (timeToPersist < System.currentTimeMillis()) { timeToPersist = System.currentTimeMillis() + PERSISTENCE_INTERVAL_MSEC; File httpCache = new File(HTTP_CACHE_FILE_PREFIX + getIdentifier()); try (FileOutputStream fos = new FileOutputStream(httpCache)) { @@ -446,11 +446,12 @@ public class GetHTTP extends AbstractSessionFactoryProcessor { } catch (IOException e) { getLogger().error("Failed to persist ETag and LastMod due to " + e, e); } - } finally { - readLock.lock(); - writeLock.unlock(); } } + finally { + readLock.lock(); + writeLock.unlock(); + } } } finally { readLock.unlock(); diff --git a/nifi/nifi-nar-bundles/nifi-standard-services/nifi-distributed-cache-services-bundle/nifi-distributed-cache-client-service/src/main/java/org/apache/nifi/distributed/cache/client/DistributedMapCacheClientService.java b/nifi/nifi-nar-bundles/nifi-standard-services/nifi-distributed-cache-services-bundle/nifi-distributed-cache-client-service/src/main/java/org/apache/nifi/distributed/cache/client/DistributedMapCacheClientService.java index ccc521ec47..ea8607196c 100644 --- a/nifi/nifi-nar-bundles/nifi-standard-services/nifi-distributed-cache-services-bundle/nifi-distributed-cache-client-service/src/main/java/org/apache/nifi/distributed/cache/client/DistributedMapCacheClientService.java +++ b/nifi/nifi-nar-bundles/nifi-standard-services/nifi-distributed-cache-services-bundle/nifi-distributed-cache-client-service/src/main/java/org/apache/nifi/distributed/cache/client/DistributedMapCacheClientService.java @@ -26,6 +26,7 @@ import java.util.concurrent.TimeUnit; import org.apache.nifi.annotation.documentation.CapabilityDescription; import org.apache.nifi.annotation.documentation.SeeAlso; +import org.apache.nifi.annotation.documentation.Tags; import org.apache.nifi.annotation.lifecycle.OnEnabled; import org.apache.nifi.components.PropertyDescriptor; import org.apache.nifi.controller.AbstractControllerService; @@ -42,6 +43,7 @@ import org.apache.nifi.stream.io.DataOutputStream; import org.slf4j.Logger; import org.slf4j.LoggerFactory; +@Tags({"distributed", "cache", "state", "map", "cluster"}) @SeeAlso(classNames = {"org.apache.nifi.distributed.cache.server.map.DistributedMapCacheServer", "org.apache.nifi.ssl.StandardSSLContextService"}) @CapabilityDescription("Provides the ability to communicate with a DistributedMapCacheServer. This can be used in order to share a Map " + "between nodes in a NiFi cluster") diff --git a/nifi/nifi-nar-bundles/nifi-standard-services/nifi-distributed-cache-services-bundle/nifi-distributed-cache-client-service/src/main/java/org/apache/nifi/distributed/cache/client/DistributedSetCacheClientService.java b/nifi/nifi-nar-bundles/nifi-standard-services/nifi-distributed-cache-services-bundle/nifi-distributed-cache-client-service/src/main/java/org/apache/nifi/distributed/cache/client/DistributedSetCacheClientService.java index 63d59cabf8..8c95c77f54 100644 --- a/nifi/nifi-nar-bundles/nifi-standard-services/nifi-distributed-cache-services-bundle/nifi-distributed-cache-client-service/src/main/java/org/apache/nifi/distributed/cache/client/DistributedSetCacheClientService.java +++ b/nifi/nifi-nar-bundles/nifi-standard-services/nifi-distributed-cache-services-bundle/nifi-distributed-cache-client-service/src/main/java/org/apache/nifi/distributed/cache/client/DistributedSetCacheClientService.java @@ -26,6 +26,7 @@ import java.util.concurrent.TimeUnit; import org.apache.nifi.annotation.documentation.CapabilityDescription; import org.apache.nifi.annotation.documentation.SeeAlso; +import org.apache.nifi.annotation.documentation.Tags; import org.apache.nifi.annotation.lifecycle.OnEnabled; import org.apache.nifi.components.PropertyDescriptor; import org.apache.nifi.controller.AbstractControllerService; @@ -42,6 +43,7 @@ import org.apache.nifi.stream.io.DataOutputStream; import org.slf4j.Logger; import org.slf4j.LoggerFactory; +@Tags({"distributed", "cache", "state", "set", "cluster"}) @SeeAlso(classNames = {"org.apache.nifi.distributed.cache.server.DistributedSetCacheServer", "org.apache.nifi.ssl.StandardSSLContextService"}) @CapabilityDescription("Provides the ability to communicate with a DistributedSetCacheServer. This can be used in order to share a Set " + "between nodes in a NiFi cluster") diff --git a/nifi/nifi-nar-bundles/nifi-standard-services/nifi-distributed-cache-services-bundle/nifi-distributed-cache-client-service/src/main/resources/docs/org.apache.nifi.distributed.cache.client.DistributedMapCacheClientService/additionalDetails.html b/nifi/nifi-nar-bundles/nifi-standard-services/nifi-distributed-cache-services-bundle/nifi-distributed-cache-client-service/src/main/resources/docs/org.apache.nifi.distributed.cache.client.DistributedMapCacheClientService/additionalDetails.html deleted file mode 100644 index 15686356e0..0000000000 --- a/nifi/nifi-nar-bundles/nifi-standard-services/nifi-distributed-cache-services-bundle/nifi-distributed-cache-client-service/src/main/resources/docs/org.apache.nifi.distributed.cache.client.DistributedMapCacheClientService/additionalDetails.html +++ /dev/null @@ -1,45 +0,0 @@ - - - - - - Distributed Map Cache Client Service - - - - -

- Below is an example of how to create a client connection to your distributed map cache server. - Note that the identifier in this example is cache-client. If you are using this template - to create your own MapCacheClient service, replace the values in this template with values that are - suitable for your system. Possible options for Server Hostname, Server Port, - Communications Timeout, and SSL Context Service. -

- -
-<?xml version="1.0" encoding="UTF-8" ?>
-<services>
-    <service>
-        <identifier>cache-client</identifier>
-        <class>org.apache.nifi.distributed.cache.client.DistributedMapCacheClientService</class>
-        <property name="Server Hostname">localhost</property>
-        <property name="Server Port">4557</property>
-        <property name="Communications Timeout">30 secs</property>
-    </service>
-</services>
-        
- - diff --git a/nifi/nifi-nar-bundles/nifi-standard-services/nifi-distributed-cache-services-bundle/nifi-distributed-cache-server/src/main/resources/docs/org.apache.nifi.distributed.cache.server.map.DistributedMapCacheServer/additionalDetails.html b/nifi/nifi-nar-bundles/nifi-standard-services/nifi-distributed-cache-services-bundle/nifi-distributed-cache-server/src/main/resources/docs/org.apache.nifi.distributed.cache.server.map.DistributedMapCacheServer/additionalDetails.html deleted file mode 100644 index 740abecf23..0000000000 --- a/nifi/nifi-nar-bundles/nifi-standard-services/nifi-distributed-cache-services-bundle/nifi-distributed-cache-server/src/main/resources/docs/org.apache.nifi.distributed.cache.server.map.DistributedMapCacheServer/additionalDetails.html +++ /dev/null @@ -1,46 +0,0 @@ - - - - - - Distributed Map Cache Client Service - - - - -

- Below is an example of how to create a distributed map cache server for clients to connect to. - Note that the identifier in this example is cache-server. If you are using this template - to create your own DistributedMapCache server, replace the values in this template with values that are - suitable for your system. Possible options for Port, Maximum Cache Entries, - Eviction Strategy, SSL Context Service, and - Persistence Directory -

- -
-<?xml version="1.0" encoding="UTF-8" ?>
-<services>
-    <service>
-        <identifier>cache-server</identifier>
-        <class>org.apache.nifi.distributed.cache.client.DistributedMapCacheServer</class>
-        <property name="Port">4557</property>
-        <property name="Maximum Cache Entries">10000</property>
-        <property name="Eviction Strategy">Least Recently Used</property>
-    </service>
-</services>
-        
- - diff --git a/nifi/nifi-nar-bundles/nifi-standard-services/nifi-http-context-map-bundle/nifi-http-context-map/src/main/resources/docs/org.apache.nifi.http.StandardHttpContextMap/index.html b/nifi/nifi-nar-bundles/nifi-standard-services/nifi-http-context-map-bundle/nifi-http-context-map/src/main/resources/docs/org.apache.nifi.http.StandardHttpContextMap/index.html deleted file mode 100644 index 774c3d9edf..0000000000 --- a/nifi/nifi-nar-bundles/nifi-standard-services/nifi-http-context-map-bundle/nifi-http-context-map/src/main/resources/docs/org.apache.nifi.http.StandardHttpContextMap/index.html +++ /dev/null @@ -1,67 +0,0 @@ - - - - - - StandardHttpContextMap - - - - - -

Description:

-

- This is the standard implementation of the SSL Context Map. This service is used to provide - coordination between - HandleHttpRequest - and - HandleHttpResponse - Processors. -

- - -

Configuring the HTTP Context Map:

-

- The controller-services.xml file is located in the NiFi conf - directory. The user may set up any number of controller services within this file. -

- -

- This controller service exposes a single property named Maximum Outstanding Requests. - This property determines the maximum number of HTTP requests that can be outstanding at any one time. - Any attempt to register an additional HTTP Request will cause an error. The default value is 5000. - Below is an example of the template for a StandardHttpContextMap controller service. -

- -
-<?xml version="1.0" encoding="UTF-8" ?>
-<services>
-    <service>
-        <identifier>http-context-map</identifier>
-        <class>org.apache.nifi.http.StandardHttpContextMap</class>
-        <property name="Maximum Outstanding Requests">5000</property>
-    </service>
-</services>
-        
- -

- See Also:
- HandleHttpRequest
- HandleHttpResponse
-

- - - diff --git a/nifi/nifi-nar-bundles/nifi-standard-services/nifi-ssl-context-bundle/nifi-ssl-context-service/src/main/resources/docs/org.apache.nifi.ssl.StandardSSLContextService/additionalDetails.html b/nifi/nifi-nar-bundles/nifi-standard-services/nifi-ssl-context-bundle/nifi-ssl-context-service/src/main/resources/docs/org.apache.nifi.ssl.StandardSSLContextService/additionalDetails.html deleted file mode 100644 index 525337df32..0000000000 --- a/nifi/nifi-nar-bundles/nifi-standard-services/nifi-ssl-context-bundle/nifi-ssl-context-service/src/main/resources/docs/org.apache.nifi.ssl.StandardSSLContextService/additionalDetails.html +++ /dev/null @@ -1,49 +0,0 @@ - - - - - - StandardSSLContextService - - - - - -

- Below is an example of the template for a SSLContext controller service. Note that the identifier - in this example is ssl-context. If using this template to create your own SSLContext controller - service, replace the property values with values that are suitable for your system. Possible options for - Keystore Type and Truststore Type are JKS - or PKCS12. -

- -
-<?xml version="1.0" encoding="UTF-8" ?>
-<services>
-    <service>
-        <identifier>ssl-context</identifier>
-        <class>org.apache.nifi.ssl.StandardSSLContextService</class>
-        <property name="Keystore Filename">C:/testpki/localtest-ks.jks</property>
-        <property name="Keystore Password">localtest</property>
-        <property name="Keystore Type">JKS</property>
-        <property name="Truststore Filename">C:/testpki/localtest-ts.jks</property>
-        <property name="Truststore Password">localtest</property>
-        <property name="Truststore Type">JKS</property>
-    </service>
-</services>
-        
- -