Search in sources :

Example 1 with NoFetchingInput

use of org.apache.flink.api.java.typeutils.runtime.NoFetchingInput in project flink by apache.

the class KryoSerializer method deserialize.

@SuppressWarnings("unchecked")
@Override
public T deserialize(DataInputView source) throws IOException {
    checkKryoInitialized();
    if (source != previousIn) {
        DataInputViewStream inputStream = new DataInputViewStream(source);
        input = new NoFetchingInput(inputStream);
        previousIn = source;
    }
    try {
        return (T) kryo.readClassAndObject(input);
    } catch (KryoException ke) {
        Throwable cause = ke.getCause();
        if (cause instanceof EOFException) {
            throw (EOFException) cause;
        } else {
            throw ke;
        }
    }
}
Also used : KryoException(com.esotericsoftware.kryo.KryoException) EOFException(java.io.EOFException) DataInputViewStream(org.apache.flink.api.java.typeutils.runtime.DataInputViewStream) NoFetchingInput(org.apache.flink.api.java.typeutils.runtime.NoFetchingInput)

Aggregations

KryoException (com.esotericsoftware.kryo.KryoException)1 EOFException (java.io.EOFException)1 DataInputViewStream (org.apache.flink.api.java.typeutils.runtime.DataInputViewStream)1 NoFetchingInput (org.apache.flink.api.java.typeutils.runtime.NoFetchingInput)1