This is an automated email from the ASF dual-hosted git repository. shashikant pushed a commit to branch trunk in repository https://gitbox.apache.org/repos/asf/hadoop.git
The following commit(s) were added to refs/heads/trunk by this push: new 4123353 HDDS-1037. Fix the block discard logic in Ozone client. Contributed by Shashikant Banerjee. 4123353 is described below commit 4123353151c25d95d45f765d57094f5c8e21238c Author: Shashikant Banerjee <shashik...@apache.org> AuthorDate: Fri Feb 1 20:44:48 2019 +0530 HDDS-1037. Fix the block discard logic in Ozone client. Contributed by Shashikant Banerjee. --- .../main/java/org/apache/hadoop/ozone/client/io/KeyOutputStream.java | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/hadoop-ozone/client/src/main/java/org/apache/hadoop/ozone/client/io/KeyOutputStream.java b/hadoop-ozone/client/src/main/java/org/apache/hadoop/ozone/client/io/KeyOutputStream.java index 042acee..af39631 100644 --- a/hadoop-ozone/client/src/main/java/org/apache/hadoop/ozone/client/io/KeyOutputStream.java +++ b/hadoop-ozone/client/src/main/java/org/apache/hadoop/ozone/client/io/KeyOutputStream.java @@ -338,8 +338,9 @@ public class KeyOutputStream extends OutputStream { ListIterator<BlockOutputStreamEntry> streamEntryIterator = streamEntries.listIterator(currentStreamIndex); while (streamEntryIterator.hasNext()) { - if (streamEntryIterator.next().getBlockID().getContainerID() - == containerID) { + BlockOutputStreamEntry streamEntry = streamEntryIterator.next(); + if (streamEntry.getBlockID().getContainerID() + == containerID && streamEntry.getCurrentPosition() == 0) { streamEntryIterator.remove(); } } --------------------------------------------------------------------- To unsubscribe, e-mail: common-commits-unsubscr...@hadoop.apache.org For additional commands, e-mail: common-commits-h...@hadoop.apache.org