public Bolt deepCopy() { return new Bolt(this); }
public static Bolt prepareSerializedBoltDetails(Map<GlobalStreamId, Grouping> inputs, IBolt bolt, Map<String, StreamInfo> outputs, Integer parallelismHint, Map<String, Object> conf) { ComponentCommon common = prepareComponentCommon(inputs, outputs, parallelismHint, conf); return new Bolt(ComponentObject.serialized_java(Utils.javaSerialize(bolt)), common); }
Bolt __this__bolts_copy_value = new Bolt(other_element_value);
try { maybeAddCheckpointInputs(common); boltSpecs.put(boltId, new Bolt(ComponentObject.serialized_java(Utils.javaSerialize(bolt)), common)); } catch (RuntimeException wrapperCause) { if (wrapperCause.getCause() != null && NotSerializableException.class.equals(wrapperCause.getCause().getClass())) {
topology.put_to_bolts(Utils.uuid(), new Bolt(Thrift.serializeComponentObject(capturer), Thrift.prepareComponentCommon(captureBoltInputs, new HashMap<>(), null))); return new CapturedTopology<>(topology, capturer);
@Test public void testGetComponentCommonWithWorkerHook() { StormTopology stormTopology = genereateStormTopology(true); ComponentCommon componentCommon = ThriftTopologyUtils.getComponentCommon(stormTopology, "bolt-1"); Assert.assertEquals( "We expect to get bolt-1's common", new Bolt().get_common(), componentCommon); }
_val100 = new Bolt(); _val100.read(iprot); struct.bolts.put(_key99, _val100);
@Test public void testGetComponentCommonWithoutWorkerHook() { StormTopology stormTopology = genereateStormTopology(false); ComponentCommon componentCommon = ThriftTopologyUtils.getComponentCommon(stormTopology, "bolt-1"); Assert.assertEquals( "We expect to get bolt-1's common", new Bolt().get_common(), componentCommon); }
private StormTopology genereateStormTopology(boolean withWorkerHook) { ImmutableMap<String, SpoutSpec> spouts = ImmutableMap.of("spout-1", new SpoutSpec()); ImmutableMap<String, Bolt> bolts = ImmutableMap.of("bolt-1", new Bolt()); ImmutableMap<String, StateSpoutSpec> state_spouts = ImmutableMap.of(); StormTopology stormTopology = new StormTopology(spouts, bolts, state_spouts); if (withWorkerHook) { BaseWorkerHook workerHook = new BaseWorkerHook(); stormTopology.add_to_worker_hooks(ByteBuffer.wrap(Utils.javaSerialize(workerHook))); } return stormTopology; } }
_val50 = new Bolt(); _val50.read(iprot); struct.bolts.put(_key49, _val50);
public Bolt deepCopy() { return new Bolt(this); }
MockOutputCollector c = new MockOutputCollector(); Bolt b = new Bolt(); b.prepare(c,null,null); MockTuple tuple = new MockTuple(fields,Arrays.aslist({"a,b,c"})); b.execute(tuple); List result = c.getEmittedTuples().get(0);
try{ maybeAddCheckpointInputs(common); boltSpecs.put(boltId, new Bolt(ComponentObject.serialized_java(Utils.javaSerialize(bolt)), common)); }catch(RuntimeException wrapperCause){ if (wrapperCause.getCause() != null && NotSerializableException.class.equals(wrapperCause.getCause().getClass())){
Bolt __this__bolts_copy_value = new Bolt(other_element_value);
} else { assert (spoutOrBolt instanceof IRichBolt); bolts.put(operatorName, new Bolt(null, common));
/** * Gets the Thrift object representing the topology. * * @return the Thrift definition representing the topology */ @SuppressWarnings("deprecation") public StormTopology getRawTopology() { StormTopology stormTopology = new StormTopology(); Map<String, SpoutSpec> spouts = new HashMap<>(); for (TopologyAPI.Spout spout : this.delegate.getRawTopology().getSpoutsList()) { spouts.put(spout.getComp().getName(), new SpoutSpec(spout)); } Map<String, Bolt> bolts = new HashMap<>(); for (TopologyAPI.Bolt bolt : this.delegate.getRawTopology().getBoltsList()) { bolts.put(bolt.getComp().getName(), new Bolt(bolt)); } stormTopology.set_spouts(spouts); stormTopology.set_bolts(bolts); return stormTopology; }
_val83 = new Bolt(); _val83.read(iprot); struct.bolts.put(_key82, _val83);
_val50 = new Bolt(); _val50.read(iprot); struct.bolts.put(_key49, _val50);