Repository: hadoop
Updated Branches:
  refs/heads/branch-2 88e2ca405 -> f5cc9f71e


MAPREDUCE-7137. MRAppBenchmark.benchmark1() fails with NullPointerException. 
Contributed by Oleksandr Shevchenko

(cherry picked from commit 34b2237e420cfbe3a97ddd44968de8bbe1ed30ab)


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

Branch: refs/heads/branch-2
Commit: f5cc9f71e6ba733ee812bbb0d907206bfc345443
Parents: 88e2ca4
Author: Jason Lowe <[email protected]>
Authored: Tue Sep 18 16:56:31 2018 -0500
Committer: Jason Lowe <[email protected]>
Committed: Tue Sep 18 17:15:58 2018 -0500

----------------------------------------------------------------------
 .../java/org/apache/hadoop/mapreduce/v2/app/MRAppBenchmark.java | 5 ++++-
 1 file changed, 4 insertions(+), 1 deletion(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/hadoop/blob/f5cc9f71/hadoop-mapreduce-project/hadoop-mapreduce-client/hadoop-mapreduce-client-app/src/test/java/org/apache/hadoop/mapreduce/v2/app/MRAppBenchmark.java
----------------------------------------------------------------------
diff --git 
a/hadoop-mapreduce-project/hadoop-mapreduce-client/hadoop-mapreduce-client-app/src/test/java/org/apache/hadoop/mapreduce/v2/app/MRAppBenchmark.java
 
b/hadoop-mapreduce-project/hadoop-mapreduce-client/hadoop-mapreduce-client-app/src/test/java/org/apache/hadoop/mapreduce/v2/app/MRAppBenchmark.java
index 744ca10..5569722 100644
--- 
a/hadoop-mapreduce-project/hadoop-mapreduce-client/hadoop-mapreduce-client-app/src/test/java/org/apache/hadoop/mapreduce/v2/app/MRAppBenchmark.java
+++ 
b/hadoop-mapreduce-project/hadoop-mapreduce-client/hadoop-mapreduce-client-app/src/test/java/org/apache/hadoop/mapreduce/v2/app/MRAppBenchmark.java
@@ -44,6 +44,7 @@ import 
org.apache.hadoop.yarn.api.protocolrecords.RegisterApplicationMasterRespo
 import org.apache.hadoop.yarn.api.records.Container;
 import org.apache.hadoop.yarn.api.records.ContainerId;
 import org.apache.hadoop.yarn.api.records.NodeId;
+import org.apache.hadoop.yarn.api.records.Priority;
 import org.apache.hadoop.yarn.api.records.Resource;
 import org.apache.hadoop.yarn.api.records.ResourceRequest;
 import org.apache.hadoop.yarn.exceptions.YarnRuntimeException;
@@ -181,7 +182,7 @@ public class MRAppBenchmark {
     }
   }
 
-  @Test
+  @Test(timeout = 60000)
   public void benchmark1() throws Exception {
     int maps = 100; // Adjust for benchmarking. Start with thousands.
     int reduces = 0;
@@ -206,6 +207,7 @@ public class MRAppBenchmark {
                     Records.newRecord(RegisterApplicationMasterResponse.class);
                 response.setMaximumResourceCapability(Resource.newInstance(
                   10240, 1));
+                response.setQueue("queue1");
                 return response;
               }
 
@@ -247,6 +249,7 @@ public class MRAppBenchmark {
                 response.setAllocatedContainers(containers);
                 response.setResponseId(request.getResponseId() + 1);
                 response.setNumClusterNodes(350);
+                response.setApplicationPriority(Priority.newInstance(100));
                 return response;
               }
             };


---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]

Reply via email to