Package com.taobao.zeus.socket.protocol.Protocol

Examples of com.taobao.zeus.socket.protocol.Protocol.ManualMessage


    // 向channel 发送执行job命令
    // 等待worker响应
    // 响应OK 则添加监听器,继续等待任务完成的消息
    // 响应失败,返回失败退出码
    holder.getManualRunnings().put(historyId,false);
    ManualMessage mm=ManualMessage.newBuilder().setHistoryId(historyId).build();
    final Request req=Request.newBuilder().setRid(AtomicIncrease.getAndIncrement()).setOperate(Operate.Manual)
      .setBody(mm.toByteString()).build();
    SocketMessage sm=SocketMessage.newBuilder().setKind(Kind.REQUEST).setBody(req.toByteString()).build();
    Future<Response> f=context.getThreadPool().submit(new Callable<Response>() {
      private Response response;
      public Response call() throws Exception {
        final CountDownLatch latch=new CountDownLatch(1);
View Full Code Here


    return null;
  }

  public Future<Response> manual(final WorkerContext context,
      final Request req) {
    ManualMessage mm = null;
    try {
      mm = ManualMessage.newBuilder().mergeFrom(req.getBody()).build();
    } catch (InvalidProtocolBufferException e1) {
    }
    SocketLog.info("receive master to worker manual request,rid="
        + req.getRid() + ",historyId=" + mm.getHistoryId());
    final String historyId = mm.getHistoryId();
    final JobHistory history = context.getJobHistoryManager()
        .findJobHistory(historyId);
    Future<Response> f = context.getThreadPool().submit(
        new Callable<Response>() {
          public Response call() throws Exception {
View Full Code Here

TOP

Related Classes of com.taobao.zeus.socket.protocol.Protocol.ManualMessage

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.