Examples of StageException


Examples of org.apache.helix.controller.pipeline.StageException

        if (currentState.getStateModelDefRef() == null) {
          LOG.error("state model def is null." + "resource:" + currentState.getResourceId()
              + ", partitions: " + currentState.getPartitionStateMap().keySet() + ", states: "
              + currentState.getPartitionStateMap().values());
          throw new StageException("State model def is null for resource:"
              + currentState.getResourceId());
        }

        if (!idealStateMap.containsKey(resourceId)) {
          IdealState idealState = new IdealState(resourceId);
View Full Code Here

Examples of org.apache.helix.controller.pipeline.StageException

    ClusterDataCache cache = event.getAttribute("ClusterDataCache");
    Map<ParticipantId, Participant> liveParticipantMap = cluster.getLiveParticipantMap();

    if (manager == null || resourceMap == null || messageOutput == null || cluster == null
        || cache == null || liveParticipantMap == null) {
      throw new StageException(
          "Missing attributes in event:"
              + event
              + ". Requires HelixManager|RESOURCES|MESSAGES_THROTTLE|BEST_POSSIBLE_STATE|Cluster|DataCache|liveInstanceMap");
    }
View Full Code Here

Examples of org.apache.helix.controller.pipeline.StageException

    BestPossibleStateOutput bestPossibleStateOutput =
        event.getAttribute(AttributeName.BEST_POSSIBLE_STATE.toString());
    MessageOutput messageGenOutput = event.getAttribute(AttributeName.MESSAGES_ALL.toString());
    if (cluster == null || resourceMap == null || currentStateOutput == null
        || messageGenOutput == null || bestPossibleStateOutput == null) {
      throw new StageException("Missing attributes in event:" + event
          + ". Requires Cluster|RESOURCES|CURRENT_STATE|BEST_POSSIBLE_STATE|MESSAGES_ALL");
    }

    MessageOutput output = new MessageOutput();
View Full Code Here

Examples of org.apache.helix.controller.pipeline.StageException

  @Override
  public void process(ClusterEvent event) throws Exception {
    Cluster cluster = event.getAttribute("Cluster");
    if (cluster == null) {
      throw new StageException("Missing attributes in event:" + event + ". Requires Cluster");
    }
    Map<ResourceId, ResourceConfig> resourceConfigMap =
        event.getAttribute(AttributeName.RESOURCES.toString());
    if (resourceConfigMap == null) {
      throw new StageException("Resources must be computed prior to validation!");
    }
    Map<ResourceId, Resource> resourceMap = cluster.getResourceMap();
    Map<String, Map<String, String>> idealStateRuleMap =
        event.getAttribute(AttributeName.IDEAL_STATE_RULES.toString());
View Full Code Here

Examples of org.apache.helix.controller.pipeline.StageException

    long startTime = System.currentTimeMillis();
    LOG.info("START ReadClusterDataStage.process()");

    HelixManager manager = event.getAttribute("helixmanager");
    if (manager == null) {
      throw new StageException("HelixManager attribute value is null");
    }
    HelixDataAccessor accessor = manager.getHelixDataAccessor();

    ClusterDataCache cache = event.getAttribute("ClusterDataCache");
    if (cache == null && _cache == null) {
View Full Code Here

Examples of org.apache.helix.controller.pipeline.StageException

    Cluster cluster = event.getAttribute("Cluster");
    Map<ResourceId, ResourceConfig> resourceMap =
        event.getAttribute(AttributeName.RESOURCES.toString());

    if (cluster == null || resourceMap == null) {
      throw new StageException("Missing attributes in event:" + event
          + ". Requires Cluster|RESOURCE");
    }

    ResourceCurrentState currentStateOutput = new ResourceCurrentState();
View Full Code Here

Examples of org.apache.helix.controller.pipeline.StageException

    BestPossibleStateOutput bestPossibleStateOutput =
        event.getAttribute(AttributeName.BEST_POSSIBLE_STATE.toString());

    if (cluster == null || resourceMap == null || msgSelectionOutput == null
        || bestPossibleStateOutput == null) {
      throw new StageException("Missing attributes in event: " + event
          + ". Requires Cluster|RESOURCES|BEST_POSSIBLE_STATE|MESSAGES_SELECTED");
    }

    MessageOutput output = new MessageOutput();
View Full Code Here

Examples of org.apache.helix.controller.pipeline.StageException

        event.getAttribute(AttributeName.CURRENT_STATE.toString());
    BestPossibleStateOutput bestPossibleStateOutput =
        event.getAttribute(AttributeName.BEST_POSSIBLE_STATE.toString());
    if (manager == null || cluster == null || resourceMap == null || currentStateOutput == null
        || bestPossibleStateOutput == null) {
      throw new StageException("Missing attributes in event:" + event
          + ". Requires HelixManager|Cluster|RESOURCES|CURRENT_STATE|BEST_POSSIBLE_STATE");
    }

    MessageOutput output = new MessageOutput();
View Full Code Here

Examples of org.apache.helix.controller.pipeline.StageException

        event.getAttribute(AttributeName.RESOURCES.toString());
    Cluster cluster = event.getAttribute("Cluster");
    ClusterDataCache cache = event.getAttribute("ClusterDataCache");

    if (manager == null || resourceMap == null || cluster == null || cache == null) {
      throw new StageException("Missing attributes in event:" + event
          + ". Requires ClusterManager|RESOURCES|Cluster|ClusterDataCache");
    }

    HelixDataAccessor dataAccessor = manager.getHelixDataAccessor();
    PropertyKey.Builder keyBuilder = dataAccessor.keyBuilder();
View Full Code Here

Examples of org.apache.helix.controller.pipeline.StageException

  @Override
  public void process(ClusterEvent event) throws Exception {
    HelixManager manager = event.getAttribute("helixmanager");
    Cluster cluster = event.getAttribute("Cluster");
    if (manager == null || cluster == null) {
      throw new StageException("Missing attributes in event:" + event
          + ". Requires HelixManager | Cluster");
    }

    HelixManagerProperties properties = manager.getProperties();
    // Map<String, LiveInstance> liveInstanceMap = cache.getLiveInstances();
    Map<ParticipantId, Participant> liveParticipants = cluster.getLiveParticipantMap();
    for (Participant liveParticipant : liveParticipants.values()) {
      String participantVersion = liveParticipant.getLiveInstance().getHelixVersion();
      if (!properties.isParticipantCompatible(participantVersion)) {
        String errorMsg =
            "incompatible participant. pipeline will not continue. " + "controller: "
                + manager.getInstanceName() + ", controllerVersion: " + properties.getVersion()
                + ", minimumSupportedParticipantVersion: "
                + properties.getProperty("minimum_supported_version.participant")
                + ", participant: " + liveParticipant.getId() + ", participantVersion: "
                + participantVersion;
        LOG.error(errorMsg);
        throw new StageException(errorMsg);
      }
    }
  }
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.