diff --git a/hadoop-hdfs-project/hadoop-hdfs-client/src/main/java/org/apache/hadoop/hdfs/StripeReader.java b/hadoop-hdfs-project/hadoop-hdfs-client/src/main/java/org/apache/hadoop/hdfs/StripeReader.java index bc39bace79588..9705a9c45b3d6 100644 --- a/hadoop-hdfs-project/hadoop-hdfs-client/src/main/java/org/apache/hadoop/hdfs/StripeReader.java +++ b/hadoop-hdfs-project/hadoop-hdfs-client/src/main/java/org/apache/hadoop/hdfs/StripeReader.java @@ -198,7 +198,7 @@ private void readDataForDecoding() throws IOException { checkMissingBlocks(); } - void readParityChunks(int num) throws IOException { + private void readParityChunks(int num) throws IOException { for (int i = dataBlkNum, j = 0; i < dataBlkNum + parityBlkNum && j < num; i++) { if (alignedStripe.chunks[i] == null) { @@ -298,7 +298,7 @@ private Callable readCells(final BlockReader reader, }; } - boolean readChunk(final LocatedBlock block, int chunkIndex) + private boolean readChunk(final LocatedBlock block, int chunkIndex) throws IOException { final StripingChunk chunk = alignedStripe.chunks[chunkIndex]; if (block == null) { @@ -353,7 +353,7 @@ void readStripe() throws IOException { readParityChunks(alignedStripe.missingChunksNum); } } catch (IOException e) { - dfsStripedInputStream.close(); + dfsStripedInputStream.closeCurrentBlockReaders(); throw e; } // TODO: for a full stripe we can start reading (dataBlkNum + 1) chunks @@ -397,7 +397,7 @@ void readStripe() throws IOException { } catch (InterruptedException ie) { String err = "Read request interrupted"; DFSClient.LOG.error(err, ie); - dfsStripedInputStream.close(); + dfsStripedInputStream.closeCurrentBlockReaders(); clearFutures(); // Don't decode if read interrupted throw new InterruptedIOException(err);