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


Java DataInputView.readDouble方法代码示例

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


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

示例1: deserializeHistogram

import org.apache.flink.core.memory.DataInputView; //导入方法依赖的package包/类
private static MetricDump.HistogramDump deserializeHistogram(DataInputView dis) throws IOException {
	QueryScopeInfo info = deserializeMetricInfo(dis);
	String name = dis.readUTF();
	long min = dis.readLong();
	long max = dis.readLong();
	double mean = dis.readDouble();
	double median = dis.readDouble();
	double stddev = dis.readDouble();
	double p75 = dis.readDouble();
	double p90 = dis.readDouble();
	double p95 = dis.readDouble();
	double p98 = dis.readDouble();
	double p99 = dis.readDouble();
	double p999 = dis.readDouble();

	return new MetricDump.HistogramDump(info, name, min, max, mean, median, stddev, p75, p90, p95, p98, p99, p999);
}
 
开发者ID:axbaretto,项目名称:flink,代码行数:18,代码来源:MetricDumpSerialization.java

示例2: read

import org.apache.flink.core.memory.DataInputView; //导入方法依赖的package包/类
@Override
public void read(DataInputView in) throws IOException {
	diff = in.readDouble();
	rank = in.readDouble();
	danglingRank = in.readDouble();
	numDanglingVertices = in.readLong();
	numVertices = in.readLong();
	edges = in.readLong();
}
 
开发者ID:axbaretto,项目名称:flink,代码行数:10,代码来源:DanglingPageRankITCase.java

示例3: read

import org.apache.flink.core.memory.DataInputView; //导入方法依赖的package包/类
@Override
public void read(DataInputView in) throws IOException {
	int length = in.readInt();
	this.coordinates = new double[length];
	for (int i = 0; i < length; i++) {
		this.coordinates[i] = in.readDouble();
	}
}
 
开发者ID:axbaretto,项目名称:flink,代码行数:9,代码来源:CoordVector.java

示例4: deserialize

import org.apache.flink.core.memory.DataInputView; //导入方法依赖的package包/类
@Override
public double[] deserialize(DataInputView source) throws IOException {
	final int len = source.readInt();
	double[] result = new double[len];
	
	for (int i = 0; i < len; i++) {
		result[i] = source.readDouble();
	}
	
	return result;
}
 
开发者ID:axbaretto,项目名称:flink,代码行数:12,代码来源:DoublePrimitiveArraySerializer.java

示例5: compareSerialized

import org.apache.flink.core.memory.DataInputView; //导入方法依赖的package包/类
@Override 
public int compareSerialized(DataInputView firstSource, DataInputView secondSource) throws IOException {
	double l1 = firstSource.readDouble(); 
	double l2 = secondSource.readDouble(); 
	int comp = (l1 < l2 ? -1 : (l1 > l2 ? 1 : 0)); 
	return ascendingComparison ? comp : -comp; 
}
 
开发者ID:axbaretto,项目名称:flink,代码行数:8,代码来源:DoubleComparator.java

示例6: read

import org.apache.flink.core.memory.DataInputView; //导入方法依赖的package包/类
@Override
public void read(DataInputView in) throws IOException {
	position = in.readInt();
	mark = 0;

	ensureCapacity(position);

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

示例7: read

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

示例8: read

import org.apache.flink.core.memory.DataInputView; //导入方法依赖的package包/类
@Override
public void read(DataInputView in) throws IOException {
	synchronized (this.confData) {
		final int numberOfProperties = in.readInt();

		for (int i = 0; i < numberOfProperties; i++) {
			String key = StringValue.readString(in);
			Object value;

			byte type = in.readByte();
			switch (type) {
				case TYPE_STRING:
					value = StringValue.readString(in);
					break;
				case TYPE_INT:
					value = in.readInt();
					break;
				case TYPE_LONG:
					value = in.readLong();
					break;
				case TYPE_FLOAT:
					value = in.readFloat();
					break;
				case TYPE_DOUBLE:
					value = in.readDouble();
					break;
				case TYPE_BOOLEAN:
					value = in.readBoolean();
					break;
				case TYPE_BYTES:
					byte[] bytes = new byte[in.readInt()];
					in.readFully(bytes);
					value = bytes;
					break;
				default:
					throw new IOException("Unrecognized type: " + type);
			}

			this.confData.put(key, value);
		}
	}
}
 
开发者ID:axbaretto,项目名称:flink,代码行数:43,代码来源:Configuration.java

示例9: deserializeMeter

import org.apache.flink.core.memory.DataInputView; //导入方法依赖的package包/类
private static MetricDump.MeterDump deserializeMeter(DataInputView dis) throws IOException {
	QueryScopeInfo info = deserializeMetricInfo(dis);
	String name = dis.readUTF();
	double rate = dis.readDouble();
	return new MetricDump.MeterDump(info, name, rate);
}
 
开发者ID:axbaretto,项目名称:flink,代码行数:7,代码来源:MetricDumpSerialization.java

示例10: read

import org.apache.flink.core.memory.DataInputView; //导入方法依赖的package包/类
@Override
public void read(DataInputView in) throws IOException {
	val0 = in.readDouble();
	val1 = in.readLong();
}
 
开发者ID:axbaretto,项目名称:flink,代码行数:6,代码来源:TestTaskEvent.java


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