这里我应该做的步骤
1-下载Storm版本,解压缩,然后将解压缩的bin /目录放在PATH上
Run Code Online (Sandbox Code Playgroud)2- To be able to start and stop topologies on a remote cluster,将集群信息放在〜/ .storm/storm.yaml中
我下载了风暴版本并设置它我想这样做"将解压缩的bin /目录放在你的PATH上"
因为我不能用风暴作为命令
第二步我应该在storm.yaml中做什么集群信息?
我试图运行这个 Python 代码:
with io.open(outfile, 'w' ) as processed_text, io.open(infile, 'r') as fin:
for line in fin:
processed_text.write(preprocess(line.rstrip())+'\n')
Run Code Online (Sandbox Code Playgroud)
但得到 TypeError: must be unicode, not str
我怎么解决这个问题?我在这里搜索了类似的问题,并找到了一个可以尝试的问题
with io.open(outfile, 'w', encoding="utf-8") as processed_text, io.open(infile, 'r') as fin:
Run Code Online (Sandbox Code Playgroud)
但没有用。