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


Java DataOutputView.writeShort方法代码示例

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


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

示例1: write

import org.apache.flink.core.memory.DataOutputView; //导入方法依赖的package包/类
@Override
public void write(DataOutputView out) throws IOException {
	super.write(out);

	// write the compression format used to write each key-group
	out.writeBoolean(usingKeyGroupCompression);

	// write in a way to be fault tolerant of read failures when deserializing the key serializer
	TypeSerializerSerializationUtil.writeSerializersAndConfigsWithResilience(
			out,
			Collections.singletonList(
				new Tuple2<TypeSerializer<?>, TypeSerializerConfigSnapshot>(keySerializer, keySerializerConfigSnapshot)));

	// write individual registered keyed state metainfos
	out.writeShort(stateMetaInfoSnapshots.size());
	for (RegisteredKeyedBackendStateMetaInfo.Snapshot<?, ?> metaInfo : stateMetaInfoSnapshots) {
		KeyedBackendStateMetaInfoSnapshotReaderWriters
			.getWriterForVersion(VERSION, metaInfo)
			.writeStateMetaInfo(out);
	}
}
 
开发者ID:axbaretto,项目名称:flink,代码行数:22,代码来源:KeyedBackendSerializationProxy.java

示例2: serialize

import org.apache.flink.core.memory.DataOutputView; //导入方法依赖的package包/类
@Override
public void serialize(
		KafkaTransactionState record,
		DataOutputView target) throws IOException {
	if (record.transactionalId == null) {
		target.writeBoolean(false);
	} else {
		target.writeBoolean(true);
		target.writeUTF(record.transactionalId);
	}
	target.writeLong(record.producerId);
	target.writeShort(record.epoch);
}
 
开发者ID:axbaretto,项目名称:flink,代码行数:14,代码来源:FlinkKafkaProducer011.java

示例3: copy

import org.apache.flink.core.memory.DataOutputView; //导入方法依赖的package包/类
@Override
public void copy(
		DataInputView source, DataOutputView target) throws IOException {
	boolean hasTransactionalId = source.readBoolean();
	target.writeBoolean(hasTransactionalId);
	if (hasTransactionalId) {
		target.writeUTF(source.readUTF());
	}
	target.writeLong(source.readLong());
	target.writeShort(source.readShort());
}
 
开发者ID:axbaretto,项目名称:flink,代码行数:12,代码来源:FlinkKafkaProducer011.java

示例4: serialize

import org.apache.flink.core.memory.DataOutputView; //导入方法依赖的package包/类
@Override
public void serialize(short[] record, DataOutputView target) throws IOException {
	if (record == null) {
		throw new IllegalArgumentException("The record must not be null.");
	}
	
	final int len = record.length;
	target.writeInt(len);
	for (int i = 0; i < len; i++) {
		target.writeShort(record[i]);
	}
}
 
开发者ID:axbaretto,项目名称:flink,代码行数:13,代码来源:ShortPrimitiveArraySerializer.java

示例5: write

import org.apache.flink.core.memory.DataOutputView; //导入方法依赖的package包/类
@Override
public void write(DataOutputView out) throws IOException {
	out.writeInt(position);

	for (int i = 0; i < position; i++) {
		out.writeShort(data[i]);
	}
}
 
开发者ID:axbaretto,项目名称:flink,代码行数:9,代码来源:ShortValueArray.java

示例6: write

import org.apache.flink.core.memory.DataOutputView; //导入方法依赖的package包/类
@Override
public void write(DataOutputView out) throws IOException {
	super.write(out);

	out.writeShort(stateMetaInfoSnapshots.size());
	for (RegisteredOperatorBackendStateMetaInfo.Snapshot<?> kvState : stateMetaInfoSnapshots) {
		OperatorBackendStateMetaInfoSnapshotReaderWriters
			.getWriterForVersion(VERSION, kvState)
			.writeStateMetaInfo(out);
	}
}
 
开发者ID:axbaretto,项目名称:flink,代码行数:12,代码来源:OperatorBackendSerializationProxy.java

示例7: serialize

import org.apache.flink.core.memory.DataOutputView; //导入方法依赖的package包/类
@Override
public void serialize(Short record, DataOutputView target) throws IOException {
	target.writeShort(record.shortValue());
}
 
开发者ID:axbaretto,项目名称:flink,代码行数:5,代码来源:ShortSerializer.java

示例8: copy

import org.apache.flink.core.memory.DataOutputView; //导入方法依赖的package包/类
@Override
public void copy(DataInputView source, DataOutputView target) throws IOException {
	target.writeShort(source.readShort());
}
 
开发者ID:axbaretto,项目名称:flink,代码行数:5,代码来源:ShortSerializer.java

示例9: write

import org.apache.flink.core.memory.DataOutputView; //导入方法依赖的package包/类
@Override
public void write(DataOutputView out) throws IOException {
	out.writeShort(this.value);
}
 
开发者ID:axbaretto,项目名称:flink,代码行数:5,代码来源:ShortValue.java


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