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


Java KryoValuesDeserializer类代码示例

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


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

示例1: testSerialization

import backtype.storm.serialization.KryoValuesDeserializer; //导入依赖的package包/类
@Test
public void testSerialization() throws IOException {
    Map conf = Utils.readDefaultConfig();
    Config.registerSerialization(conf, Metadata.class);

    KryoValuesSerializer kvs = new KryoValuesSerializer(conf);
    Metadata md = new Metadata();
    byte[] content = kvs.serializeObject(md);

    KryoValuesDeserializer kvd = new KryoValuesDeserializer(conf);
    Metadata md2 = (Metadata) kvd.deserializeObject(content);

    // TODO compare md1 and md2
}
 
开发者ID:zaizi,项目名称:alfresco-apache-storm-demo,代码行数:15,代码来源:TestMetadataSerialization.java

示例2: KryoGeneralTupleSerializer

import backtype.storm.serialization.KryoValuesDeserializer; //导入依赖的package包/类
/**
 * Creates the kryo serializer for the general tuple.
 * @param conf the Storm configuration file
 */
@SuppressWarnings("rawtypes")
public KryoGeneralTupleSerializer(final Map conf) {
    this.valuesSer = new KryoValuesSerializer(conf);
    this.valuesDeser = new KryoValuesDeserializer(conf);
    this.kryoIn = new Input(1);
    this.kryoOut = new Output(2000, 2000000000);
}
 
开发者ID:QualiMaster,项目名称:Infrastructure,代码行数:12,代码来源:KryoGeneralTupleSerializer.java

示例3: KryoSwitchTupleSerializer

import backtype.storm.serialization.KryoValuesDeserializer; //导入依赖的package包/类
/**
 * Creates the kryo serializer for the switch tuple.
 * @param conf the storm config
 */
@SuppressWarnings("rawtypes")
public KryoSwitchTupleSerializer(final Map conf) {
    this.valuesSer = new KryoValuesSerializer(conf);
    this.valuesDeser = new KryoValuesDeserializer(conf);
    this.kryoIn = new Input(1);
    this.kryoOut = new Output(2000, 2000000000);
}
 
开发者ID:QualiMaster,项目名称:Infrastructure,代码行数:12,代码来源:KryoSwitchTupleSerializer.java

示例4: BinDecoder

import backtype.storm.serialization.KryoValuesDeserializer; //导入依赖的package包/类
public BinDecoder(IRunContext context) {
	
	_deser = new KryoValuesDeserializer(context.getStormConf());
}
 
开发者ID:JamesLampton,项目名称:piggybank-squeal,代码行数:5,代码来源:Binner.java


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