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


Java ProcessorContext.getStateStore方法代码示例

本文整理汇总了Java中org.apache.kafka.streams.processor.ProcessorContext.getStateStore方法的典型用法代码示例。如果您正苦于以下问题:Java ProcessorContext.getStateStore方法的具体用法?Java ProcessorContext.getStateStore怎么用?Java ProcessorContext.getStateStore使用的例子?那么, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在org.apache.kafka.streams.processor.ProcessorContext的用法示例。


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

示例1: init

import org.apache.kafka.streams.processor.ProcessorContext; //导入方法依赖的package包/类
@Override
public void init(ProcessorContext pc) {

    this.pc = pc;
    this.pc.schedule(12000); //invoke punctuate every 12 seconds
    this.machineToAvgCPUUsageStore = (KeyValueStore<String, Double>) pc.getStateStore(AVG_STORE_NAME);
    this.machineToNumOfRecordsReadStore = (KeyValueStore<String, Integer>) pc.getStateStore(NUM_RECORDS_STORE_NAME);

    PROC_LOGGER.info("Processor initialized");
}
 
开发者ID:abhirockzz,项目名称:docker-kafka-streams,代码行数:11,代码来源:CPUMetricStreamHandler.java

示例2: init

import org.apache.kafka.streams.processor.ProcessorContext; //导入方法依赖的package包/类
@SuppressWarnings("unchecked")
@Override
public void init(ProcessorContext context) {
    super.init(context);

    store = (KeyValueStore<K, V>) context.getStateStore(storeName);
    tupleForwarder = new TupleForwarder<>(store, context, new ForwardingCacheFlushListener<K, V>(context, sendOldValues), sendOldValues);
}
 
开发者ID:YMCoding,项目名称:kafka-0.11.0.0-src-with-comment,代码行数:9,代码来源:KStreamReduce.java

示例3: init

import org.apache.kafka.streams.processor.ProcessorContext; //导入方法依赖的package包/类
@SuppressWarnings("unchecked")
@Override
public void init(ProcessorContext context) {
    super.init(context);

    window = (WindowStore<K, V>) context.getStateStore(windowName);
}
 
开发者ID:YMCoding,项目名称:kafka-0.11.0.0-src-with-comment,代码行数:8,代码来源:KStreamJoinWindow.java

示例4: init

import org.apache.kafka.streams.processor.ProcessorContext; //导入方法依赖的package包/类
@SuppressWarnings("unchecked")
@Override
public void init(ProcessorContext context) {
    super.init(context);
    if (queryableName != null) {
        store = (KeyValueStore<K, V>) context.getStateStore(queryableName);
        tupleForwarder = new TupleForwarder<>(store, context, new ForwardingCacheFlushListener<K, V>(context, sendOldValues), sendOldValues);
    }
}
 
开发者ID:YMCoding,项目名称:kafka-0.11.0.0-src-with-comment,代码行数:10,代码来源:KTableFilter.java

示例5: init

import org.apache.kafka.streams.processor.ProcessorContext; //导入方法依赖的package包/类
@SuppressWarnings("unchecked")
@Override
public void init(ProcessorContext context) {
    super.init(context);
    store = (SessionStore<K,  T>) context.getStateStore(storeName);
    tupleForwarder = new TupleForwarder<>(store, context, new ForwardingCacheFlushListener<K, V>(context, sendOldValues), sendOldValues);
}
 
开发者ID:YMCoding,项目名称:kafka-0.11.0.0-src-with-comment,代码行数:8,代码来源:KStreamSessionWindowAggregate.java

示例6: init

import org.apache.kafka.streams.processor.ProcessorContext; //导入方法依赖的package包/类
@SuppressWarnings("unchecked")
@Override
public void init(ProcessorContext context) {
    super.init(context);

    windowStore = (WindowStore<K, T>) context.getStateStore(storeName);
    tupleForwarder = new TupleForwarder<>(windowStore, context, new ForwardingCacheFlushListener<Windowed<K>, V>(context, sendOldValues), sendOldValues);
}
 
开发者ID:YMCoding,项目名称:kafka-0.11.0.0-src-with-comment,代码行数:9,代码来源:KStreamWindowAggregate.java

示例7: init

import org.apache.kafka.streams.processor.ProcessorContext; //导入方法依赖的package包/类
@SuppressWarnings("unchecked")
@Override
public void init(final ProcessorContext context) {
    super.init(context);
    store = (KeyValueStore<K, T>) context.getStateStore(storeName);
    tupleForwarder = new TupleForwarder<>(store, context, new ForwardingCacheFlushListener<K, V>(context, sendOldValues), sendOldValues);
}
 
开发者ID:YMCoding,项目名称:kafka-0.11.0.0-src-with-comment,代码行数:8,代码来源:KTableAggregate.java

示例8: init

import org.apache.kafka.streams.processor.ProcessorContext; //导入方法依赖的package包/类
@SuppressWarnings("unchecked")
@Override
public void init(ProcessorContext context) {
    super.init(context);
    if (queryableName != null) {
        store = (KeyValueStore<K, V>) context.getStateStore(queryableName);
        tupleForwarder = new TupleForwarder<>(store, context,
            new ForwardingCacheFlushListener<K, V>(context, sendOldValues),
            sendOldValues);
    }
}
 
开发者ID:YMCoding,项目名称:kafka-0.11.0.0-src-with-comment,代码行数:12,代码来源:KTableKTableJoinMerger.java

示例9: init

import org.apache.kafka.streams.processor.ProcessorContext; //导入方法依赖的package包/类
@SuppressWarnings("unchecked")
@Override
public void init(ProcessorContext context) {
    super.init(context);
    store = (KeyValueStore<K, V>) context.getStateStore(storeName);
    tupleForwarder = new TupleForwarder<K, V>(store, context, new ForwardingCacheFlushListener<K, V>(context, sendOldValues), sendOldValues);
}
 
开发者ID:YMCoding,项目名称:kafka-0.11.0.0-src-with-comment,代码行数:8,代码来源:KTableReduce.java

示例10: init

import org.apache.kafka.streams.processor.ProcessorContext; //导入方法依赖的package包/类
@SuppressWarnings("unchecked")
@Override
public void init(ProcessorContext context) {
    super.init(context);
    windowStore = (WindowStore<K, V>) context.getStateStore(storeName);
    tupleForwarder = new TupleForwarder<>(windowStore, context, new ForwardingCacheFlushListener<Windowed<K>, V>(context, sendOldValues), sendOldValues);
}
 
开发者ID:YMCoding,项目名称:kafka-0.11.0.0-src-with-comment,代码行数:8,代码来源:KStreamWindowReduce.java

示例11: init

import org.apache.kafka.streams.processor.ProcessorContext; //导入方法依赖的package包/类
@SuppressWarnings("unchecked")
@Override
public void init(ProcessorContext context) {
    super.init(context);
    store = (KeyValueStore<K, T>) context.getStateStore(storeName);
    tupleForwarder = new TupleForwarder<>(store, context, new ForwardingCacheFlushListener<K, V>(context, sendOldValues), sendOldValues);
}
 
开发者ID:YMCoding,项目名称:kafka-0.11.0.0-src-with-comment,代码行数:8,代码来源:KStreamAggregate.java

示例12: init

import org.apache.kafka.streams.processor.ProcessorContext; //导入方法依赖的package包/类
@Override
public void init(ProcessorContext context) {
    super.init(context);

    otherWindow = (WindowStore<K, V2>) context.getStateStore(otherWindowName);
}
 
开发者ID:YMCoding,项目名称:kafka-0.11.0.0-src-with-comment,代码行数:7,代码来源:KStreamKStreamJoin.java

示例13: init

import org.apache.kafka.streams.processor.ProcessorContext; //导入方法依赖的package包/类
@Override
@SuppressWarnings("unchecked")
public void init(ProcessorContext context) {
    super.init(context);
    store = (KeyValueStore<String, String>) context.getStateStore(storeName);
}
 
开发者ID:YMCoding,项目名称:kafka-0.11.0.0-src-with-comment,代码行数:7,代码来源:ProcessorTopologyTest.java


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