use of org.apache.avro.file.DataFileReader in project mist by snuspl.
the class AvroExecutionVertexStore method loadAvroPhysicalSourceOutgoingEdgesInfoFromFile.
// TODO: [MIST-*] Implement policy for deleting from disk. Currently does not delete from disk.
private AvroPhysicalSourceOutgoingEdgesInfo loadAvroPhysicalSourceOutgoingEdgesInfoFromFile(final File storedSource) {
try {
final DataFileReader<AvroPhysicalSourceOutgoingEdgesInfo> dataFileReader = new DataFileReader<>(storedSource, sourceDatumReader);
AvroPhysicalSourceOutgoingEdgesInfo avroPhysicalSourceOutgoingEdgesInfo = null;
avroPhysicalSourceOutgoingEdgesInfo = dataFileReader.next(avroPhysicalSourceOutgoingEdgesInfo);
return avroPhysicalSourceOutgoingEdgesInfo;
} catch (IOException e) {
throw new RuntimeException("Loading AvroPhysicalSourceOutgoingEdgesInfo has failed.");
}
}
Aggregations