tez-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From ss...@apache.org
Subject tez git commit: TEZ-2903. Stop using proprietary APIs in RPCLoadGen. Contributed by Chetna Chaudhari.
Date Thu, 22 Oct 2015 15:50:35 GMT
Repository: tez
Updated Branches:
  refs/heads/master 287da6a70 -> 01ad29e44


TEZ-2903. Stop using proprietary APIs in RPCLoadGen. Contributed by Chetna Chaudhari.


Project: http://git-wip-us.apache.org/repos/asf/tez/repo
Commit: http://git-wip-us.apache.org/repos/asf/tez/commit/01ad29e4
Tree: http://git-wip-us.apache.org/repos/asf/tez/tree/01ad29e4
Diff: http://git-wip-us.apache.org/repos/asf/tez/diff/01ad29e4

Branch: refs/heads/master
Commit: 01ad29e44bfb3ca9d6bfff2cc82444e406721b2a
Parents: 287da6a
Author: Siddharth Seth <sseth@apache.org>
Authored: Thu Oct 22 08:50:00 2015 -0700
Committer: Siddharth Seth <sseth@apache.org>
Committed: Thu Oct 22 08:50:00 2015 -0700

----------------------------------------------------------------------
 CHANGES.txt                                                   | 1 +
 .../java/org/apache/tez/mapreduce/examples/RPCLoadGen.java    | 7 ++++---
 2 files changed, 5 insertions(+), 3 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/tez/blob/01ad29e4/CHANGES.txt
----------------------------------------------------------------------
diff --git a/CHANGES.txt b/CHANGES.txt
index aed21ab..aec51ed 100644
--- a/CHANGES.txt
+++ b/CHANGES.txt
@@ -6,6 +6,7 @@ Release 0.8.2: Unreleased
 INCOMPATIBLE CHANGES
 
 ALL CHANGES:
+  TEZ-2903. Stop using proprietary APIs in RPCLoadGen.
   TEZ-2882. Consider improving fetch failure handling
   TEZ-2850. Tez MergeManager OOM for small Map Outputs
   TEZ-1888. Fix javac warnings all over codebase.

http://git-wip-us.apache.org/repos/asf/tez/blob/01ad29e4/tez-tests/src/main/java/org/apache/tez/mapreduce/examples/RPCLoadGen.java
----------------------------------------------------------------------
diff --git a/tez-tests/src/main/java/org/apache/tez/mapreduce/examples/RPCLoadGen.java b/tez-tests/src/main/java/org/apache/tez/mapreduce/examples/RPCLoadGen.java
index bf3e9db..600790c 100644
--- a/tez-tests/src/main/java/org/apache/tez/mapreduce/examples/RPCLoadGen.java
+++ b/tez-tests/src/main/java/org/apache/tez/mapreduce/examples/RPCLoadGen.java
@@ -25,6 +25,8 @@ import java.util.Map;
 import java.util.Random;
 
 import com.google.common.base.Stopwatch;
+
+import org.apache.commons.io.IOUtils;
 import org.slf4j.Logger;
 import org.slf4j.LoggerFactory;
 import org.apache.hadoop.conf.Configuration;
@@ -48,7 +50,6 @@ import org.apache.tez.dag.api.Vertex;
 import org.apache.tez.examples.TezExampleBase;
 import org.apache.tez.runtime.api.ProcessorContext;
 import org.apache.tez.runtime.library.processor.SimpleProcessor;
-import sun.misc.IOUtils;
 
 public class RPCLoadGen extends TezExampleBase {
 
@@ -194,12 +195,12 @@ public class RPCLoadGen extends TezExampleBase {
         LOG.info("Reading from local filesystem");
         FileSystem localFs = FileSystem.getLocal(new Configuration());
         FSDataInputStream is = localFs.open(new Path(DISK_PAYLOAD_NAME));
-        IOUtils.readFully(is, -1, false);
+        IOUtils.toByteArray(is);
       } else if (modeByte == VIA_HDFS_DIRECT_READ_BYTE) {
         LOG.info("Reading from HDFS");
         FileSystem fs = FileSystem.get(new Configuration());
         FSDataInputStream is = fs.open(new Path(Path.SEPARATOR + "tmp", DISK_PAYLOAD_NAME));
-        IOUtils.readFully(is, -1, false);
+        IOUtils.toByteArray(is);
       } else {
         throw new IllegalArgumentException("Unknown execution mode: [" + modeByte + "]");
       }


Mime
View raw message