当前位置: 首页>>代码示例>>Java>>正文


Java WorkerTopologyContext类代码示例

本文整理汇总了Java中org.apache.storm.task.WorkerTopologyContext的典型用法代码示例。如果您正苦于以下问题:Java WorkerTopologyContext类的具体用法?Java WorkerTopologyContext怎么用?Java WorkerTopologyContext使用的例子?那么恭喜您, 这里精选的类代码示例或许可以为您提供帮助。


WorkerTopologyContext类属于org.apache.storm.task包,在下文中一共展示了WorkerTopologyContext类的7个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的Java代码示例。

示例1: prepare

import org.apache.storm.task.WorkerTopologyContext; //导入依赖的package包/类
@Override
public void prepare(WorkerTopologyContext context, GlobalStreamId stream, List<Integer> targetTasks) {
    choices = new ArrayList<>(targetTasks.size());
    allTasks = new ArrayList<>(targetTasks.size());
    for (Integer i : targetTasks) {
        choices.add(Arrays.asList(i));
        allTasks.add(i);
    }
}
 
开发者ID:BriData,项目名称:DBus,代码行数:10,代码来源:DbusGrouping.java

示例2: prepare

import org.apache.storm.task.WorkerTopologyContext; //导入依赖的package包/类
@Override
public void prepare(
    WorkerTopologyContext context,
    GlobalStreamId stream,
    List<Integer> targetTasks) {
  this.taskIds = targetTasks;
}
 
开发者ID:twitter,项目名称:heron,代码行数:8,代码来源:CustomGroupingTopology.java

示例3: prepare

import org.apache.storm.task.WorkerTopologyContext; //导入依赖的package包/类
@Override
public void prepare(WorkerTopologyContext context, GlobalStreamId stream,
        List<Integer> targetTasks) {
    numTasks = targetTasks.size();
    partitioner = new URLPartitioner();
    if (StringUtils.isNotBlank(partitionMode)) {
        Map<String, String> conf = new HashMap<>();
        conf.put(Constants.PARTITION_MODEParamName, partitionMode);
        partitioner.configure(conf);
    }
}
 
开发者ID:DigitalPebble,项目名称:storm-crawler,代码行数:12,代码来源:URLStreamGrouping.java

示例4: prepare

import org.apache.storm.task.WorkerTopologyContext; //导入依赖的package包/类
public void prepare(WorkerTopologyContext context, GlobalStreamId stream, List<Integer> targetTasks) 
{
    tasks = targetTasks.size();
}
 
开发者ID:PacktPublishing,项目名称:Mastering-Apache-Storm,代码行数:5,代码来源:CountryRepartition.java

示例5: prepare

import org.apache.storm.task.WorkerTopologyContext; //导入依赖的package包/类
@Override
public void prepare(WorkerTopologyContext context, GlobalStreamId stream, List<Integer> targetTasks) {
    this.targetTasks = targetTasks;
}
 
开发者ID:hortonworks,项目名称:streamline,代码行数:5,代码来源:FieldsGroupingAsCustomGrouping.java

示例6: prepare

import org.apache.storm.task.WorkerTopologyContext; //导入依赖的package包/类
@Override
public void prepare(WorkerTopologyContext context, GlobalStreamId stream,
                    List<Integer> targetTasks) {

}
 
开发者ID:twitter,项目名称:heron,代码行数:6,代码来源:StreamBuilderTest.java

示例7: prepare

import org.apache.storm.task.WorkerTopologyContext; //导入依赖的package包/类
/**
 * Tells the stream grouping at runtime the tasks in the target bolt.
 * This information should be used in chooseTasks to determine the target tasks.
 * <p>
 * It also tells the grouping the metadata on the stream this grouping will be used on.
 */
void prepare(WorkerTopologyContext context, GlobalStreamId stream, List<Integer> targetTasks);
 
开发者ID:twitter,项目名称:heron,代码行数:8,代码来源:CustomStreamGrouping.java


注:本文中的org.apache.storm.task.WorkerTopologyContext类示例由纯净天空整理自Github/MSDocs等开源代码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。