Package backtype.storm.generated

Examples of backtype.storm.generated.NotAliveException


  public static <T> void transitionName(NimbusData data, String topologyName,
    boolean errorOnNoTransition, StatusType transition_status, T... args) throws NotAliveException {
      StormClusterState stormClusterState = data.getStormClusterState();
      String topologyId = Common.get_storm_id(stormClusterState, topologyName);
      if (topologyId == null){
    throw new NotAliveException(topologyName);
      }
      transition(data, topologyId, errorOnNoTransition, transition_status, args);
  }
View Full Code Here


   */
  public void checkTopologyActive(NimbusData nimbus, String topologyName,
      boolean bActive) throws NotAliveException, AlreadyAliveException {
    if (isTopologyActive(nimbus.getStormClusterState(), topologyName) == !bActive) {
      if (bActive) {
        throw new NotAliveException(topologyName + " is not alive");
      } else {
        throw new AlreadyAliveException(topologyName
            + " is already active");
      }
    }
View Full Code Here

      T... args) throws Exception {
    StormClusterState stormClusterState = data.getStormClusterState();
    String topologyId = Cluster.get_topology_id(stormClusterState,
        topologyName);
    if (topologyId == null) {
      throw new NotAliveException(topologyName);
    }
    transition(data, topologyId, errorOnNoTransition, transition_status,
        args);
  }
View Full Code Here

          StatusType.kill, wait_amt);
    } catch (NotAliveException e) {
      String errMsg = "KillTopology Error, no this topology "
          + topologyName;
      LOG.error(errMsg, e);
      throw new NotAliveException(errMsg);
    } catch (Exception e) {
      String errMsg = "Failed to kill topology " + topologyName;
      LOG.error(errMsg, e);
      throw new TException(errMsg);
    }
View Full Code Here

      NimbusUtils.transitionName(data, topologyName, true,
          StatusType.activate);
    } catch (NotAliveException e) {
      String errMsg = "Activate Error, no this topology " + topologyName;
      LOG.error(errMsg, e);
      throw new NotAliveException(errMsg);
    } catch (Exception e) {
      String errMsg = "Failed to active topology " + topologyName;
      LOG.error(errMsg, e);
      throw new TException(errMsg);
    }
View Full Code Here

          StatusType.inactivate);
    } catch (NotAliveException e) {
      String errMsg = "Deactivate Error, no this topology "
          + topologyName;
      LOG.error(errMsg, e);
      throw new NotAliveException(errMsg);
    } catch (Exception e) {
      String errMsg = "Failed to deactivate topology " + topologyName;
      LOG.error(errMsg, e);
      throw new TException(errMsg);
    }
View Full Code Here

      NimbusUtils.transitionName(data, topologyName, true,
          StatusType.rebalance, wait_amt);
    } catch (NotAliveException e) {
      String errMsg = "Rebalance Error, no this topology " + topologyName;
      LOG.error(errMsg, e);
      throw new NotAliveException(errMsg);
    } catch (Exception e) {
      String errMsg = "Failed to rebalance topology " + topologyName;
      LOG.error(errMsg, e);
      throw new TException(errMsg);
    }
View Full Code Here

    try {

      // get topology's StormBase
      StormBase base = stormClusterState.storm_base(topologyId, null);
      if (base == null) {
        throw new NotAliveException("No topology of " + topologyId);
      }
      topologyInfo.set_id(topologyId);
      topologyInfo.set_name(base.getStormName());
      topologyInfo.set_uptime_secs(TimeUtils.time_delta(base
          .getLanchTimeSecs()));
View Full Code Here

   */
  public void checkTopologyActive(NimbusData nimbus, String topologyName,
      boolean bActive) throws Exception {
    if (isTopologyActive(nimbus.getStormClusterState(), topologyName) != bActive) {
      if (bActive) {
        throw new NotAliveException(topologyName + " is not alive");
      } else {
        throw new AlreadyAliveException(topologyName
            + " is already active");
      }
    }
View Full Code Here

    try {
        String topologyId = Cluster.get_topology_id(clusterState, topologyName);
        if (null != topologyId) {
          NimbusUtils.updateMetricMonitorStatus(clusterState, topologyId, isEnable);
        } else {
          throw new NotAliveException("Failed to update metricsMonitor status as " + topologyName + " is not alive");
        }
    } catch(Exception e) {
      String errMsg = "Failed to update metricsMonitor " + topologyName;
      LOG.error(errMsg, e);
      throw new TException(e);
View Full Code Here

TOP

Related Classes of backtype.storm.generated.NotAliveException

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.