首页 > 解决方案 > Storm ui 中的拓扑不会发出或传输元组

问题描述

我正在使用带有 elasticsearch 7.2.0 的 Stormcrawler 1.16。我已经用 achetype 建立了项目。我运行提交拓扑的命令

 storm jar target/stormcrawler-1.0-SNAPSHOT.jar  org.apache.storm.flux.Flux --remote es-crawler.flux

我在输出中得到这个 -

 Parsing file: /home/ubuntu/stormcrawler/es-crawler.flux
 835  [main] INFO  o.a.s.f.p.FluxParser - loading YAML from input 
 stream...
 841  [main] INFO  o.a.s.f.p.FluxParser - Not performing property 
 substitution.
 841  [main] INFO  o.a.s.f.p.FluxParser - Not performing environment 
 variable substitution.
 900  [main] INFO  o.a.s.f.p.FluxParser - Loading includes from 
 resource: /crawler-default.yaml
 901  [main] INFO  o.a.s.f.p.FluxParser - loading YAML from input 
 stream...
 903  [main] INFO  o.a.s.f.p.FluxParser - Not performing property 
 substitution.
 903  [main] INFO  o.a.s.f.p.FluxParser - Not performing environment 
 variable substitution.
 Configuration (interpreted): 

然后我最后输出行 -

   2014 [main] WARN  o.a.s.u.Utils - STORM-VERSION new 1.2.3 old 1.2.3
   2376 [main] INFO  o.a.s.StormSubmitter - Finished submitting topology: crawler

但是当我在storm ui中检查这个爬虫拓扑时,然后在拓扑统计中,这个爬虫拓扑没有发出或传输元组。

我在下面的链接中获得了 Storm ui 的快照。

[在拓扑统计中,不会发出或传输元组。我该如何解决这个问题?1

标签: elasticsearchweb-crawlerstormcrawler

解决方案


您的 POM 文件可能缺少storm-crawler-elasticsearch依赖项。

您可以将您的代码与Storm-crawler-elasticsearch-archetype生成的代码进行比较,这应该会为您提供一个有效的配置。

使用 Elasticsearch 的原型:

mvn archetype:generate -DarchetypeGroupId=com.digitalpebble.stormcrawler -DarchetypeArtifactId=storm-crawler-elasticsearch-archetype -DarchetypeVersion=LATEST

系统会要求您输入 groupId(例如 com.mycompany.crawler)、artefactId(例如stormcrawler)、版本和包名称。

这不仅会创建一个包含具有上述依赖关系的 POM 的完整项目,还会创建一组资源、配置文件和拓扑类。输入您刚刚创建的目录(应该与您之前指定的 artefactId 相同)并按照 README 文件中的说明进行操作。


推荐阅读