HADOOP-18351. Reduce excess logging of errors during S3A prefetching reads (#5274)
Contributed by Ankit Saurabh
This commit is contained in:
parent
4cbe19f3a2
commit
f4f2793f3b
@ -302,7 +302,12 @@ public void cancelPrefetches() {
|
|||||||
|
|
||||||
private void read(BufferData data) throws IOException {
|
private void read(BufferData data) throws IOException {
|
||||||
synchronized (data) {
|
synchronized (data) {
|
||||||
|
try {
|
||||||
readBlock(data, false, BufferData.State.BLANK);
|
readBlock(data, false, BufferData.State.BLANK);
|
||||||
|
} catch (IOException e) {
|
||||||
|
LOG.error("error reading block {}", data.getBlockNumber(), e);
|
||||||
|
throw e;
|
||||||
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -362,9 +367,6 @@ private void readBlock(BufferData data, boolean isPrefetch, BufferData.State...
|
|||||||
buffer.flip();
|
buffer.flip();
|
||||||
data.setReady(expectedState);
|
data.setReady(expectedState);
|
||||||
} catch (Exception e) {
|
} catch (Exception e) {
|
||||||
String message = String.format("error during readBlock(%s)", data.getBlockNumber());
|
|
||||||
LOG.error(message, e);
|
|
||||||
|
|
||||||
if (isPrefetch && tracker != null) {
|
if (isPrefetch && tracker != null) {
|
||||||
tracker.failed();
|
tracker.failed();
|
||||||
}
|
}
|
||||||
@ -406,7 +408,8 @@ public Void get() {
|
|||||||
try {
|
try {
|
||||||
blockManager.prefetch(data, taskQueuedStartTime);
|
blockManager.prefetch(data, taskQueuedStartTime);
|
||||||
} catch (Exception e) {
|
} catch (Exception e) {
|
||||||
LOG.error("error during prefetch", e);
|
LOG.info("error prefetching block {}. {}", data.getBlockNumber(), e.getMessage());
|
||||||
|
LOG.debug("error prefetching block {}", data.getBlockNumber(), e);
|
||||||
}
|
}
|
||||||
return null;
|
return null;
|
||||||
}
|
}
|
||||||
@ -493,7 +496,8 @@ private void addToCacheAndRelease(BufferData data, Future<Void> blockFuture,
|
|||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
} catch (Exception e) {
|
} catch (Exception e) {
|
||||||
LOG.error("error waiting on blockFuture: {}", data, e);
|
LOG.info("error waiting on blockFuture: {}. {}", data, e.getMessage());
|
||||||
|
LOG.debug("error waiting on blockFuture: {}", data, e);
|
||||||
data.setDone();
|
data.setDone();
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
@ -523,8 +527,8 @@ private void addToCacheAndRelease(BufferData data, Future<Void> blockFuture,
|
|||||||
data.setDone();
|
data.setDone();
|
||||||
} catch (Exception e) {
|
} catch (Exception e) {
|
||||||
numCachingErrors.incrementAndGet();
|
numCachingErrors.incrementAndGet();
|
||||||
String message = String.format("error adding block to cache after wait: %s", data);
|
LOG.info("error adding block to cache after wait: {}. {}", data, e.getMessage());
|
||||||
LOG.error(message, e);
|
LOG.debug("error adding block to cache after wait: {}", data, e);
|
||||||
data.setDone();
|
data.setDone();
|
||||||
}
|
}
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user