如何为 NiFi 设置分布式地图缓存? [英] How does one setup a Distributed Map Cache for NiFi?
问题描述
我是 NiFi 的新手,只是在玩弄处理器.
I'm brand new to NiFi and simply playing around with processors.
我试图在我的测试中加入 Wait
和 Notify
处理器,但我必须设置一个分布式地图缓存(服务器和客户?).
I'm trying to incorporate Wait
and Notify
processors in my testing, but I have to setup a Distributed Map Cache (server and client?).
NiFi 文档假设了我没有的理解水平.
The NiFi documentation assumes a level of understanding that I do not have.
我已在我的计算机 (macOS) 上安装了 memcached,并验证它在端口 11211(默认)上运行.我在 NiFi 的 CONTROLLER SERVICES
下创建了一个 DistributedMapCacheClientService
和 DistributedMapCacheServer
,但是我得到了 java.net.SocketTimeoutException
&其他错误.
I've installed memcached on my computer (macOS) and verified that it's running on Port 11211 (default). I've created a DistributedMapCacheClientService
and DistributedMapCacheServer
under NiFi's CONTROLLER SERVICES
, but I'm getting java.net.SocketTimeoutException
& other errors.
是否有关于整个主题的好教程?有人可以建议如何前进吗?
Is there a good tutorial on this entire topic? Can someone suggest how to move forward?
推荐答案
DistributedMapCacheClientService
和 DistributedMapCacheServer
不需要额外的软件.
the DistributedMapCacheClientService
and DistributedMapCacheServer
does not require additional software.
要创建这些服务,请右键单击画布,选择Configure
,然后选择Controller Services
选项卡.然后,您可以通过单击右侧的 +
按钮并按名称搜索来添加新服务.
To create these services, right-click on the canvas, select Configure
and then select the Controller Services
tab. You can then add new services by clicking the +
button on the right and searching by name.
使用默认参数(端口 4557)创建
DistributedMapCacheServer
并启用它.这将启动内置缓存服务器.
create
DistributedMapCacheServer
with default parameters (port 4557) and enable it. this will start built-in cache server.
使用主机名localhost
和其他默认参数创建DistributedMapCacheClientService
并启用它
create DistributedMapCacheClientService
with hostname localhost
and other default parameters and enable it
创建一个简单的流 GenerateFlowFile
在参数中设置 run schedule
而不是零字节大小.将其连接到 PutDistributedMapCache
将 Entry Identifier
设置为 Key01
并选择您的 DistributedMapCacheClientService
create a simple flow GenerateFlowFile
set the run schedule
and not zero bytes size in parameters.
connect it to PutDistributedMapCache
set Entry Identifier
as Key01
and choose your DistributedMapCacheClientService
尝试运行它.如果其他软件未使用端口 4557,则放置缓存应该可以工作.
try to run it. and if port 4557 not used by other software the put cache should work.
这篇关于如何为 NiFi 设置分布式地图缓存?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!