码迷,mamicode.com
首页 > 其他好文 > 详细

storm local版本本地测试异常汇总

时间:2015-01-20 15:50:56      阅读:251      评论:0      收藏:0      [点我收藏+]

标签:

1,报错如下:

ava.lang.RuntimeException: Error when launching multilang subprocess
Caused by: java.io.IOException: Cannot run program "python" (in directory "/tmp/eaf0b6b3-67c1-4f89-b3d8-23edada49b04/supervisor/stormdist/word-count-1-1414559082/resources"): error=2, No such file or directory

修复:1,在Eclipse中配置python路径

             2,将:multilang目录加入classpath


2,报错如下:

9688 [Thread-34] INFO  backtype.storm.task.ShellBolt - ShellLog pid:11612, name:split Traceback (most recent call last):
  File "C:\DOCUME~1\ADMINI~1\LOCALS~1\Temp\bc681c09-ff50-4ec3-808f-158917b93992\supervisor\stormdist\word-count-1-1421735162\resources\storm.py", line 172, in run
    self.process(tup)
  File "splitsentence.py", line 5, in process
    words = tup.values[0].split(" ")
IndexError: list index out of range

修改splitsentence.py即可

 

import storm

class SplitSentenceBolt(storm.BasicBolt):
    def process(self, tup):
        if len(tup.values) != 0:
                words = tup.values[0].split(" ")
                if len(words) != 0:
                    for word in words:
                      storm.emit([word])

SplitSentenceBolt().run()

storm local版本本地测试异常汇总

标签:

原文地址:http://blog.csdn.net/joeyon1985/article/details/42917333

(0)
(0)
   
举报
评论 一句话评论(0
登录后才能评论!
© 2014 mamicode.com 版权所有  联系我们:gaon5@hotmail.com
迷上了代码!