Package backtype.storm.generated

Examples of backtype.storm.generated.StateSpoutSpec


    static void validate_component(Object obj)
            throws InvalidTopologyException {

        if (obj instanceof StateSpoutSpec) {
            StateSpoutSpec spec = (StateSpoutSpec) obj;
            for (String id : spec.get_common().get_streams().keySet()) {
                if (system_id(id)) {
                    throw new InvalidTopologyException(id
                            + " is not a valid component id");
                }
            }

        }

        if (obj instanceof SpoutSpec) {
            SpoutSpec spec = (SpoutSpec) obj;
            for (String id : spec.get_common().get_streams().keySet()) {
                if (system_id(id)) {
                    throw new InvalidTopologyException(id
                            + " is not a valid component id");
                }
            }
        }
        if (obj instanceof Bolt) {
            Bolt spec = (Bolt) obj;
            for (String id : spec.get_common().get_streams().keySet()) {
                if (system_id(id)) {
                    throw new InvalidTopologyException(id
                            + " is not a valid component id");
                }
            }
View Full Code Here


  }

  static void validate_component_inputs(Object obj)
          throws InvalidTopologyException {
      if (obj instanceof StateSpoutSpec) {
          StateSpoutSpec spec = (StateSpoutSpec) obj;
          if (!spec.get_common().get_inputs().isEmpty()) {
              throw new InvalidTopologyException(
                      "May not declare inputs for a spout");
          }
 
      }
 
      if (obj instanceof SpoutSpec) {
          SpoutSpec spec = (SpoutSpec) obj;
          if (!spec.get_common().get_inputs().isEmpty()) {
              throw new InvalidTopologyException(
                      "May not declare inputs for a spout");
          }
      }
  }
View Full Code Here

  static void add_component_system_streams(Object obj)
  {
      ComponentCommon common=null;
      if (obj instanceof StateSpoutSpec) {
          StateSpoutSpec spec = (StateSpoutSpec) obj;
          common=spec.get_common();
      }
 
      if (obj instanceof SpoutSpec) {
          SpoutSpec spec = (SpoutSpec) obj;
          common=spec.get_common();
      }
     
      if (obj instanceof Bolt) {
          Bolt spec = (Bolt) obj;
          common=spec.get_common();
      }
     
      if(common!=null)
      {
          StreamInfo sinfo=Thrift.outputFields(sysEventFields);
View Full Code Here

  private static void validate_component(Object obj)
      throws InvalidTopologyException {

    if (obj instanceof StateSpoutSpec) {
      StateSpoutSpec spec = (StateSpoutSpec) obj;
      for (String id : spec.get_common().get_streams().keySet()) {
        if (system_id(id)) {
          throw new InvalidTopologyException(id
              + " is not a valid component id");
        }
      }

    } else if (obj instanceof SpoutSpec) {
      SpoutSpec spec = (SpoutSpec) obj;
      for (String id : spec.get_common().get_streams().keySet()) {
        if (system_id(id)) {
          throw new InvalidTopologyException(id
              + " is not a valid component id");
        }
      }
    } else if (obj instanceof Bolt) {
      Bolt spec = (Bolt) obj;
      for (String id : spec.get_common().get_streams().keySet()) {
        if (system_id(id)) {
          throw new InvalidTopologyException(id
              + " is not a valid component id");
        }
      }
View Full Code Here

  }

  private static void validate_component_inputs(Object obj)
      throws InvalidTopologyException {
    if (obj instanceof StateSpoutSpec) {
      StateSpoutSpec spec = (StateSpoutSpec) obj;
      if (!spec.get_common().get_inputs().isEmpty()) {
        throw new InvalidTopologyException(
            "May not declare inputs for a spout");
      }

    }

    if (obj instanceof SpoutSpec) {
      SpoutSpec spec = (SpoutSpec) obj;
      if (!spec.get_common().get_inputs().isEmpty()) {
        throw new InvalidTopologyException(
            "May not declare inputs for a spout");
      }
    }
  }
View Full Code Here

  private static List<String> sysEventFields = JStormUtils.mk_list("event");

  private static void add_component_system_streams(Object obj) {
    ComponentCommon common = null;
    if (obj instanceof StateSpoutSpec) {
      StateSpoutSpec spec = (StateSpoutSpec) obj;
      common = spec.get_common();
    }

    if (obj instanceof SpoutSpec) {
      SpoutSpec spec = (SpoutSpec) obj;
      common = spec.get_common();
    }

    if (obj instanceof Bolt) {
      Bolt spec = (Bolt) obj;
      common = spec.get_common();
    }

    if (common != null) {
      StreamInfo sinfo = Thrift.outputFields(sysEventFields);
      common.put_to_streams(SYSTEM_STREAM_ID, sinfo);
View Full Code Here

TOP

Related Classes of backtype.storm.generated.StateSpoutSpec

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.