Storm UI不正确的值和毛细管工具

时间:2015-06-02 15:50:44

标签: apache-kafka apache-storm trident

我对Apache Storm很陌生,并且一直尝试使用Kafka的三叉戟拓扑,即 TransactionalTridentKafkaSpout 。除Storm UI外,一切正常。即使我没有为我的主题生成任何数据,Storm UI仍会显示无效的发送/传输值。这意味着即使主题中没有数据,计数也会继续增加。我已经尝试删除存储在zookeeper,storm,kafka中的数据/日志并重新创建kafka主题并且还设置了

topology.stats.sample.rate: 1.0 

但问题仍然存在。

我还遇到了一个名为Capillary 的工具来监控风暴群。 我使用以下属性

capillary.zookeepers="192.168.125.20:2181"
capillary.kafka.zkroot="192.168.125.20:/home/storm/kafka_2.11-0.8.2.0"
capillary.storm.zkroot="192.168.125.20:/home/storm/apache-storm-0.9.3"

我在这里使用Kafka的嵌入式动物园管理员。 即使这样也无法获得以下异常。

! @6mbg4bp7l - Internal server error, for (GET) [/] ->

play.api.Application$$anon$1: Execution exception[[JsonParseException: Unexpected character ('.' (code 46)): Expected space separating root-level values
 at [Source: java.io.StringReader@24adb083; line: 1, column: 9]]]
        at play.api.Application$class.handleError(Application.scala:296) ~[com.typesafe.play.play_2.10-2.3.4.jar:2.3.4]
        at play.api.DefaultApplication.handleError(Application.scala:402) [com.typesafe.play.play_2.10-2.3.4.jar:2.3.4]
        at play.core.server.netty.PlayDefaultUpstreamHandler$$anonfun$14$$anonfun$apply$1.applyOrElse(PlayDefaultUpstreamHandler.scala:205) [com.typesafe.play.play_2.10-2.3.4.jar:2.3.4]
        at play.core.server.netty.PlayDefaultUpstreamHandler$$anonfun$14$$anonfun$apply$1.applyOrElse(PlayDefaultUpstreamHandler.scala:202) [com.typesafe.play.play_2.10-2.3.4.jar:2.3.4]
        at scala.runtime.AbstractPartialFunction.apply(AbstractPartialFunction.scala:33) [org.scala-lang.scala-library-2.10.4.jar:na]
Caused by: com.fasterxml.jackson.core.JsonParseException: Unexpected character ('.' (code 46)): Expected space separating root-level values
 at [Source: java.io.StringReader@24adb083; line: 1, column: 9]
        at com.fasterxml.jackson.core.JsonParser._constructError(JsonParser.java:1524) ~[com.fasterxml.jackson.core.jackson-core-2.3.2.jar:2.3.2]
        at com.fasterxml.jackson.core.base.ParserMinimalBase._reportError(ParserMinimalBase.java:557) ~[com.fasterxml.jackson.core.jackson-core-2.3.2.jar:2.3.2]
        at com.fasterxml.jackson.core.base.ParserMinimalBase._reportUnexpectedChar(ParserMinimalBase.java:475) ~[com.fasterxml.jackson.core.jackson-core-2.3.2.jar:2.3.2]
        at com.fasterxml.jackson.core.base.ParserMinimalBase._reportMissingRootWS(ParserMinimalBase.java:495) ~[com.fasterxml.jackson.core.jackson-core-2.3.2.jar:2.3.2]
        at com.fasterxml.jackson.core.json.ReaderBasedJsonParser._verifyRootSpace(ReaderBasedJsonParser.java:1178) ~[com.fasterxml.jackson.core.jackson-core-2.3.2.jar:2.3.2]

对任何一方的任何帮助都会很棒。提前致谢。

配置和源代码段:

 final Config config = new Config();
    config.put(Config.TOPOLOGY_TRIDENT_BATCH_EMIT_INTERVAL_MILLIS, 3000);
    config.setNumWorkers(2);
    config.put(Config.NIMBUS_HOST, "192.168.125.20");
    config.put(Config.NIMBUS_THRIFT_PORT, 6627);
    config.put(Config.STORM_ZOOKEEPER_PORT, 2181);
    config.put(Config.STORM_ZOOKEEPER_SERVERS, Arrays.asList("192.168.125.20"));
    config.put(Config.TOPOLOGY_EXECUTOR_RECEIVE_BUFFER_SIZE, 16384);
    config.put(Config.TOPOLOGY_ACKER_EXECUTORS, 1);
    config.put(Config.TOPOLOGY_MAX_SPOUT_PENDING, 10);
    config.put(Config.DRPC_SERVERS, Arrays.asList("192.168.125.20"));
    config.put(Config.DRPC_PORT, 3772);

final BrokerHosts zkHosts = new ZkHosts("192.168.125.20");
final TridentKafkaConfig kafkaConfig = new TridentKafkaConfig(zkHosts, "Test_Topic", "");
kafkaConfig.scheme = new SchemeAsMultiScheme(new StringScheme());
kafkaConfig.bufferSizeBytes = 1024 * 1024 * 4;
kafkaConfig.fetchSizeBytes = 1024 * 1024 * 4;
kafkaConfig.forceFromStart = false;

final TransactionalTridentKafkaSpout kafkaSpout = new TransactionalTridentKafkaSpout(kafkaConfig);
final TridentTopology topology = new TridentTopology();
topology.newStream("spout", kafkaSpout)
       .each(new Fields("str"), new TestFunction(), new Fields("test"))
       .each(new Fields("str"), new PrintFilter());

拓扑摘要图片: Topology Stats

1 个答案:

答案 0 :(得分:2)

您是否可能会看到我称之为UI metric artifacts of Trident的内容?这些元组也出现在Storm UI的计数器中:

  

Trident每500毫秒执行一次批处理(默认情况下)。一批涉及一堆   协调消息发送到所有螺栓以协调批次   (即使批次为空)。这就是你所看到的。

     

(来源:Trident Kafka Spout - Ack Count Increasing Even Though No Messages Are Processed