Package backtype.storm.utils

Examples of backtype.storm.utils.DisruptorQueue


        storm_conf.get(Config.TOPOLOGY_EXECUTOR_RECEIVE_BUFFER_SIZE),
        256);
    WaitStrategy waitStrategy = (WaitStrategy) Utils
        .newInstance((String) storm_conf
            .get(Config.TOPOLOGY_DISRUPTOR_WAIT_STRATEGY));
    this.exeQueue = new DisruptorQueue(idStr, ProducerType.MULTI,
        queue_size, waitStrategy);
    this.exeQueue.consumerStarted();

    this.registerInnerTransfer(exeQueue);
View Full Code Here


   
  }

  protected void registerInnerTransfer(DisruptorQueue disruptorQueue) {
    LOG.info("Registor inner transfer for executor thread of " + idStr);
    DisruptorQueue existInnerTransfer = innerTaskTransfer.get(taskId);
    if (existInnerTransfer != null) {
      LOG.info("Exist inner task transfer for executing thread of "
          + idStr);
      if (existInnerTransfer != disruptorQueue) {
        throw new RuntimeException(
View Full Code Here

      LOG.info("Start TimeTick");
    }
   
    for (Entry<String, DisruptorQueue> entry: queues.entrySet()) {
      String name = entry.getKey();
      DisruptorQueue queue = entry.getValue();
      Tick tick = new Tick(name);
      queue.publish(tick);
      LOG.debug("Issue time tick " + name);
    }
   
  }
View Full Code Here

        stormConf.get(Config.TOPOLOGY_EXECUTOR_RECEIVE_BUFFER_SIZE), 256);
   
    WaitStrategy waitStrategy = (WaitStrategy) Utils
        .newInstance((String) stormConf
            .get(Config.TOPOLOGY_DISRUPTOR_WAIT_STRATEGY));
    DisruptorQueue queue = new DisruptorQueue("TaskDeserialize", ProducerType.SINGLE,
        queueSize, waitStrategy);

    deserializeQueues.put(taskid, queue);

    return queue;
View Full Code Here

  }

  public TaskShutdownDameon execute() throws Exception {
    setComponentType();

    DisruptorQueue deserializeQueue = registerDisruptorQueue();

    TaskSendTargets sendTargets = echoToSystemBolt();

    // create thread to get tuple from zeroMQ,
    // and pass the tuple to bolt/spout
View Full Code Here

    int queue_size = Utils.getInt(
        stormConf.get(Config.TOPOLOGY_TRANSFER_BUFFER_SIZE), 1024);
    WaitStrategy waitStrategy = (WaitStrategy) Utils
        .newInstance((String) stormConf
            .get(Config.TOPOLOGY_DISRUPTOR_WAIT_STRATEGY));
    DisruptorQueue recvQueue = new DisruptorQueue("Dispatch", ProducerType.MULTI,
        queue_size, waitStrategy);
    // stop  consumerStarted
    //recvQueue.consumerStarted();

    IContext context = workerData.getContext();
View Full Code Here

    int queue_size = Utils.getInt(storm_conf
        .get(Config.TOPOLOGY_EXECUTOR_SEND_BUFFER_SIZE));
    WaitStrategy waitStrategy = (WaitStrategy) Utils
        .newInstance((String) storm_conf
            .get(Config.TOPOLOGY_DISRUPTOR_WAIT_STRATEGY));
    this.serializeQueue = new DisruptorQueue(taskName, ProducerType.MULTI,
        queue_size, waitStrategy);
    this.serializeQueue.consumerStarted();
   
    String taskId = taskName.substring(taskName.indexOf(":") + 1);
    Metrics.registerQueue(taskName, MetricDef.SERIALIZE_QUEUE, serializeQueue, taskId, Metrics.MetricType.TASK);
View Full Code Here

  public void transfer(TupleExt tuple) {

    int taskid = tuple.getTargetTaskId();

    DisruptorQueue exeQueue = innerTaskTransfer.get(taskid);
    if (exeQueue != null) {
      exeQueue.publish(tuple);
    } else {
      serializeQueue.publish(tuple);
    }

  }
View Full Code Here

      throws Exception {
    TaskMessage message = (TaskMessage) event;

    int task = message.task();

    DisruptorQueue queue = deserializeQueues.get(task);
    if (queue == null) {
      LOG.warn("Received invalid message directed at port " + task
          + ". Dropping...");
      return;
    }

    queue.publish(message.message());

  }
View Full Code Here

    WaitStrategy waitStrategy = (WaitStrategy) Utils
        .newInstance((String) storm_conf
            .get(Config.TOPOLOGY_DISRUPTOR_WAIT_STRATEGY));

    disruptorQueue = new DisruptorQueue(name, ProducerType.MULTI,
        MAX_SEND_PENDING * 8, waitStrategy);

    Metrics.registerQueue(address, MetricDef.NETTY_CLI_SYNC_DISR_QUEUE, disruptorQueue,
        null, Metrics.MetricType.WORKER);

View Full Code Here

TOP

Related Classes of backtype.storm.utils.DisruptorQueue

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.