hadoop-common-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From na...@apache.org
Subject hadoop git commit: HDDS-454. TestChunkStreams#testErrorReadGroupInputStream & TestChunkStreams#testReadGroupInputStream are failing. Contributed by chencan.
Date Fri, 14 Sep 2018 20:09:39 GMT
Repository: hadoop
Updated Branches:
  refs/heads/trunk c1df3084f -> 5470de420


HDDS-454. TestChunkStreams#testErrorReadGroupInputStream & TestChunkStreams#testReadGroupInputStream
are failing. Contributed by chencan.


Project: http://git-wip-us.apache.org/repos/asf/hadoop/repo
Commit: http://git-wip-us.apache.org/repos/asf/hadoop/commit/5470de42
Tree: http://git-wip-us.apache.org/repos/asf/hadoop/tree/5470de42
Diff: http://git-wip-us.apache.org/repos/asf/hadoop/diff/5470de42

Branch: refs/heads/trunk
Commit: 5470de420b2660e3042a5fec566ecc6b0d8ff93a
Parents: c1df308
Author: Nanda kumar <nanda@apache.org>
Authored: Sat Sep 15 01:38:13 2018 +0530
Committer: Nanda kumar <nanda@apache.org>
Committed: Sat Sep 15 01:38:57 2018 +0530

----------------------------------------------------------------------
 .../org/apache/hadoop/ozone/om/TestChunkStreams.java  | 14 ++++++++++----
 1 file changed, 10 insertions(+), 4 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/hadoop/blob/5470de42/hadoop-ozone/ozone-manager/src/test/java/org/apache/hadoop/ozone/om/TestChunkStreams.java
----------------------------------------------------------------------
diff --git a/hadoop-ozone/ozone-manager/src/test/java/org/apache/hadoop/ozone/om/TestChunkStreams.java
b/hadoop-ozone/ozone-manager/src/test/java/org/apache/hadoop/ozone/om/TestChunkStreams.java
index 7ce916a..7ff9d63 100644
--- a/hadoop-ozone/ozone-manager/src/test/java/org/apache/hadoop/ozone/om/TestChunkStreams.java
+++ b/hadoop-ozone/ozone-manager/src/test/java/org/apache/hadoop/ozone/om/TestChunkStreams.java
@@ -121,6 +121,7 @@ public class TestChunkStreams {
         int tempOffset = offset;
         ChunkInputStream in =
             new ChunkInputStream(null, null, null, new ArrayList<>(), null) {
+              private long pos = 0;
               private ByteArrayInputStream in =
                   new ByteArrayInputStream(buf, tempOffset, 100);
 
@@ -131,7 +132,7 @@ public class TestChunkStreams {
 
               @Override
               public long getPos() throws IOException {
-                throw new UnsupportedOperationException();
+                return pos;
               }
 
               @Override
@@ -147,7 +148,9 @@ public class TestChunkStreams {
 
               @Override
               public int read(byte[] b, int off, int len) throws IOException {
-                return in.read(b, off, len);
+                int readLen = in.read(b, off, len);
+                pos += readLen;
+                return readLen;
               }
             };
         inputStreams.add(in);
@@ -175,6 +178,7 @@ public class TestChunkStreams {
         int tempOffset = offset;
         ChunkInputStream in =
             new ChunkInputStream(null, null, null, new ArrayList<>(), null) {
+              private long pos = 0;
               private ByteArrayInputStream in =
                   new ByteArrayInputStream(buf, tempOffset, 100);
 
@@ -185,7 +189,7 @@ public class TestChunkStreams {
 
               @Override
               public long getPos() throws IOException {
-                throw new UnsupportedOperationException();
+                return pos;
               }
 
               @Override
@@ -201,7 +205,9 @@ public class TestChunkStreams {
 
               @Override
               public int read(byte[] b, int off, int len) throws IOException {
-                return in.read(b, off, len);
+                int readLen = in.read(b, off, len);
+                pos += readLen;
+                return readLen;
               }
             };
         inputStreams.add(in);


---------------------------------------------------------------------
To unsubscribe, e-mail: common-commits-unsubscribe@hadoop.apache.org
For additional commands, e-mail: common-commits-help@hadoop.apache.org


Mime
View raw message