Skip to content

Commit

Permalink
don't print exception log when thread is interrupted
Browse files Browse the repository at this point in the history
  • Loading branch information
shuwenwei committed Jan 23, 2025
1 parent 02727c5 commit 2ea3738
Showing 1 changed file with 7 additions and 5 deletions.
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;
}
}

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

0 comments on commit 2ea3738

Please sign in to comment.