Package backtype.storm.generated

Examples of backtype.storm.generated.SpoutSpec


            boltSpecs.put(boltId, new Bolt(ComponentObject.serialized_java(Utils.serialize(bolt)), common));
        }
        for(String spoutId: _spouts.keySet()) {
            IRichSpout spout = _spouts.get(spoutId);
            ComponentCommon common = getComponentCommon(spoutId, spout);
            spoutSpecs.put(spoutId, new SpoutSpec(ComponentObject.serialized_java(Utils.serialize(spout)), common));
           
        }
        return new StormTopology(spoutSpecs,
                                 boltSpecs,
                                 new HashMap<String, StateSpoutSpec>());
View Full Code Here


            }

        }

        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

          }
 
      }
 
      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

          common.put_to_streams(ACKER_FAIL_STREAM_ID,Thrift.outputFields(failList));
          bolt.set_common(common);
      }
 
      for (Entry<String, SpoutSpec> kv : ret.get_spouts().entrySet()) {
          SpoutSpec bolt = kv.getValue();
          ComponentCommon common = bolt.get_common();
          List<String> initList = StormUtils.mk_list("id", "init-val", "spout-task");
          common.put_to_streams(ACKER_INIT_STREAM_ID,Thrift.outputFields(initList));
         
          GlobalStreamId ack_ack=new GlobalStreamId(ACKER_COMPONENT_ID, ACKER_ACK_STREAM_ID);
          common.put_to_inputs(ack_ack, Thrift.mkDirectGrouping());
View Full Code Here

          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

            boltSpecs.put(boltId, new Bolt(ComponentObject.serialized_java(Utils.serialize(bolt)), common));
        }
        for(String spoutId: _spouts.keySet()) {
            IRichSpout spout = _spouts.get(spoutId);
            ComponentCommon common = getComponentCommon(spoutId, spout);
            spoutSpecs.put(spoutId, new SpoutSpec(ComponentObject.serialized_java(Utils.serialize(spout)), common));
           
        }
        return new StormTopology(spoutSpecs,
                                 boltSpecs,
                                 new HashMap<String, StateSpoutSpec>());
View Full Code Here

    for (String spoutId : _spouts.keySet()) {
      IRichSpout spout = _spouts.get(spoutId);
      ComponentCommon common = getComponentCommon(spoutId, spout);
      spoutSpecs.put(
          spoutId,
          new SpoutSpec(ComponentObject.serialized_java(Utils
              .serialize(spout)), common));

    }
    return new StormTopology(spoutSpecs, boltSpecs,
        new HashMap<String, StateSpoutSpec>());
View Full Code Here

              + " 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

      }

    }

    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

    // add every spout output stream ACKER_INIT_STREAM_ID
    // add every spout two intput source
    // ((ACKER_COMPONENT_ID, ACKER_ACK_STREAM_ID), directGrouping)
    // ((ACKER_COMPONENT_ID, ACKER_FAIL_STREAM_ID), directGrouping)
    for (Entry<String, SpoutSpec> kv : ret.get_spouts().entrySet()) {
      SpoutSpec bolt = kv.getValue();
      ComponentCommon common = bolt.get_common();
      List<String> initList = JStormUtils.mk_list("id", "init-val",
          "spout-task");
      common.put_to_streams(ACKER_INIT_STREAM_ID,
          Thrift.outputFields(initList));
View Full Code Here

TOP

Related Classes of backtype.storm.generated.SpoutSpec

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.