如何在 Intellij IDEA 中构建和运行 Storm 拓扑 [英] How to build and Run Storm Topology within Intellij IDEA

查看:59
本文介绍了如何在 Intellij IDEA 中构建和运行 Storm 拓扑的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我按照 Storm Starter 的说明在 IntelliJ 中导入了 Twitter Storm.为了测试,我稍微编辑了 ExclaimationTopology 并使用以下 Maven 命令来构建和运行它:

I followed Storm Starter instructions and imported Twitter Storm in IntelliJ. For sake of testing I edited ExclaimationToplogy a bit and used following Maven command to build and run it:

mvn -f m2-pom.xml compile exec:java -Dstorm.topology=storm.starter.ExclamationTopology

但我更感兴趣的是在 IDE 中构建和运行,而不是在命令行中.我需要执行哪些操作?

But I am more interested to build and run within IDE rather than from command line. What actions do I need to perform?

谢谢

推荐答案

  1. 按照storm-starter 中的步骤操作:使用storm- IntelliJ IDEA 入门
  2. 打开 Maven 的 pom.xml 文件并从 Storm 依赖项中删除 provided 行.这使 IntelliJ 能够编译 Storm 对构建的依赖.
  3. 转到 /src/jvm/storm/starter/,右键单击 ExclamationTopology 文件并运行 'ExclamationTop....main()'
  1. Follow the steps in storm-starter's: Using storm-starter with IntelliJ IDEA
  2. Open Maven's pom.xml file and remove <scope>provided</scope> line from storm dependency. This enables IntelliJ to compile storm dependency on build.
  3. Go to /src/jvm/storm/starter/, right click on ExclamationTopology file and Run 'ExclamationTop....main()'

这篇关于如何在 Intellij IDEA 中构建和运行 Storm 拓扑的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆