I dont know what snippet to provide. But here is how I create my topology
busing the topology builder.

public static StormTopology buildTopology() {
        TopologyBuilder builder = new TopologyBuilder();

        spout_parallelism_hint = 2;
        bolt_parallelism_hint = 2;

        KafkaSpout mySpout = new
KafkaSpout(getSpoutConfig(propMap.get(myTopic), "testId"));

        builder.setSpout(mySpout, testSpout, spout_parallelism_hint);
        builder.setBolt("testBolt", new TestBolt(),
bolt_parallelism_hint).shuffleGrouping(mySpout);

        return builder.createTopology();
    }

private static SpoutConfig getSpoutConfig(String topic, String id) {
        BrokerHosts zkHosts = new
ZkHosts(propMap.get(StreamConfig.ZOOKEEPER_SERVER_HOSTS));
        SpoutConfig kafkaConfig = new SpoutConfig(zkHosts, topic,
propMap.get(StreamConfig.ZK_ROOT), id);
        kafkaConfig.scheme = new RawMultiScheme();

        return kafkaConfig;
    }

TestBolt is a BaseBasicBolt.I only have one bolt.

Thanks for any help.



--
Kushan Maskey
817.403.7500
Precocity LLC <http://precocity.com>
M. Miller & Associates <http://mmillerassociates.com/>
[email protected]

On Tue, Jun 2, 2015 at 2:01 PM, Giri <[email protected]> wrote:

> I think it could be problem with your env where spout is running...
> please check you have Kafka jars in your classpath in the slave nodes ...
> ------------------------------
> From: Kushan Maskey <[email protected]>
> Sent: ‎02-‎06-‎2015 23:29
> To: user <[email protected]>
> Subject: Storm not reading message from kafka serve on a server
>
> I have deployed many topologies on our servers, prod and test clusters. I
> have a topology that i just created which runs perfectly fine locally. When
> I deploy it on the server, it does not read messages from kafka topics. I
> see no exceptions or error of any sorts. Can anyone please suggest what I
> should try, to get this thing running on a cluster?
>
> Thanks
> --
> Kushan Maskey
>

Reply via email to