Skip to content
Merged
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -78,22 +78,24 @@ public boolean hasNext() {
}

@Override
public Pair<Path, TimeseriesMetadata> next() {
public Pair<Path, TimeseriesMetadata> next() throws IOException {
try {
if (remainsInFile) {
// deserialize from file
return getTimeSerisMetadataFromFile();
return getTimeSeriesMetadataFromFile();
} else {
// get from memory iterator
return super.next();
}
} catch (IOException e) {
LOG.error("Meets IOException when reading timeseries metadata from disk", e);
return null;
if (!Thread.currentThread().isInterrupted()) {
LOG.error("Meets IOException when reading timeseries metadata from disk", e);
}
throw e;
}
Comment on lines 89 to 94
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

May catch ClosedByInterruptException and ignore it.

}

private Pair<Path, TimeseriesMetadata> getTimeSerisMetadataFromFile() throws IOException {
private Pair<Path, TimeseriesMetadata> getTimeSeriesMetadataFromFile() throws IOException {
if (currentPos == nextEndPosForDevice) {
// deserialize the current device name
currentDevice = Deserializer.DEFAULT_DESERIALIZER.deserializeFrom(input.wrapAsInputStream());
Expand Down
Loading