Package trident.kafka.KafkaConfig

Examples of trident.kafka.KafkaConfig.StaticHosts


    public Fields getOutputFields() {
        return _config.scheme.getOutputFields();
    }
   
    private int computeNumPartitions() {
        StaticHosts hosts =  _config.hosts;
        return hosts.hosts.size() * hosts.partitionsPerHost;     
    }
View Full Code Here


        StaticPartitionConnections _connections;
        int partitionsPerHost;
       
        public Emitter() {
            _connections = new StaticPartitionConnections(_config);
            StaticHosts hosts = (StaticHosts) _config.hosts;
            partitionsPerHost = hosts.partitionsPerHost;           
        }
View Full Code Here

            }
        }

       
        public long numPartitions() {
            StaticHosts hosts = (StaticHosts) _config.hosts;
            return hosts.hosts.size() * hosts.partitionsPerHost;
        }
View Full Code Here

public class KafkaUtils {
   
   
     public static Map emitPartitionBatchNew(KafkaConfig config, int partition, SimpleConsumer consumer, TransactionAttempt attempt, TridentCollector collector, Map lastMeta, String topologyInstanceId) {
         StaticHosts hosts = config.hosts;
         long offset;
         if(lastMeta!=null) {
             if(config.forceFromStart && !topologyInstanceId.equals(lastMeta.get("instanceId"))) {
                 offset = consumer.getOffsetsBefore(config.topic, partition % hosts.partitionsPerHost, config.startOffsetTime, 1)[0];
             } else {
View Full Code Here

TOP

Related Classes of trident.kafka.KafkaConfig.StaticHosts

Copyright © 2018 www.massapicom. 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.