Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Don't print exception log when thread is interrupted #386

Open
wants to merge 1 commit into
base: develop
Choose a base branch
from
Open
Changes from all commits
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 90 to 95
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