mirror of https://github.com/apache/nifi.git
Merge branch 'develop' into ListHDFS
This commit is contained in:
commit
00b686b0b2
|
@ -258,7 +258,7 @@ public class EndpointConnectionPool {
|
||||||
}
|
}
|
||||||
|
|
||||||
final PeerDescription peerDescription = peerStatus.getPeerDescription();
|
final PeerDescription peerDescription = peerStatus.getPeerDescription();
|
||||||
BlockingQueue<EndpointConnection> connectionQueue = connectionQueueMap.get(peerStatus);
|
BlockingQueue<EndpointConnection> connectionQueue = connectionQueueMap.get(peerDescription);
|
||||||
if (connectionQueue == null) {
|
if (connectionQueue == null) {
|
||||||
connectionQueue = new LinkedBlockingQueue<>();
|
connectionQueue = new LinkedBlockingQueue<>();
|
||||||
BlockingQueue<EndpointConnection> existing = connectionQueueMap.putIfAbsent(peerDescription, connectionQueue);
|
BlockingQueue<EndpointConnection> existing = connectionQueueMap.putIfAbsent(peerDescription, connectionQueue);
|
||||||
|
|
|
@ -434,8 +434,8 @@ public class GetHTTP extends AbstractSessionFactoryProcessor {
|
||||||
if (timeToPersist < System.currentTimeMillis()) {
|
if (timeToPersist < System.currentTimeMillis()) {
|
||||||
readLock.unlock();
|
readLock.unlock();
|
||||||
writeLock.lock();
|
writeLock.lock();
|
||||||
if (timeToPersist < System.currentTimeMillis()) {
|
|
||||||
try {
|
try {
|
||||||
|
if (timeToPersist < System.currentTimeMillis()) {
|
||||||
timeToPersist = System.currentTimeMillis() + PERSISTENCE_INTERVAL_MSEC;
|
timeToPersist = System.currentTimeMillis() + PERSISTENCE_INTERVAL_MSEC;
|
||||||
File httpCache = new File(HTTP_CACHE_FILE_PREFIX + getIdentifier());
|
File httpCache = new File(HTTP_CACHE_FILE_PREFIX + getIdentifier());
|
||||||
try (FileOutputStream fos = new FileOutputStream(httpCache)) {
|
try (FileOutputStream fos = new FileOutputStream(httpCache)) {
|
||||||
|
@ -446,12 +446,13 @@ public class GetHTTP extends AbstractSessionFactoryProcessor {
|
||||||
} catch (IOException e) {
|
} catch (IOException e) {
|
||||||
getLogger().error("Failed to persist ETag and LastMod due to " + e, e);
|
getLogger().error("Failed to persist ETag and LastMod due to " + e, e);
|
||||||
}
|
}
|
||||||
} finally {
|
}
|
||||||
|
}
|
||||||
|
finally {
|
||||||
readLock.lock();
|
readLock.lock();
|
||||||
writeLock.unlock();
|
writeLock.unlock();
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
|
||||||
} finally {
|
} finally {
|
||||||
readLock.unlock();
|
readLock.unlock();
|
||||||
}
|
}
|
||||||
|
|
|
@ -26,6 +26,7 @@ import java.util.concurrent.TimeUnit;
|
||||||
|
|
||||||
import org.apache.nifi.annotation.documentation.CapabilityDescription;
|
import org.apache.nifi.annotation.documentation.CapabilityDescription;
|
||||||
import org.apache.nifi.annotation.documentation.SeeAlso;
|
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.annotation.lifecycle.OnEnabled;
|
||||||
import org.apache.nifi.components.PropertyDescriptor;
|
import org.apache.nifi.components.PropertyDescriptor;
|
||||||
import org.apache.nifi.controller.AbstractControllerService;
|
import org.apache.nifi.controller.AbstractControllerService;
|
||||||
|
@ -42,6 +43,7 @@ import org.apache.nifi.stream.io.DataOutputStream;
|
||||||
import org.slf4j.Logger;
|
import org.slf4j.Logger;
|
||||||
import org.slf4j.LoggerFactory;
|
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"})
|
@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 "
|
@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")
|
+ "between nodes in a NiFi cluster")
|
||||||
|
|
|
@ -26,6 +26,7 @@ import java.util.concurrent.TimeUnit;
|
||||||
|
|
||||||
import org.apache.nifi.annotation.documentation.CapabilityDescription;
|
import org.apache.nifi.annotation.documentation.CapabilityDescription;
|
||||||
import org.apache.nifi.annotation.documentation.SeeAlso;
|
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.annotation.lifecycle.OnEnabled;
|
||||||
import org.apache.nifi.components.PropertyDescriptor;
|
import org.apache.nifi.components.PropertyDescriptor;
|
||||||
import org.apache.nifi.controller.AbstractControllerService;
|
import org.apache.nifi.controller.AbstractControllerService;
|
||||||
|
@ -42,6 +43,7 @@ import org.apache.nifi.stream.io.DataOutputStream;
|
||||||
import org.slf4j.Logger;
|
import org.slf4j.Logger;
|
||||||
import org.slf4j.LoggerFactory;
|
import org.slf4j.LoggerFactory;
|
||||||
|
|
||||||
|
@Tags({"distributed", "cache", "state", "set", "cluster"})
|
||||||
@SeeAlso(classNames = {"org.apache.nifi.distributed.cache.server.DistributedSetCacheServer", "org.apache.nifi.ssl.StandardSSLContextService"})
|
@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 "
|
@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")
|
+ "between nodes in a NiFi cluster")
|
||||||
|
|
|
@ -1,45 +0,0 @@
|
||||||
<!DOCTYPE html>
|
|
||||||
<html lang="en">
|
|
||||||
<!--
|
|
||||||
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.
|
|
||||||
-->
|
|
||||||
<head>
|
|
||||||
<meta charset="utf-8" />
|
|
||||||
<title>Distributed Map Cache Client Service</title>
|
|
||||||
<link rel="stylesheet" href="../../css/component-usage.css" type="text/css" />
|
|
||||||
</head>
|
|
||||||
|
|
||||||
<body>
|
|
||||||
<p>
|
|
||||||
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 <code>cache-client</code>. 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 <code>Server Hostname</code>, <code>Server Port</code>,
|
|
||||||
<code>Communications Timeout</code>, and <span style="font-style: italic;">SSL Context Service</span>.
|
|
||||||
</p>
|
|
||||||
|
|
||||||
<pre>
|
|
||||||
<?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>
|
|
||||||
</pre>
|
|
||||||
</body>
|
|
||||||
</html>
|
|
|
@ -1,46 +0,0 @@
|
||||||
<!DOCTYPE html>
|
|
||||||
<html lang="en">
|
|
||||||
<!--
|
|
||||||
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.
|
|
||||||
-->
|
|
||||||
<head>
|
|
||||||
<meta charset="utf-8" />
|
|
||||||
<title>Distributed Map Cache Client Service</title>
|
|
||||||
<link rel="stylesheet" href="../../css/component-usage.css" type="text/css" />
|
|
||||||
</head>
|
|
||||||
|
|
||||||
<body>
|
|
||||||
<p>
|
|
||||||
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 <code>cache-server</code>. 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 <code>Port</code>, <code>Maximum Cache Entries</code>,
|
|
||||||
<code>Eviction Strategy</code>, <span style="font-style: italic;">SSL Context Service</span>, and
|
|
||||||
<span style="font-style: italic;">Persistence Directory</span>
|
|
||||||
</p>
|
|
||||||
|
|
||||||
<pre>
|
|
||||||
<?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>
|
|
||||||
</pre>
|
|
||||||
</body>
|
|
||||||
</html>
|
|
|
@ -1,67 +0,0 @@
|
||||||
<!DOCTYPE html>
|
|
||||||
<html lang="en">
|
|
||||||
<!--
|
|
||||||
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.
|
|
||||||
-->
|
|
||||||
<head>
|
|
||||||
<meta charset="utf-8" />
|
|
||||||
<title>StandardHttpContextMap</title>
|
|
||||||
|
|
||||||
<link rel="stylesheet" href="../../css/component-usage.css" type="text/css" />
|
|
||||||
</head>
|
|
||||||
|
|
||||||
<body>
|
|
||||||
<h2>Description:</h2>
|
|
||||||
<p>
|
|
||||||
This is the standard implementation of the SSL Context Map. This service is used to provide
|
|
||||||
coordination between
|
|
||||||
<a href="../org.apache.nifi.processors.standard.HandleHttpRequest/index.html">HandleHttpRequest</a>
|
|
||||||
and
|
|
||||||
<a href="../org.apache.nifi.processors.standard.HandleHttpResponse/index.html">HandleHttpResponse</a>
|
|
||||||
Processors.
|
|
||||||
</p>
|
|
||||||
|
|
||||||
<!-- Service Documentation ================================================== -->
|
|
||||||
<h2>Configuring the HTTP Context Map:</h2>
|
|
||||||
<p>
|
|
||||||
The <code>controller-services.xml</code> file is located in the NiFi <code>conf</code>
|
|
||||||
directory. The user may set up any number of controller services within this file.
|
|
||||||
</p>
|
|
||||||
|
|
||||||
<p>
|
|
||||||
This controller service exposes a single property named <code>Maximum Outstanding Requests</code>.
|
|
||||||
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.
|
|
||||||
</p>
|
|
||||||
|
|
||||||
<pre>
|
|
||||||
<?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>
|
|
||||||
</pre>
|
|
||||||
|
|
||||||
<p>
|
|
||||||
<strong>See Also:</strong><br />
|
|
||||||
<a href="../org.apache.nifi.processors.standard.HandleHttpRequest/index.html">HandleHttpRequest</a><br />
|
|
||||||
<a href="../org.apache.nifi.processors.standard.HandleHttpResponse/index.html">HandleHttpResponse</a><br />
|
|
||||||
</p>
|
|
||||||
|
|
||||||
</body>
|
|
||||||
</html>
|
|
|
@ -1,49 +0,0 @@
|
||||||
<!DOCTYPE html>
|
|
||||||
<html lang="en">
|
|
||||||
<!--
|
|
||||||
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.
|
|
||||||
-->
|
|
||||||
<head>
|
|
||||||
<meta charset="utf-8" />
|
|
||||||
<title>StandardSSLContextService</title>
|
|
||||||
|
|
||||||
<link rel="stylesheet" href="../../css/component-usage.css" type="text/css" />
|
|
||||||
</head>
|
|
||||||
|
|
||||||
<body>
|
|
||||||
<p>
|
|
||||||
Below is an example of the template for a SSLContext controller service. Note that the identifier
|
|
||||||
in this example is <code>ssl-context</code>. 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
|
|
||||||
<code>Keystore Type</code> and <code>Truststore Type</code> are <span style="font-style: italic;">JKS</span>
|
|
||||||
or <span style="font-style: italic;">PKCS12</span>.
|
|
||||||
</p>
|
|
||||||
|
|
||||||
<pre>
|
|
||||||
<?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>
|
|
||||||
</pre>
|
|
||||||
</body>
|
|
||||||
</html>
|
|
Loading…
Reference in New Issue