Package com.alipay.bluewhale.core.callback

Examples of com.alipay.bluewhale.core.callback.RunnableCallback


    TaskSendTargets sendTargets = makeSendTargets();
    UnanchoredSend.send(topologyContext, sendTargets, workerTransfer,
        Common.SYSTEM_STREAM_ID, msg);

    // �����̣߳���zeroMq�ж�ȡtuple,����spout��bolt���д���Ȼ���͸�worker
    RunnableCallback componsementExecutor = mkExecutor(puller, sendTargets);
    AsyncLoopThread executor_threads = new AsyncLoopThread(
        componsementExecutor);
    AsyncLoopThread[] all_threads = { executor_threads, heartbeat_thread };

    LOG.info("Finished loading task " + componentid + ":" + taskid);
View Full Code Here


   * @param bucket_sizes
   * @return
   */
  public static RollingWindowSet keyed_counter_rolling_window_set(
      int num_buckets, Integer[] bucket_sizes) {
    RunnableCallback updater = new IncValUpdater();
    RunnableCallback merger = new IncValMerger();

    RunnableCallback extractor = new IncValExtractor();
    return RollingWindowSetStat.rolling_window_set(updater, merger,
        extractor, num_buckets, bucket_sizes);
  }
View Full Code Here

   * @param bucket_sizes
   * @return
   */
  public static RollingWindowSet keyed_avg_rolling_window_set(
      int num_buckets, Integer[] bucket_sizes) {
    RunnableCallback updater = new KeyAvgUpdater();

    RunnableCallback merger = new KeyAvgMerge();

    RunnableCallback extractor = new KeyAvgExtractor();

    return RollingWindowSetStat.rolling_window_set(updater, merger,
        extractor, num_buckets, bucket_sizes);
  }
View Full Code Here

      boolean isScratch) throws IOException {
      LOG.debug("Determining assignment for " + topologyid);
      Map<?, ?> conf = data.getConf();
      StormClusterState stormClusterState = data.getStormClusterState();
      //����zk callback�¼�
      RunnableCallback callback =new TransitionZkCallback(data, topologyid);
      //��ȡ���е�supervisor�ڵ���Ϣ��
      Map<String, SupervisorInfo> supInfos = allSupervisorInfo(stormClusterState, callback);
      //��ȡ<supervisorid,hostname>map���ϣ����磺node->host {"4b83cd41-e863-4bd6-b26d-3e27e5ff7799" "dw-perf-3.alipay.net","b8f1664d-5555-4950-8139-5098fb109a81" "dw-perf-2.alipay.net"}
      Map<String, String> nodeHost = getNodeHost(supInfos);
      //��ȡָ��topologyid��assignment��Ϣ��
View Full Code Here

        }
      }
    }
    Map<Integer, Socket> virtual_mapping = new HashMap<Integer, ZMQ.Socket>();

    RunnableCallback loop_fn = new VirtualPortDispatch(context, socket,
        virtual_mapping, url, valid_ports);

    AsyncLoopThread vthread = new AsyncLoopThread(loop_fn, daemon, kill_fn,
        priority, true);
View Full Code Here

    RefreshActive refreshZkActive = new RefreshActive(active, conf,
        zkCluster, topologyId, zkActive);
    refreshZkActive.run();

    // ���������߳�
    RunnableCallback heartbeat_fn = new WorkerHeartbeatRunable(conf,
        workerId, port, topologyId, new CopyOnWriteArraySet<Integer>(taskids),
        active);
    heartbeat_fn.run();

    // ����worker����tuple�Ļ�����
    LinkedBlockingQueue<TransferData> transferQueue = new LinkedBlockingQueue<TransferData>();

   
View Full Code Here

        this.init(afn, daemon, kill_fn, priority, start);
    }

    public void init(RunnableCallback afn, boolean daemon, int priority,
            boolean start) {
        RunnableCallback kill_fn = new AsyncLoopDefaultKill();
        this.init(afn, daemon, kill_fn, priority, start);
    }
View Full Code Here

   * @param sets
   * @return
   */
  public static List<String> getRepeat(List<String> sets) {

    RunnableCallback fn = new RunnableCallback() {
      @Override
      public <T> Object execute(T... args) {
        int num = (Integer) args[0];
        boolean isFilter = false;
        if (num > 1) {
View Full Code Here

    String msg = "Launching virtual port for supervisor";
    LOG.info(msg + ":" + supervisorId + " stormid:" + stormId + " port:" + port);
   
    try {
      boolean islocal = conf.get(Config.STORM_CLUSTER_MODE).equals("local");
      RunnableCallback killfn = StormUtils.getDefaultKillfn();
      int priority = Thread.NORM_PRIORITY;
      sd = MsgLoader.launchVirtualPort(islocal, mqContext, port, true,killfn, priority, taskIds);

    } catch (InterruptedException e) {
      LOG.error("WorkerVirtualPort->launch_virtual_port error", e);
View Full Code Here

  @Override
  public void run() {
    /**
     * Step 1: create SyncCallback
     */
    RunnableCallback syncCallback = new SyncCallback(this, eventManager);

    /**
     * Step 2: create storm-code map stormid to :master-code-dir
     */
    Map<String, String> stormCodeMap = readStormCodeLocations(
View Full Code Here

TOP

Related Classes of com.alipay.bluewhale.core.callback.RunnableCallback

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.