org.apache.storm.generated.Bolt.<init>()方法的使用及代码示例

x33g5p2x  于2022-01-17 转载在 其他  
字(4.7k)|赞(0)|评价(0)|浏览(108)

本文整理了Java中org.apache.storm.generated.Bolt.<init>()方法的一些代码示例,展示了Bolt.<init>()的具体用法。这些代码示例主要来源于Github/Stackoverflow/Maven等平台,是从一些精选项目中提取出来的代码,具有较强的参考意义,能在一定程度帮忙到你。Bolt.<init>()方法的具体详情如下:
包路径:org.apache.storm.generated.Bolt
类名称:Bolt
方法名:<init>

Bolt.<init>介绍

[英]Performs a deep copy on other.
[中]在其他计算机上执行深度复制。

代码示例

代码示例来源:origin: apache/storm

public Bolt deepCopy() {
 return new Bolt(this);
}

代码示例来源:origin: apache/storm

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);
}

代码示例来源:origin: apache/storm

Bolt __this__bolts_copy_value = new Bolt(other_element_value);

代码示例来源:origin: apache/storm

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())) {

代码示例来源:origin: apache/storm

topology.put_to_bolts(Utils.uuid(), new Bolt(Thrift.serializeComponentObject(capturer),
                       Thrift.prepareComponentCommon(captureBoltInputs, new HashMap<>(), null)));
return new CapturedTopology<>(topology, capturer);

代码示例来源:origin: apache/storm

@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);
}

代码示例来源:origin: apache/storm

_val100 = new Bolt();
_val100.read(iprot);
struct.bolts.put(_key99, _val100);

代码示例来源:origin: apache/storm

@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);
}

代码示例来源:origin: apache/storm

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;
  }
}

代码示例来源:origin: apache/storm

_val50 = new Bolt();
_val50.read(iprot);
struct.bolts.put(_key49, _val50);

代码示例来源:origin: org.apache.storm/storm-core

public Bolt deepCopy() {
 return new Bolt(this);
}

代码示例来源:origin: stackoverflow.com

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);

代码示例来源:origin: org.apache.storm/storm-core

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())){

代码示例来源:origin: org.apache.storm/storm-core

Bolt __this__bolts_copy_value = new Bolt(other_element_value);

代码示例来源:origin: org.apache.flink/flink-storm

} else {
  assert (spoutOrBolt instanceof IRichBolt);
  bolts.put(operatorName, new Bolt(null, common));

代码示例来源:origin: com.twitter.heron/heron-storm

/**
 * 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;
}

代码示例来源:origin: org.apache.storm/storm-core

_val83 = new Bolt();
_val83.read(iprot);
struct.bolts.put(_key82, _val83);

代码示例来源:origin: org.apache.storm/storm-core

_val50 = new Bolt();
_val50.read(iprot);
struct.bolts.put(_key49, _val50);

相关文章