风暴创造拓扑 [英] Storm Creating Topology

查看:270
本文介绍了风暴创造拓扑的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我正在尝试使用Eclipse在Linux中运行Storm Starter示例.我遇到以下错误,并且从未调用nexttuple函数.

I am trying to run storm starter example in Linux using Eclipse. I am getting following error and nexttuple function is never called.

错误:

35979 [main] INFO  o.a.s.d.supervisor - Shutting down supervisor cfba8fc6-    81e6-47cb-b8b9-ec7c700f4dfe
35981 [NIOServerCxn.Factory:0.0.0.0/0.0.0.0:2000] WARN  o.a.s.s.o.a.z.s.NIOServerCnxn - caught end of stream exception
org.apache.storm.shade.org.apache.zookeeper.server.ServerCnxn$EndOfStreamException: Unable to read additional data from client sessionid 0x1541437f2a0000a, likely client has closed socket
at org.apache.storm.shade.org.apache.zookeeper.server.NIOServerCnxn.doIO(NIOServerCnxn.java:228) [storm-core-1.0.0.jar:1.0.0]
at org.apache.storm.shade.org.apache.zookeeper.server.NIOServerCnxnFactory.run(NIOServerCnxnFactory.java:208) [storm-core-1.0.0.jar:1.0.0]
at java.lang.Thread.run(Thread.java:745) [?:1.7.0_67]
35985 [Thread-10] INFO  o.a.s.event - Event manager interrupted

我的拓扑类:

package com.storm.MobileCallLogAnalyzer;

import org.apache.storm.tuple.Fields;
import org.apache.storm.tuple.Values;

//import storm configuration packages
import org.apache.storm.Config;
import org.apache.storm.LocalCluster;
import org.apache.storm.StormSubmitter;
import org.apache.storm.topology.TopologyBuilder;

//Create main class LogAnalyserStorm submit topology.
public class LogAnalyserStorm {
   public static void main(String[] args) throws Exception{
      //Create Config instance for cluster configuration
      Config config = new Config();
      config.setDebug(true);

      //Creating Topology
      TopologyBuilder builder = new TopologyBuilder();
       builder.setSpout("call-log-reader-spout", new FakeCallLogReaderSpout());

      builder.setBolt("call-log-creator-bolt", new CallLogCreatorBolt())
         .shuffleGrouping("call-log-reader-spout");

      builder.setBolt("call-log-counter-bolt", new CallLogCounterBolt())
         .fieldsGrouping("call-log-creator-bolt", new Fields("call"));

      LocalCluster cluster = new LocalCluster();
      cluster.submitTopology("LogAnalyserStorm", config, builder.createTopology());
      Thread.sleep(10000);

      //Stop the topology
      cluster.shutdown();
   }
 }

我正在虚拟机环境cloudera(cloudera.quickstart)上工作,所以不知道这是否是由于安装Zookeeper而引起的.有什么主意吗?

I'm working on the virtual machine environment cloudera ( cloudera.quickstart ) so do not know if it is due to the installation of Zookeeper. Any idea?

推荐答案

30736 [NIOServerCxn.Factory:0.0.0.0/0.0.0.0:2000] WARN  o.a.s.s.o.a.z.s.NIOServerCnxn - caught end of stream exception
org.apache.storm.shade.org.apache.zookeeper.server.ServerCnxn$EndOfStreamException: Unable to read additional data from client sessionid 0x1541468b5e7000d, likely client has closed socket
at org.apache.storm.shade.org.apache.zookeeper.server.NIOServerCnxn.doIO(NIOServerCnxn.java:228) [storm-core-1.0.0.jar:1.0.0]
at org.apache.storm.shade.org.apache.zookeeper.server.NIOServerCnxnFactory.run(NIOServerCnxnFactory.java:208) [storm-core-1.0.0.jar:1.0.0]
at java.lang.Thread.run(Thread.java:745) [?:1.7.0_67]
30914 [NIOServerCxn.Factory:0.0.0.0/0.0.0.0:2000] INFO  o.a.s.s.o.a.z.s.NIOServerCnxn - Closed socket connection for client /127.0.0.1:52175 which had sessionid 0x1541468b5e7000d

使用本地群集模式,看来本地风暴实例无法连接到嵌入式ZooKeeper实例.

That seems that the local storm instance is unable to connect to the embedded ZooKeeper instance, whe using local-cluster mode.

请参见 https://groups.google.com/forum/# !topic/storm-user/fLB9KCTeWX0

也许,这会对您有所帮助!

Maybe, this will help you!

这篇关于风暴创造拓扑的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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