Package backtype.storm.task

Examples of backtype.storm.task.TopologyContext


    Tuple normalTuple = mockNormalTuple(new Object());
    Tuple tickTuple = MockTupleHelpers.mockTickTuple();

    RollingCountBolt bolt = new RollingCountBolt();
    Map conf = mock(Map.class);
    TopologyContext context = mock(TopologyContext.class);
    OutputCollector collector = mock(OutputCollector.class);
    bolt.prepare(conf, context, collector);

    // when
    bolt.execute(normalTuple);
View Full Code Here


    StormTopology topology = workerData.getSysTopology();

    Set<Integer> rtn = new HashSet<Integer>();

    for (Integer taskid : task_ids) {
      TopologyContext context = context_maker.makeTopologyContext(
          topology, taskid, null);

      // <StreamId, <ComponentId, Grouping>>
      Map<String, Map<String, Grouping>> targets = context
          .getThisTargets();
      for (Map<String, Grouping> e : targets.values()) {
        for (String componentId : e.keySet()) {
          List<Integer> tasks = context
              .getComponentTasks(componentId);
          rtn.addAll(tasks);
        }
      }
    }
View Full Code Here

      }

      componentToStreamToFields.put(component, streamToFieldsMap);
    }

    return new TopologyContext(topology, stormConf,
        workerData.getTasksToComponent(),
        workerData.getComponentToSortedTasks(),
        componentToStreamToFields, topologyId, resourcePath, pidDir,
        taskId, workerData.getPort(), workerTasks,
        workerData.getDefaultResources(),
View Full Code Here

TOP

Related Classes of backtype.storm.task.TopologyContext

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.