Package com.alipay.bluewhale.core.task.group

Examples of com.alipay.bluewhale.core.task.group.MkGrouper


        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);
          componentGrouper.put(component, grouper);
        }
      }
      if (componentGrouper.size() > 0) {
View Full Code Here


      LOG.info("Emitting direct: " + out_task_id + "; "    + taskReadableName + " " + stream );
  }

  String target_component = topologyContext.getComponentId(out_task_id);
  Map<String, MkGrouper> component_prouping = streamComponentgrouper.get(stream);
  MkGrouper grouping = component_prouping.get(target_component);
  if (grouping != null && !GrouperType.direct.equals(grouping.gettype())) {
      throw new IllegalArgumentException("Cannot emitDirect to a task expecting a regular grouping");
  }

  // ����ͳ��
  if (emitSampler.getResult()) {
View Full Code Here

  java.util.Set<Integer> out_tasks = new HashSet<Integer>();

  if(componentCrouping!=null)
  {
          for (Entry<String, MkGrouper> ee : componentCrouping.entrySet()) {
              MkGrouper g = ee.getValue();
              if (GrouperType.direct.equals(g.gettype())) {
            throw new IllegalArgumentException("Cannot do regular emit to direct stream");
              }
       
              List<Integer> tasks = componentTasks.get(ee.getKey());
              List<Integer> indices = g.grouper(tuple);
              for (Integer i : indices) {
            Integer outtask=tasks.get(i);
            if(outtask!=null)
            {
                out_tasks.add(outtask);
View Full Code Here

TOP

Related Classes of com.alipay.bluewhale.core.task.group.MkGrouper

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.