Java Code Examples for org.apache.flink.core.memory.DataOutputView#writeFloat()
The following examples show how to use
org.apache.flink.core.memory.DataOutputView#writeFloat() .
You can vote up the ones you like or vote down the ones you don't like,
and go to the original project or source file by following the links above each example. You may check out the related API usage on the sidebar.
Example 1
Source File: FloatValueArray.java From flink with Apache License 2.0 | 5 votes |
@Override public void write(DataOutputView out) throws IOException { out.writeInt(position); for (int i = 0; i < position; i++) { out.writeFloat(data[i]); } }
Example 2
Source File: FloatValueArray.java From flink with Apache License 2.0 | 5 votes |
@Override public void write(DataOutputView out) throws IOException { out.writeInt(position); for (int i = 0; i < position; i++) { out.writeFloat(data[i]); } }
Example 3
Source File: FloatValueArray.java From Flink-CEPplus with Apache License 2.0 | 5 votes |
@Override public void write(DataOutputView out) throws IOException { out.writeInt(position); for (int i = 0; i < position; i++) { out.writeFloat(data[i]); } }
Example 4
Source File: FloatPrimitiveArraySerializer.java From flink with Apache License 2.0 | 5 votes |
@Override public void serialize(float[] 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.writeFloat(record[i]); } }
Example 5
Source File: FloatPrimitiveArraySerializer.java From Flink-CEPplus with Apache License 2.0 | 5 votes |
@Override public void serialize(float[] 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.writeFloat(record[i]); } }
Example 6
Source File: FloatSerializer.java From flink with Apache License 2.0 | 4 votes |
@Override public void copy(DataInputView source, DataOutputView target) throws IOException { target.writeFloat(source.readFloat()); }
Example 7
Source File: FloatValueSerializer.java From flink with Apache License 2.0 | 4 votes |
@Override public void copy(DataInputView source, DataOutputView target) throws IOException { target.writeFloat(source.readFloat()); }
Example 8
Source File: FloatSerializer.java From flink with Apache License 2.0 | 4 votes |
@Override public void copy(DataInputView source, DataOutputView target) throws IOException { target.writeFloat(source.readFloat()); }
Example 9
Source File: FloatSerializer.java From flink with Apache License 2.0 | 4 votes |
@Override public void serialize(Float record, DataOutputView target) throws IOException { target.writeFloat(record); }
Example 10
Source File: FloatType.java From flink with Apache License 2.0 | 4 votes |
@Override public void write(DataOutputView out) throws IOException { out.writeFloat(this.value); }
Example 11
Source File: FloatType.java From flink with Apache License 2.0 | 4 votes |
@Override public void write(DataOutputView out) throws IOException { out.writeFloat(this.value); }
Example 12
Source File: Configuration.java From flink with Apache License 2.0 | 4 votes |
@Override public void write(final DataOutputView out) throws IOException { synchronized (this.confData) { out.writeInt(this.confData.size()); for (Map.Entry<String, Object> entry : this.confData.entrySet()) { String key = entry.getKey(); Object val = entry.getValue(); StringValue.writeString(key, out); Class<?> clazz = val.getClass(); if (clazz == String.class) { out.write(TYPE_STRING); StringValue.writeString((String) val, out); } else if (clazz == Integer.class) { out.write(TYPE_INT); out.writeInt((Integer) val); } else if (clazz == Long.class) { out.write(TYPE_LONG); out.writeLong((Long) val); } else if (clazz == Float.class) { out.write(TYPE_FLOAT); out.writeFloat((Float) val); } else if (clazz == Double.class) { out.write(TYPE_DOUBLE); out.writeDouble((Double) val); } else if (clazz == byte[].class) { out.write(TYPE_BYTES); byte[] bytes = (byte[]) val; out.writeInt(bytes.length); out.write(bytes); } else if (clazz == Boolean.class) { out.write(TYPE_BOOLEAN); out.writeBoolean((Boolean) val); } else { throw new IllegalArgumentException("Unrecognized type"); } } } }
Example 13
Source File: FloatValue.java From flink with Apache License 2.0 | 4 votes |
@Override public void write(DataOutputView out) throws IOException { out.writeFloat(this.value); }
Example 14
Source File: FloatValueSerializer.java From flink with Apache License 2.0 | 4 votes |
@Override public void copy(DataInputView source, DataOutputView target) throws IOException { target.writeFloat(source.readFloat()); }
Example 15
Source File: FloatSerializer.java From flink with Apache License 2.0 | 4 votes |
@Override public void serialize(Float record, DataOutputView target) throws IOException { target.writeFloat(record); }
Example 16
Source File: FloatType.java From Flink-CEPplus with Apache License 2.0 | 4 votes |
@Override public void write(DataOutputView out) throws IOException { out.writeFloat(this.value); }
Example 17
Source File: FloatValue.java From Flink-CEPplus with Apache License 2.0 | 4 votes |
@Override public void write(DataOutputView out) throws IOException { out.writeFloat(this.value); }
Example 18
Source File: FloatValueSerializer.java From Flink-CEPplus with Apache License 2.0 | 4 votes |
@Override public void copy(DataInputView source, DataOutputView target) throws IOException { target.writeFloat(source.readFloat()); }
Example 19
Source File: FloatSerializer.java From Flink-CEPplus with Apache License 2.0 | 4 votes |
@Override public void copy(DataInputView source, DataOutputView target) throws IOException { target.writeFloat(source.readFloat()); }
Example 20
Source File: FloatSerializer.java From Flink-CEPplus with Apache License 2.0 | 4 votes |
@Override public void serialize(Float record, DataOutputView target) throws IOException { target.writeFloat(record); }