@Override public void cleanup() { _function.cleanup(); }
@Override public void execute(ProcessorContext processorContext, String streamId, TridentTuple tuple) { _collector.setContext(processorContext); _function.execute(_projection.create(tuple), _collector); }
@Override public void prepare(Map conf, TopologyContext context, TridentContext tridentContext) { List<TridentTuple.Factory> parents = tridentContext.getParentTupleFactories(); if(parents.size()!=1) { throw new RuntimeException("Map operation can only have one parent"); } _context = tridentContext; _collector = new FreshCollector(tridentContext); _projection = new TridentTupleView.ProjectionFactory(parents.get(0), _inputFields); _function.prepare(conf, new TridentOperationContext(context, _projection)); }
@Override public void execute(ProcessorContext processorContext, String streamId, TridentTuple tuple) { _collector.setContext(processorContext, tuple); _function.execute(_projection.create(tuple), _collector); }
@Override public void prepare(Map conf, TopologyContext context, TridentContext tridentContext) { List<Factory> parents = tridentContext.getParentTupleFactories(); if (parents.size() != 1) { throw new RuntimeException("Each operation can only have one parent"); } _context = tridentContext; _collector = new AppendCollector(tridentContext); _projection = new ProjectionFactory(parents.get(0), _inputFields); _function.prepare(conf, new TridentOperationContext(context, _projection)); }
@Override public void cleanup() { _function.cleanup(); }
@Override public void execute(TridentTuple tuple, TridentCollector collector) { try { getDelegate().execute(tuple, collector); } catch (FrameworkException ex) { LOG.error("execute() not delegated due to a Framework exception: ", ex); } catch (Exception ex) { LOG.error("execute() threw an uncaught exception: ", ex); } }
@Override public void prepare(Map conf, TridentOperationContext context) { try { getDelegate().prepare(conf, context); } catch (FrameworkException ex) { LOG.error("prepare() not delegated due to a Framework exception: ", ex); } catch (Exception ex) { LOG.error("prepare() threw an uncaught exception: ", ex); } }
@Override public void cleanup() { _function.cleanup(); }
@Override public void execute(ProcessorContext processorContext, String streamId, TridentTuple tuple) { _collector.setContext(processorContext); _function.execute(_projection.create(tuple), _collector); }
@Override public void prepare(Map conf, TopologyContext context, TridentContext tridentContext) { List<TridentTuple.Factory> parents = tridentContext.getParentTupleFactories(); if(parents.size()!=1) { throw new RuntimeException("Map operation can only have one parent"); } _context = tridentContext; _collector = new FreshCollector(tridentContext); _projection = new TridentTupleView.ProjectionFactory(parents.get(0), _inputFields); _function.prepare(conf, new TridentOperationContext(context, _projection)); }
@Override public void cleanup() { _function.cleanup(); }
@Override public void execute(ProcessorContext processorContext, String streamId, TridentTuple tuple) { _collector.setContext(processorContext, tuple); _function.execute(_projection.create(tuple), _collector); }
@Override public void prepare(Map conf, TopologyContext context, TridentContext tridentContext) { List<Factory> parents = tridentContext.getParentTupleFactories(); if(parents.size()!=1) { throw new RuntimeException("Each operation can only have one parent"); } _context = tridentContext; _collector = new AppendCollector(tridentContext); _projection = new ProjectionFactory(parents.get(0), _inputFields); _function.prepare(conf, new TridentOperationContext(context, _projection)); }
@Override public void cleanup() { _function.cleanup(); }
@Override public void execute(ProcessorContext processorContext, String streamId, TridentTuple tuple) { _collector.setContext(processorContext, tuple); _function.execute(_projection.create(tuple), _collector); }
@Override public void prepare(Map conf, TopologyContext context, TridentContext tridentContext) { List<Factory> parents = tridentContext.getParentTupleFactories(); if (parents.size() != 1) { throw new RuntimeException("Each operation can only have one parent"); } _context = tridentContext; _collector = new AppendCollector(tridentContext); _projection = new ProjectionFactory(parents.get(0), _inputFields); _function.prepare(conf, new TridentOperationContext(context, _projection)); }
@Override public void cleanup() { try { getDelegate().cleanup(); } catch (FrameworkException ex) { LOG.error("cleanup() not delegated due to a Framework exception: ", ex); } catch (Exception ex) { LOG.error("cleanup() threw an uncaught exception: ", ex); } } }