ran9nar 2016-05-11 05:19 采纳率: 71.4%
浏览 1215
已采纳

pyleus 无法将结果写入MySQL数据库

我在requirements.txt文件中写了MySQLdb的库MySQL-python,并且拓扑能够被顺利的build生成jar包,但是当我把jar
包提交以后,出现如下错误信息:

 11814 [Thread-12-result-count] ERROR backtype.storm.daemon.executor - 
java.lang.RuntimeException: Error when launching multilang subprocess
Traceback (most recent call last):
  File "/usr/lib64/python2.7/runpy.py", line 162, in _run_module_as_main
    "__main__", fname, loader, pkg_name)
  File "/usr/lib64/python2.7/runpy.py", line 72, in _run_code
    exec code in run_globals
  File "/tmp/e16601e5-a293-4233-bb9e-0e68090a44d6/supervisor/stormdist/association-miner-1-1462975821/resources/association-miner/result.py", line 2, in <module>
    import MySQLdb
ImportError: No module named MySQLdb


我的yaml文件配置如下:

name: association-miner

topology:

- spout:
    name: trans-spout
    module: association-miner.spout

- bolt:
    name: mining
    module: association-miner.mining
    parallelism_hint: 3
    groupings:
        - shuffle_grouping: trans-spout

- bolt:
    name: result-count
    module: association-miner.result
    groupings:
        - global_grouping: mining
  • 写回答

1条回答

  • ran9nar 2016-05-11 10:11
    关注

    问题已解决除了在requirements.txt中写‘MySQL-python’,在集群各个节点上也要安装MySQL-python

    本回答被题主选为最佳回答 , 对您是否有帮助呢?
    评论

报告相同问题?

悬赏问题

  • ¥15 如何在scanpy上做差异基因和通路富集?
  • ¥20 关于#硬件工程#的问题,请各位专家解答!
  • ¥15 关于#matlab#的问题:期望的系统闭环传递函数为G(s)=wn^2/s^2+2¢wn+wn^2阻尼系数¢=0.707,使系统具有较小的超调量
  • ¥15 FLUENT如何实现在堆积颗粒的上表面加载高斯热源
  • ¥30 截图中的mathematics程序转换成matlab
  • ¥15 动力学代码报错,维度不匹配
  • ¥15 Power query添加列问题
  • ¥50 Kubernetes&Fission&Eleasticsearch
  • ¥15 報錯:Person is not mapped,如何解決?
  • ¥15 c++头文件不能识别CDialog