Package com.alipay.bluewhale.core.utils

Examples of com.alipay.bluewhale.core.utils.AsyncLoopThread


        }
    }
   
    private AsyncLoopThread clearThread()
    {
       return  new AsyncLoopThread(new clearThreadcall());
    }
View Full Code Here


    IConnection puller = mqContext.bind(topologyid, taskid);

    // ���������߳�
    TaskHeartbeatRunable hb = new TaskHeartbeatRunable(zkCluster, topologyid,
        taskid, uptime, taskStats, active, stormConf);
    AsyncLoopThread heartbeat_thread = new AsyncLoopThread(hb, true,
        Thread.MAX_PRIORITY, true);

    // ����tuple���ͺ�������ϵͳstream����startup��Ϣ
    List<Object> msg = new ArrayList<Object>();
    msg.add("startup");

    // ����task���ն���
    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

    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);

    return new VirtualPortShutdown(context, vthread, url);
  }
View Full Code Here

      }
    }

    //FIXME �����̳߳ز���
    // worker���������ĸ��߳�
    AsyncLoopThread refreshconn = new AsyncLoopThread(refreshConn);

    AsyncLoopThread refreshzk = new AsyncLoopThread(refreshZkActive);

    AsyncLoopThread hb = new AsyncLoopThread(heartbeat_fn, false, null,
        Thread.MAX_PRIORITY, true);

    AsyncLoopThread dr = new AsyncLoopThread(new DrainerRunable(transferQueue, nodeportSocket, taskNodeport));

    AsyncLoopThread[] threads = { refreshconn, refreshzk, hb, dr };


    return new WorkerShutdown(shutdowntasks, active, nodeportSocket,
View Full Code Here

   
    //Step 9.1 start heartbeat thread
   
    //����һ���̣߳�ÿ��supervisor.heartbeat.frequency.secsд��һ��supervisor������Ϣ
    AsyncHeartbeat asyncHB = new AsyncHeartbeat(conf, hb, active);
    AsyncLoopThread heartbeat = new AsyncLoopThread(asyncHB, false, null,
        Thread.MAX_PRIORITY, true);
    threads.add(heartbeat);
   
    //Step 9.2 start sync Supervisor thread

    //����һ���̣߳�ÿ��10��ִ��SynchronizeSupervisor
    AsyncSynchronizeSupervisor syncSupervisor = new AsyncSynchronizeSupervisor(
        eventManager, synchronizeSupervisor, active);
    AsyncLoopThread syncsThread = new AsyncLoopThread(syncSupervisor);
    threads.add(syncsThread);


    // Step 9.3 start sync process thread

    //����һ���̣߳�ÿ��supervisor.monitor.frequency.secs��ִ��SyncProcesses
    AsyncSyncProcesses syncProcess = new AsyncSyncProcesses(conf,
        processesEventManager, syncProcesses, active);
    AsyncLoopThread syncpThread = new AsyncLoopThread(syncProcess, false,
        null, Thread.MAX_PRIORITY, true);
    threads.add(syncpThread);

    LOG.info("Starting supervisor with id " + supervisorId + " at host "
        + myHostName);
View Full Code Here

TOP

Related Classes of com.alipay.bluewhale.core.utils.AsyncLoopThread

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.