Github user srdo commented on a diff in the pull request:

    https://github.com/apache/storm/pull/2243#discussion_r130449657
  
    --- Diff: 
examples/storm-kafka-client-examples/src/main/java/org/apache/storm/kafka/spout/test/KafkaSpoutTopologyMainNamedTopics.java
 ---
    @@ -0,0 +1,103 @@
    +/*
    + * Licensed to the Apache Software Foundation (ASF) under one
    + *   or more contributor license agreements.  See the NOTICE file
    + *   distributed with this work for additional information
    + *   regarding copyright ownership.  The ASF licenses this file
    + *   to you under the Apache License, Version 2.0 (the
    + *   "License"); you may not use this file except in compliance
    + *   with the License.  You may obtain a copy of the License at
    + *
    + *   http://www.apache.org/licenses/LICENSE-2.0
    + *
    + *   Unless required by applicable law or agreed to in writing, software
    + *   distributed under the License is distributed on an "AS IS" BASIS,
    + *   WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or 
implied.
    + *   See the License for the specific language governing permissions and
    + *   limitations under the License.
    + */
    +
    +package org.apache.storm.kafka.spout.test;
    +
    +import static 
org.apache.storm.kafka.spout.KafkaSpoutConfig.FirstPollOffsetStrategy.EARLIEST;
    +
    +import org.apache.kafka.clients.consumer.ConsumerConfig;
    +import org.apache.storm.Config;
    +import org.apache.storm.StormSubmitter;
    +import org.apache.storm.generated.StormTopology;
    +import org.apache.storm.kafka.spout.ByTopicRecordTranslator;
    +import org.apache.storm.kafka.spout.KafkaSpout;
    +import org.apache.storm.kafka.spout.KafkaSpoutConfig;
    +import org.apache.storm.kafka.spout.KafkaSpoutRetryExponentialBackoff;
    +import 
org.apache.storm.kafka.spout.KafkaSpoutRetryExponentialBackoff.TimeInterval;
    +import org.apache.storm.kafka.spout.KafkaSpoutRetryService;
    +import org.apache.storm.kafka.trident.KafkaProducerTopology;
    +import org.apache.storm.topology.TopologyBuilder;
    +import org.apache.storm.tuple.Fields;
    +import org.apache.storm.tuple.Values;
    +
    +public class KafkaSpoutTopologyMainNamedTopics {
    +
    +    private static final String TOPIC_2_STREAM = "test_2_stream";
    +    private static final String TOPIC_0_1_STREAM = "test_0_1_stream";
    +    private static final String KAFKA_LOCAL_BROKER = "localhost:9092";
    +    private static final String TOPIC_0 = "kafka-spout-test";
    +    private static final String TOPIC_1 = "kafka-spout-test-1";
    +    private static final String TOPIC_2 = "kafka-spout-test-2";
    +
    +    public static void main(String[] args) throws Exception {
    +        new KafkaSpoutTopologyMainNamedTopics().runMain(args);
    +    }
    +
    +    protected void runMain(String[] args) throws Exception {
    --- End diff --
    
    I remembered why I removed it. LocalCluster is in the storm-server jar, 
which isn't included by the example projects. I think including it would cause 
conflict when the jar is deployed to a real cluster. How about I move the 
ability to run this from a local cluster to a test class? That should still 
leave people able to run on a local cluster from an IDE, but doesn't interfere 
with the generated jar.


---
If your project is set up for it, you can reply to this email and have your
reply appear on GitHub as well. If your project does not have this feature
enabled and wishes so, or if the feature is enabled but not working, please
contact infrastructure at infrastruct...@apache.org or file a JIRA ticket
with INFRA.
---

Reply via email to