首页
学习
活动
专区
圈层
工具
发布
社区首页 >问答首页 >Spring XD -找不到带有名称的模块

Spring XD -找不到带有名称的模块
EN

Stack Overflow用户
提问于 2015-04-13 18:14:54
回答 1查看 802关注 0票数 2

我有一些在Spring中使用的定制模块。我可以使用“模块上传”来部署XD,没有任何问题,但在以分布式模式运行时,我有以下例外:

代码语言:javascript
复制
org.springframework.xd.dirt.module.NoSuchModuleException: Could not find module with name 'grobid' and type 'processor'

我正在使用SpringXD1.1.1.RELEASE创建带有docker的XD集群。

代码语言:javascript
复制
server-unknown:>admin config server http://docker:9393
Successfully targeted http://docker:9393
xd:>module upload --type processor --name grobid --file /opt/.../grobid-1.0-SNAPSHOT.jar
Successfully uploaded module 'processor:grobid'
xd:>stream create --name grobidTest --definition "http --port=11001 | grobid --grobidHost=http://${GROBID_PORT_8080_TCP_ADDR}:${GROBID_PORT_8080_TCP_PORT} | processedXml:log"
Created new stream 'grobidTest'
xd:>stream deploy --name grobidTest --properties "module.grobid.count=1"
Deployed stream 'grobidTest'

根据文档,我已经设置了一个独立的redis实例,并且在引导XD时没有日志,表明了它的任何连接问题。

是什么原因导致我的模块对节点不可用,而在shell中,我可以访问它的信息:

代码语言:javascript
复制
xd:>module info --name processor:grobid
Information about processor module 'grobid':

  Option Name  Description                                            Default  Type
  -----------  -----------------------------------------------------  -------  --------
  grobidHost   Grobid Host                                            <none>   String
  outputType   how this module should emit messages it produces       <none>   MimeType
  inputType    how this module should interpret messages it consumes  <none>   MimeType

到目前为止,我在日志中看到的唯一问题(我不知道它是否是一个阻止程序)是,当我创建流时,会记录一些ZK错误:

代码语言:javascript
复制
zk_1      | 2015-04-13 19:55:37,257 [myid:] - INFO  [ProcessThread(sid:0 cport:-1)::PrepRequestProcessor@645] - Got user-level KeeperException when processing sessionid:0x14cb4593f940001 type:create cxid:0x59 zxid:0x36 txntype:-1 reqpath:n/a Error Path:/xd/modules/sink/log/dependencies Error:KeeperErrorCode = NoNode for /xd/modules/sink/log/dependencies
zk_1      | 2015-04-13 19:55:37,273 [myid:] - INFO  [ProcessThread(sid:0 cport:-1)::PrepRequestProcessor@645] - Got user-level KeeperException when processing sessionid:0x14cb4593f940001 type:create cxid:0x64 zxid:0x3c txntype:-1 reqpath:n/a Error Path:/xd/modules/processor/grobid/dependencies Error:KeeperErrorCode = NoNode for /xd/modules/processor/grobid/dependencies
zk_1      | 2015-04-13 19:55:37,289 [myid:] - INFO  [ProcessThread(sid:0 cport:-1)::PrepRequestProcessor@645] - Got user-level KeeperException when processing sessionid:0x14cb4593f940001 type:create cxid:0x6e zxid:0x41 txntype:-1 reqpath:n/a Error Path:/xd/modules/source/http/dependencies Error:KeeperErrorCode = NoNode for /xd/modules/source/http/dependencies
EN

回答 1

Stack Overflow用户

回答已采纳

发布于 2015-04-14 13:09:32

Spring在https://github.com/spring-projects/spring-xd/commit/208181c9f4693d2ef2e4e0d4065d9d8727fa1601中添加了“共享远程模块注册表”的概念(在编写本报告时为1.2,未发布)。这依赖于共享位置,大概是HDFS。

在此之前,如果要使用带有自定义上载模块的集群,则需要以某种方式使所有容器都可以使用模块写入的位置。传统的方法是使用类似NFS的东西。

但是,如果您使用的是docker (而且您似乎正在使用,也不确定这是否仅在一个主机上),您可以为此使用一个码头数据体积

为了澄清,这最后两段甚至适用于SpringXD1.1.x

票数 2
EN
页面原文内容由Stack Overflow提供。腾讯云小微IT领域专用引擎提供翻译支持
原文链接:

https://stackoverflow.com/questions/29612243

复制
相关文章

相似问题

领券
问题归档专栏文章快讯文章归档关键词归档开发者手册归档开发者手册 Section 归档