steveloughran commented on code in PR #5274: URL: https://github.com/apache/hadoop/pull/5274#discussion_r1094943230
########## hadoop-common-project/hadoop-common/src/main/java/org/apache/hadoop/fs/impl/prefetch/CachingBlockManager.java: ########## @@ -302,7 +302,13 @@ public void cancelPrefetches() { private void read(BufferData data) throws IOException { synchronized (data) { - readBlock(data, false, BufferData.State.BLANK); + try { + readBlock(data, false, BufferData.State.BLANK); + } catch(Exception e) { Review Comment: add a space between catch and "(", and only catch IOException ########## hadoop-common-project/hadoop-common/src/main/java/org/apache/hadoop/fs/impl/prefetch/CachingBlockManager.java: ########## @@ -302,7 +302,13 @@ public void cancelPrefetches() { private void read(BufferData data) throws IOException { synchronized (data) { - readBlock(data, false, BufferData.State.BLANK); + try { + readBlock(data, false, BufferData.State.BLANK); + } catch(Exception e) { + String message = String.format("error reading block %s", data.getBlockNumber()); + LOG.error(message, e); Review Comment: the string formatting can go into the LOG.error() just like the ones below -- This is an automated message from the Apache Git Service. To respond to the message, please log on to GitHub and use the URL above to go to the specific comment. To unsubscribe, e-mail: common-issues-unsubscr...@hadoop.apache.org For queries about this service, please contact Infrastructure at: us...@infra.apache.org --------------------------------------------------------------------- To unsubscribe, e-mail: common-issues-unsubscr...@hadoop.apache.org For additional commands, e-mail: common-issues-h...@hadoop.apache.org