本文整理汇总了Java中com.alibaba.jstorm.daemon.worker.WorkerData.getActive方法的典型用法代码示例。如果您正苦于以下问题:Java WorkerData.getActive方法的具体用法?Java WorkerData.getActive怎么用?Java WorkerData.getActive使用的例子?那么, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类com.alibaba.jstorm.daemon.worker.WorkerData
的用法示例。
在下文中一共展示了WorkerData.getActive方法的2个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的Java代码示例。
示例1: WorkerHeartbeatRunable
import com.alibaba.jstorm.daemon.worker.WorkerData; //导入方法依赖的package包/类
public WorkerHeartbeatRunable(WorkerData workerData) {
this.workerData = workerData;
this.conf = workerData.getConf();
this.worker_id = workerData.getWorkerId();
this.port = workerData.getPort();
this.topologyId = workerData.getTopologyId();
this.task_ids = new CopyOnWriteArraySet<Integer>(
workerData.getTaskids());
this.active = workerData.getActive();
String key = Config.WORKER_HEARTBEAT_FREQUENCY_SECS;
frequence = JStormUtils.parseInt(conf.get(key), 10);
}
示例2: TaskHeartbeatRunable
import com.alibaba.jstorm.daemon.worker.WorkerData; //导入方法依赖的package包/类
public TaskHeartbeatRunable(WorkerData workerData) {
this.zkCluster = workerData.getZkCluster();
this.topology_id = workerData.getTopologyId();
this.uptime = new UptimeComputer();;
this.storm_conf = workerData.getStormConf();
this.active = workerData.getActive();
String key = Config.TASK_HEARTBEAT_FREQUENCY_SECS;
Object time = storm_conf.get(key);
frequence = JStormUtils.parseInt(time, 10);
}