本文整理了Java中org.apache.storm.generated.Bolt.set_bolt_object()
方法的一些代码示例,展示了Bolt.set_bolt_object()
的具体用法。这些代码示例主要来源于Github
/Stackoverflow
/Maven
等平台,是从一些精选项目中提取出来的代码,具有较强的参考意义,能在一定程度帮忙到你。Bolt.set_bolt_object()
方法的具体详情如下:
包路径:org.apache.storm.generated.Bolt
类名称:Bolt
方法名:set_bolt_object
暂无
代码示例来源:origin: apache/storm
public void setFieldValue(_Fields field, java.lang.Object value) {
switch (field) {
case BOLT_OBJECT:
if (value == null) {
unset_bolt_object();
} else {
set_bolt_object((ComponentObject)value);
}
break;
case COMMON:
if (value == null) {
unset_common();
} else {
set_common((ComponentCommon)value);
}
break;
}
}
代码示例来源:origin: apache/storm
/**
* Create a new topology to be tracked.
* @param origTopo the original topology.
* @param cluster a cluster that should have been launched with tracking enabled.
*/
public TrackedTopology(StormTopology origTopo, ILocalCluster cluster) {
LOG.warn("CLUSTER {} - {}", cluster, cluster.getTrackedId());
this.cluster = cluster;
lastSpoutCommit = new AtomicInteger(0);
String id = cluster.getTrackedId();
topology = origTopo.deepCopy();
for (Bolt bolt : topology.get_bolts().values()) {
IRichBolt obj = (IRichBolt) Thrift.deserializeComponentObject(bolt.get_bolt_object());
bolt.set_bolt_object(Thrift.serializeComponentObject(new BoltTracker(obj, id)));
}
for (SpoutSpec spout : topology.get_spouts().values()) {
IRichSpout obj = (IRichSpout) Thrift.deserializeComponentObject(spout.get_spout_object());
spout.set_spout_object(Thrift.serializeComponentObject(new SpoutTracker(obj, id)));
}
}
代码示例来源:origin: org.apache.storm/storm-core
public void setFieldValue(_Fields field, Object value) {
switch (field) {
case BOLT_OBJECT:
if (value == null) {
unset_bolt_object();
} else {
set_bolt_object((ComponentObject)value);
}
break;
case COMMON:
if (value == null) {
unset_common();
} else {
set_common((ComponentCommon)value);
}
break;
}
}
内容来源于网络,如有侵权,请联系作者删除!