hadoop-common-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From lium...@apache.org
Subject [04/48] hadoop git commit: HADOOP-13801 regression: ITestS3AMiniYarnCluster failing. Contributed by Steve Loughran
Date Wed, 30 Nov 2016 05:00:54 GMT
HADOOP-13801 regression: ITestS3AMiniYarnCluster failing. Contributed by Steve Loughran


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

Branch: refs/heads/HADOOP-13345
Commit: 0de0c32ddd46eaf42198dbf24ec4344f6810ca09
Parents: 005850b
Author: Steve Loughran <stevel@apache.org>
Authored: Wed Nov 23 21:37:04 2016 +0000
Committer: Steve Loughran <stevel@apache.org>
Committed: Wed Nov 23 21:37:39 2016 +0000

----------------------------------------------------------------------
 .../hadoop/fs/s3a/yarn/ITestS3AMiniYarnCluster.java      | 11 ++++++++---
 1 file changed, 8 insertions(+), 3 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/hadoop/blob/0de0c32d/hadoop-tools/hadoop-aws/src/test/java/org/apache/hadoop/fs/s3a/yarn/ITestS3AMiniYarnCluster.java
----------------------------------------------------------------------
diff --git a/hadoop-tools/hadoop-aws/src/test/java/org/apache/hadoop/fs/s3a/yarn/ITestS3AMiniYarnCluster.java
b/hadoop-tools/hadoop-aws/src/test/java/org/apache/hadoop/fs/s3a/yarn/ITestS3AMiniYarnCluster.java
index d8ae313..6db4eba 100644
--- a/hadoop-tools/hadoop-aws/src/test/java/org/apache/hadoop/fs/s3a/yarn/ITestS3AMiniYarnCluster.java
+++ b/hadoop-tools/hadoop-aws/src/test/java/org/apache/hadoop/fs/s3a/yarn/ITestS3AMiniYarnCluster.java
@@ -24,13 +24,14 @@ import java.util.Map;
 import org.apache.hadoop.conf.Configuration;
 import org.apache.hadoop.examples.WordCount;
 import org.apache.hadoop.fs.CreateFlag;
+import org.apache.hadoop.fs.FSDataInputStream;
 import org.apache.hadoop.fs.FSDataOutputStream;
 import org.apache.hadoop.fs.FileContext;
 import org.apache.hadoop.fs.Path;
-import org.apache.hadoop.fs.contract.ContractTestUtils;
 import org.apache.hadoop.fs.s3a.AbstractS3ATestBase;
 import org.apache.hadoop.fs.s3a.S3AFileSystem;
 import org.apache.hadoop.fs.s3a.S3ATestUtils;
+import org.apache.hadoop.io.IOUtils;
 import org.apache.hadoop.io.IntWritable;
 import org.apache.hadoop.io.Text;
 import org.apache.hadoop.mapreduce.Job;
@@ -140,8 +141,12 @@ public class ITestS3AMiniYarnCluster extends AbstractS3ATestBase {
    * helper method.
    */
   private String readStringFromFile(Path path) throws IOException {
-    return ContractTestUtils.readBytesToString(fs, path,
-        (int) fs.getFileStatus(path).getLen());
+    try (FSDataInputStream in = fs.open(path)) {
+      long bytesLen = fs.getFileStatus(path).getLen();
+      byte[] buffer = new byte[(int) bytesLen];
+      IOUtils.readFully(in, buffer, 0, buffer.length);
+      return new String(buffer);
+    }
   }
 
 }


---------------------------------------------------------------------
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