Examples of JuggaloaderTopology


Examples of com.streamreduce.storm.topology.JuggaloaderTopology

        if (!(mode.equals(CLUSTER_LOCAL) || mode.equals(CLUSTER_PRODUCTION))) {
            throw new RuntimeException("Unknown cluster type of " + mode);
        }

        JuggaloaderTopology juggaloaderTopology = new JuggaloaderTopology();
        Config config = new Config();
        config.registerSerialization(LinkedHashMap.class);
        config.setFallBackOnJavaSerialization(false);

        if (mode.equals(CLUSTER_LOCAL)) {
            config.setDebug(true);
            LocalCluster cluster = new LocalCluster();
            cluster.submitTopology(TOPOLOGY_NAME, config, juggaloaderTopology.createJuggaloaderTopology());
            logger.info("Start Storm Local Cluster");
        }

        if (mode.equals(CLUSTER_PRODUCTION)) {
            config.setNumAckers(5);
            try {
                StormSubmitter.submitTopology(TOPOLOGY_NAME, config, juggaloaderTopology.createJuggaloaderTopology());
            } catch (AlreadyAliveException | InvalidTopologyException e) {
                logger.error(e.getMessage(), e);
            }
            logger.info("Start Storm Production Cluster");
        }
View Full Code Here
TOP
Copyright © 2018 www.massapi.com. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.