Package backtype.storm.generated

Examples of backtype.storm.generated.Grouping


      Fields out_fields = topology_context.getThisOutputFields(stream_id);

      Map<String, MkGrouper> componentGrouper = new HashMap<String, MkGrouper>();
      for (Entry<String, Grouping> cg : component_grouping.entrySet()) {
        String component = cg.getKey();
        Grouping tgrouping = cg.getValue();
        int num_tasks = topology_context.getComponentTasks(component)
            .size();
        if (num_tasks > 0) {
          MkGrouper grouper = new MkGrouper(out_fields, tgrouping,
              num_tasks);
View Full Code Here


 
      Map<GlobalStreamId, Grouping> spout_inputs = new HashMap<GlobalStreamId, Grouping>();
      for (Entry<String, SpoutSpec> spout : spout_ids.entrySet()) {
          String id = spout.getKey();
          GlobalStreamId stream = new GlobalStreamId(id, ACKER_INIT_STREAM_ID);
          Grouping group = Thrift.mkFieldsGrouping(StormUtils.mk_list("id"));
          spout_inputs.put(stream, group);
      }
 
      Map<GlobalStreamId, Grouping> bolt_inputs = new HashMap<GlobalStreamId, Grouping>();
      for (Entry<String, Bolt> bolt : bolt_ids.entrySet()) {
          String id = bolt.getKey();
 
          GlobalStreamId streamAck = new GlobalStreamId(id,
                  ACKER_ACK_STREAM_ID);
          Grouping groupAck = Thrift.mkFieldsGrouping(StormUtils
                  .mk_list("id"));
 
          GlobalStreamId streamFail = new GlobalStreamId(id,
                  ACKER_FAIL_STREAM_ID);
          Grouping groupFail = Thrift.mkFieldsGrouping(StormUtils
                  .mk_list("id"));
 
          bolt_inputs.put(streamAck, groupAck);
          bolt_inputs.put(streamFail, groupFail);
      }
View Full Code Here

        }
        return ret;
    }
   
    private static boolean isIdentityPartition(PartitionNode n) {
        Grouping g = n.thriftGrouping;
        if(g.is_set_custom_serialized()) {
            CustomStreamGrouping csg = (CustomStreamGrouping) Utils.deserialize(g.get_custom_serialized());
            return csg instanceof IdentityGrouping;
        }
        return false;
    }
View Full Code Here

    for (Entry<String, SpoutSpec> spout : spout_ids.entrySet()) {
      String id = spout.getKey();

      GlobalStreamId stream = new GlobalStreamId(id, ACKER_INIT_STREAM_ID);

      Grouping group = Thrift.mkFieldsGrouping(JStormUtils.mk_list("id"));

      spout_inputs.put(stream, group);
    }

    Map<String, Bolt> bolt_ids = topology.get_bolts();
    Map<GlobalStreamId, Grouping> bolt_inputs = new HashMap<GlobalStreamId, Grouping>();
    for (Entry<String, Bolt> bolt : bolt_ids.entrySet()) {
      String id = bolt.getKey();

      GlobalStreamId streamAck = new GlobalStreamId(id,
          ACKER_ACK_STREAM_ID);
      Grouping groupAck = Thrift.mkFieldsGrouping(JStormUtils
          .mk_list("id"));

      GlobalStreamId streamFail = new GlobalStreamId(id,
          ACKER_FAIL_STREAM_ID);
      Grouping groupFail = Thrift.mkFieldsGrouping(JStormUtils
          .mk_list("id"));

      bolt_inputs.put(streamAck, groupAck);
      bolt_inputs.put(streamFail, groupFail);
    }
View Full Code Here

      Map<String, MkGrouper> componentGrouper = new HashMap<String, MkGrouper>();

      for (Entry<String, Grouping> cg : component_grouping.entrySet()) {

        String component = cg.getKey();
        Grouping tgrouping = cg.getValue();

        List<Integer> outTasks = topology_context
            .getComponentTasks(component);
        // ATTENTION: If topology set one component parallelism as 0
        // so we don't need send tuple to it
View Full Code Here

        }
        return ret;
    }
   
    private static boolean isIdentityPartition(PartitionNode n) {
        Grouping g = n.thriftGrouping;
        if(g.is_set_custom_serialized()) {
            CustomStreamGrouping csg = (CustomStreamGrouping) Utils.deserialize(g.get_custom_serialized());
            return csg instanceof IdentityGrouping;
        }
        return false;
    }
View Full Code Here

TOP

Related Classes of backtype.storm.generated.Grouping

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.