如何为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
不需要其他软件.
要创建这些服务,请右键单击画布,选择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屋!