use of org.apache.flink.connector.file.src.PendingSplitsCheckpoint in project flink by apache.
the class ContinuousHivePendingSplitsCheckpointSerializer method deserializeV1.
private PendingSplitsCheckpoint<HiveSourceSplit> deserializeV1(DataInputViewStreamWrapper inputWrapper) throws IOException {
byte[] superBytes = new byte[inputWrapper.readInt()];
inputWrapper.readFully(superBytes);
PendingSplitsCheckpoint<HiveSourceSplit> superCP = superSerDe.deserialize(superSerDe.getVersion(), superBytes);
try {
Comparable<?> currentReadOffset = readOffsetSerDe.deserialize(inputWrapper);
int numParts = inputWrapper.readInt();
List<List<String>> parts = new ArrayList<>(numParts);
for (int i = 0; i < numParts; i++) {
parts.add(partitionSerDe.deserialize(inputWrapper));
}
return new ContinuousHivePendingSplitsCheckpoint(superCP.getSplits(), currentReadOffset, parts);
} catch (ClassNotFoundException e) {
throw new IOException("Failed to deserialize " + getClass().getName(), e);
}
}
Aggregations