本文整理汇总了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);
}
示例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();
}
示例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();
}
}
示例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;
}
示例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;
}
示例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();
}
}
示例7: read
import org.apache.flink.core.memory.DataInputView; //导入方法依赖的package包/类
@Override
public void read(DataInputView in) throws IOException {
this.value = in.readDouble();
}
示例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);
}
}
}
示例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);
}
示例10: read
import org.apache.flink.core.memory.DataInputView; //导入方法依赖的package包/类
@Override
public void read(DataInputView in) throws IOException {
val0 = in.readDouble();
val1 = in.readLong();
}