Package backtype.storm.spout

Examples of backtype.storm.spout.SpoutOutputCollector


    @Test
    public void testFailure() throws JMSException, Exception{
        JmsSpout spout = new JmsSpout();
        JmsProvider mockProvider = new MockJmsProvider();
        MockSpoutOutputCollector mockCollector = new MockSpoutOutputCollector();
        SpoutOutputCollector collector = new SpoutOutputCollector(mockCollector);
        spout.setJmsProvider(new MockJmsProvider());
        spout.setJmsTupleProducer(new MockTupleProducer());
        spout.setJmsAcknowledgeMode(Session.CLIENT_ACKNOWLEDGE);
        spout.setRecoveryPeriod(10); // Rapid recovery for testing.
        spout.open(new HashMap<String,String>(), null, collector);
View Full Code Here


        exeQueue, report_error);

    try {
      WorkerClassLoader.switchThreadContext();
      this.spout.open(storm_conf, userTopologyCtx,
          new SpoutOutputCollector(output_collector));
    } catch (Throwable e) {
      error = e;
      LOG.error("spout open error ", e);
      report_error.report(e);
    } finally {
View Full Code Here

                fail(txid);
            }
           
            _collector.reset(collector);
            if(!prepared) {
                _spout.open(_conf, _context, new SpoutOutputCollector(_collector));
                prepared = true;
            }
            for(int i=0; i<_maxBatchSize; i++) {
                _spout.nextTuple();
                if(_collector.numEmitted < i) {
View Full Code Here

        _coordStream = TridentBoltExecutor.COORD_STREAM(batchGroup);
    }
   
    @Override
    public void open(Map conf, TopologyContext context, SpoutOutputCollector collector) {
        _delegate.open(conf, context, new SpoutOutputCollector(new StreamOverrideCollector(collector)));
        _outputTasks = new ArrayList<Integer>();
        for(String component: Utils.get(context.getThisTargets(),
                                        _coordStream,
                                        new HashMap<String, Grouping>()).keySet()) {
            _outputTasks.addAll(context.getComponentTasks(component));
View Full Code Here

  }

  public void open(Map conf, TopologyContext context,
      SpoutOutputCollector collector) {
    _tracker = new SpoutTrackOutputCollector(collector);
    _delegate.open(conf, context, new SpoutOutputCollector(_tracker));
  }
View Full Code Here

TOP

Related Classes of backtype.storm.spout.SpoutOutputCollector

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.