Package backtype.storm.task

Examples of backtype.storm.task.OutputCollector


        AbstractMetricsBolt bolt = getBolt();

        outputCollector = new MockOutputCollector();

        // Prepare the bolt so that it uses our mock output collector
        bolt.prepare(null, null, new OutputCollector(outputCollector));

        // Emit all events
        for (Map<String, Object> event : events) {
            Tuple tuple = Mockito.mock(Tuple.class);
View Full Code Here


            String connectionId = connection.getString("_id");
            final String connectionType = connection.getString("type");

            when(tuple.getValue(0)).thenReturn(connection);

            bolt.prepare(null, null, new OutputCollector(outputCollector));

            bolt.execute(tuple);

            if (connectionType.equals(ConnectionTypeConstants.PROJECT_HOSTING_TYPE)) {
                expectedInventoryItems = mongoClient.getProjectHostingInventoryItems(connectionId);
View Full Code Here

        if(_delegate instanceof TimeoutCallback) {
            callback = new TimeoutItems();
        }
        _tracked = new TimeCacheMap<Object, TrackingInfo>(context.maxTopologyMessageTimeout(), callback);
        _collector = collector;
        _delegate.prepare(config, context, new OutputCollector(new CoordinatedOutputCollector(collector)));
        for(String component: Utils.get(context.getThisTargets(),
                                        Constants.COORDINATED_STREAM_ID,
                                        new HashMap<String, Grouping>())
                                        .keySet()) {
            for(Integer task: context.getComponentTasks(component)) {
View Full Code Here

        _lastRotate = System.currentTimeMillis();
        _batches = new RotatingMap(2);
        _context = context;
        _collector = collector;
        _coordCollector = new CoordinatedOutputCollector(collector);
        _coordOutputCollector = new BatchOutputCollectorImpl(new OutputCollector(_coordCollector));
               
        _coordConditions = (Map) context.getExecutorData("__coordConditions");
        if(_coordConditions==null) {
            _coordConditions = new HashMap();
            for(String batchGroup: _coordSpecs.keySet()) {
View Full Code Here

    IOutputCollector output_collector = new BoltCollector(
        message_timeout_secs, _report_error, _send_fn, storm_conf,
        _transfer_fn, sysTopologyCxt, taskId, tuple_start_times,
        _task_stats);

    outputCollector = new OutputCollector(output_collector);

    boltExeTimer = Metrics.registerTimer(idStr, MetricDef.EXECUTE_TIME,
        String.valueOf(taskId), Metrics.MetricType.TASK);
    TimeTick.registerTimer(idStr + "-sampling-tick", exeQueue);
View Full Code Here

        _lastRotate = System.currentTimeMillis();
        _batches = new RotatingMap(2);
        _context = context;
        _collector = collector;
        _coordCollector = new CoordinatedOutputCollector(collector);
        _coordOutputCollector = new BatchOutputCollectorImpl(new OutputCollector(_coordCollector));
               
        _coordConditions = (Map) context.getExecutorData("__coordConditions");
        if(_coordConditions==null) {
            _coordConditions = new HashMap();
            for(String batchGroup: _coordSpecs.keySet()) {
View Full Code Here

      callback = new TimeoutItems();
    }
    _tracked = new TimeCacheMap<Object, TrackingInfo>(
        context.maxTopologyMessageTimeout(), callback);
    _collector = collector;
    _delegate.prepare(config, context, new OutputCollector(
        new CoordinatedOutputCollector(collector)));
    for (String component : Utils.get(context.getThisTargets(),
        Constants.COORDINATED_STREAM_ID,
        new HashMap<String, Grouping>()).keySet()) {
      for (Integer task : context.getComponentTasks(component)) {
View Full Code Here

TOP

Related Classes of backtype.storm.task.OutputCollector

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.