Skip to content

Commit

Permalink
Retry when seeking in PrestoS3FileSystem
Browse files Browse the repository at this point in the history
  • Loading branch information
yuyang.lan authored and electrum committed Apr 30, 2015
1 parent ba1024a commit 36b320b
Show file tree
Hide file tree
Showing 2 changed files with 9 additions and 3 deletions.
1 change: 1 addition & 0 deletions presto-docs/src/main/sphinx/release/release-0.102.rst
Original file line number Diff line number Diff line change
Expand Up @@ -11,3 +11,4 @@ Hive Changes
------------

* Collect more metrics from ``PrestoS3FileSystem``.
* Retry when seeking in ``PrestoS3FileSystem``.
Original file line number Diff line number Diff line change
Expand Up @@ -598,9 +598,14 @@ private void seekStream()
long skip = nextReadPosition - streamPosition;
if (skip <= max(in.available(), MAX_SKIP_SIZE.toBytes())) {
// already buffered or seek is small enough
if (in.skip(skip) == skip) {
streamPosition = nextReadPosition;
return;
try {
if (in.skip(skip) == skip) {
streamPosition = nextReadPosition;
return;
}
}
catch (IOException ignored) {
// will retry by re-opening the stream
}
}
}
Expand Down

0 comments on commit 36b320b

Please sign in to comment.