使用以下问答,我设法通过 Apache Storm 集群(本地运行)上的 eclipse 启用调试。如何在 Eclipse 中调试 Apache Storm?
My conf/storm.yaml
有以下行可以在工作节点上启用调试:
worker.childopts: "-agentlib:jdwp=transport=dt_socket,address=8000,server=y,suspend=y"
当我向storm提交拓扑以运行(在集群中)时,我可以在编辑器中设置断点并查看变量。
但是当我尝试在本地运行它时(在本地模式),我似乎无法通过 eclipse 连接(连接被拒绝)。
# I'm using storm crawler, I submit a topology like so:
storm jar target/storm-crawler-core-10.6-SNAPSHOT-jar-with-dependencies.jar \
com.digitalpebble.storm.crawler.CrawlTopology \
-conf crawler-conf.yaml \
-local
# ^ The `-local` runs it in a `LocalCluster`
# If I submit it to my actual cluster (without -local), I can debug it through eclipse.
# View the pastebin for all the output : http://pastebin.com/PEdA7fH0
我已将上述命令的所有输出包含到 Pastebin 中。点这里观看
有关 Storm Crawler 如何启动 LocalCluster 的更多信息。
我希望能够在本地模式下进行调试,这样我就可以在命令行中看到输出(当我通过我设置的断点时)并快速进行更改并重新运行,基本上是为了加快我的开发流程。
在 LocalCluster 中运行 Apache Storm 时如何通过 eclipse 调试器调试代码(本地模式)?