Examples of UpgradeCommand


Examples of com.cloud.agent.api.UpgradeCommand

                    if (cmd instanceof CronCommand) {
                        final CronCommand watch = (CronCommand) cmd;
                        scheduleWatch(link, request, watch.getInterval() * 1000, watch.getInterval() * 1000);
                        answer = new Answer(cmd, true, null);
                    } else if (cmd instanceof UpgradeCommand) {
                        final UpgradeCommand upgrade = (UpgradeCommand) cmd;
                        answer = upgradeAgent(upgrade.getUpgradeUrl(), upgrade);
                    } else if (cmd instanceof ShutdownCommand) {
                        ShutdownCommand shutdown = (ShutdownCommand) cmd;
                        s_logger.debug("Received shutdownCommand, due to: " + shutdown.getReason());
                        cancelTasks();
                        _reconnectAllowed = false;
View Full Code Here

Examples of com.cloud.agent.api.UpgradeCommand

                    if (cmd instanceof CronCommand) {
                        final CronCommand watch = (CronCommand) cmd;
                        scheduleWatch(link, request, watch.getInterval() * 1000, watch.getInterval() * 1000);
                        answer = new Answer(cmd, true, null);
                    } else if (cmd instanceof UpgradeCommand) {
                        final UpgradeCommand upgrade = (UpgradeCommand) cmd;
                        answer = upgradeAgent(upgrade.getUpgradeUrl(), upgrade);
                    } else if (cmd instanceof ShutdownCommand) {
                        ShutdownCommand shutdown = (ShutdownCommand) cmd;
                        s_logger.debug("Received shutdownCommand, due to: " + shutdown.getReason());
                        cancelTasks();
                        _reconnectAllowed = false;
View Full Code Here

Examples of org.apache.hadoop.hdfs.server.protocol.UpgradeCommand

    }
    UpgradeObjectNamenode curUO = (UpgradeObjectNamenode)currentUpgrades.first();
    if(command.getVersion() != curUO.getVersion())
      throw new IncorrectVersionException(command.getVersion(),
          "UpgradeCommand", curUO.getVersion());
    UpgradeCommand reply = curUO.processUpgradeCommand(command);
    if(curUO.getUpgradeStatus() < 100) {
      return reply;
    }
    // current upgrade is done
    curUO.completeUpgrade();
View Full Code Here

Examples of org.apache.hadoop.hdfs.server.protocol.UpgradeCommand

   * Data-nodes finish upgrade at different times.
   * The data-node needs to re-confirm with the name-node that the upgrade
   * is complete while other nodes are still upgrading.
   */
  public UpgradeCommand completeUpgrade() throws IOException {
    return new UpgradeCommand(UpgradeCommand.UC_ACTION_REPORT_STATUS,
                              getVersion(), (short)100);
  }
View Full Code Here

Examples of org.apache.hadoop.hdfs.server.protocol.UpgradeCommand

      action = UpgradeCommand.UC_ACTION_REPORT_STATUS;
      break;
    case START_UPGRADE:
      action = UpgradeCommand.UC_ACTION_START_UPGRADE;
    }
    return new UpgradeCommand(action, upgradeCmd.getVersion(),
        (short) upgradeCmd.getUpgradeStatus());
  }
View Full Code Here

Examples of org.apache.hadoop.hdfs.server.protocol.UpgradeCommand

  }

  @Override
  public ProcessUpgradeResponseProto processUpgrade(RpcController controller,
      ProcessUpgradeRequestProto request) throws ServiceException {
    UpgradeCommand ret;
    try {
      UpgradeCommand cmd = request.hasCmd() ? PBHelper
          .convert(request.getCmd()) : null;
      ret = impl.processUpgradeCommand(cmd);
    } catch (IOException e) {
      throw new ServiceException(e);
    }
View Full Code Here

Examples of org.apache.hadoop.hdfs.server.protocol.UpgradeCommand

   * Data-nodes finish upgrade at different times.
   * The data-node needs to re-confirm with the name-node that the upgrade
   * is complete while other nodes are still upgrading.
   */
  public UpgradeCommand completeUpgrade() throws IOException {
    return new UpgradeCommand(UpgradeCommand.UC_ACTION_REPORT_STATUS,
                              getVersion(), (short)100);
  }
View Full Code Here

Examples of org.apache.hadoop.hdfs.server.protocol.UpgradeCommand

  }

  public void doUpgrade() throws IOException {
    this.status = (short)100;
    getDatanode().namenode.processUpgradeCommand(
        new UpgradeCommand(UpgradeCommand.UC_ACTION_REPORT_STATUS,
            getVersion(), getUpgradeStatus()));
  }
View Full Code Here

Examples of org.apache.hadoop.hdfs.server.protocol.UpgradeCommand

    }
    UpgradeObjectNamenode curUO = (UpgradeObjectNamenode)currentUpgrades.first();
    if(command.getVersion() != curUO.getVersion())
      throw new IncorrectVersionException(command.getVersion(),
          "UpgradeCommand", curUO.getVersion());
    UpgradeCommand reply = curUO.processUpgradeCommand(command);
    if(curUO.getUpgradeStatus() < 100) {
      return reply;
    }
    // current upgrade is done
    curUO.completeUpgrade();
View Full Code Here

Examples of org.apache.hadoop.hdfs.server.protocol.UpgradeCommand

  public void doUpgrade() throws IOException {
    this.status = (short)100;
    DatanodeProtocol nn = getNamenode();
    nn.processUpgradeCommand(
        new UpgradeCommand(UpgradeCommand.UC_ACTION_REPORT_STATUS,
            getVersion(), getUpgradeStatus()));
  }
View Full Code Here
TOP
Copyright © 2018 www.massapi.com. 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.