Repository: hadoop
Updated Branches:
refs/heads/branch-2 f5cc9f71e -> 726aee360
MAPREDUCE-7138. ThrottledContainerAllocator in MRAppBenchmark should implement
RMHeartbeatHandler. Contributed by Oleksandr Shevchenko
(cherry picked from commit 8382b860d4ef4f20d000537ded42a88e98bd2190)
Conflicts:
hadoop-mapreduce-project/hadoop-mapreduce-client/hadoop-mapreduce-client-app/src/test/java/org/apache/hadoop/mapreduce/v2/app/MRAppBenchmark.java
Project: http://git-wip-us.apache.org/repos/asf/hadoop/repo
Commit: http://git-wip-us.apache.org/repos/asf/hadoop/commit/726aee36
Tree: http://git-wip-us.apache.org/repos/asf/hadoop/tree/726aee36
Diff: http://git-wip-us.apache.org/repos/asf/hadoop/diff/726aee36
Branch: refs/heads/branch-2
Commit: 726aee360a8c96ad6726ac69817959ed66992695
Parents: f5cc9f7
Author: Jason Lowe <[email protected]>
Authored: Tue Sep 18 17:06:32 2018 -0500
Committer: Jason Lowe <[email protected]>
Committed: Tue Sep 18 17:19:21 2018 -0500
----------------------------------------------------------------------
.../hadoop/mapreduce/v2/app/MRAppBenchmark.java | 15 +++++++++++++--
1 file changed, 13 insertions(+), 2 deletions(-)
----------------------------------------------------------------------
http://git-wip-us.apache.org/repos/asf/hadoop/blob/726aee36/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 5569722..6bd808a 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
@@ -33,7 +33,9 @@ import
org.apache.hadoop.mapreduce.v2.app.job.event.TaskAttemptContainerAssigned
import org.apache.hadoop.mapreduce.v2.app.rm.ContainerAllocator;
import org.apache.hadoop.mapreduce.v2.app.rm.ContainerAllocatorEvent;
import org.apache.hadoop.mapreduce.v2.app.rm.RMContainerAllocator;
+import org.apache.hadoop.mapreduce.v2.app.rm.RMHeartbeatHandler;
import org.apache.hadoop.service.AbstractService;
+import org.apache.hadoop.util.Time;
import org.apache.hadoop.yarn.api.ApplicationMasterProtocol;
import org.apache.hadoop.yarn.api.protocolrecords.AllocateRequest;
import org.apache.hadoop.yarn.api.protocolrecords.AllocateResponse;
@@ -114,7 +116,7 @@ public class MRAppBenchmark {
}
class ThrottledContainerAllocator extends AbstractService
- implements ContainerAllocator {
+ implements ContainerAllocator, RMHeartbeatHandler {
private int containerCount;
private Thread thread;
private BlockingQueue<ContainerAllocatorEvent> eventQueue =
@@ -179,6 +181,15 @@ public class MRAppBenchmark {
}
super.serviceStop();
}
+
+ @Override
+ public long getLastHeartbeatTime() {
+ return Time.now();
+ }
+
+ @Override
+ public void runOnNextHeartbeat(Runnable callback) {
+ }
}
}
@@ -259,7 +270,7 @@ public class MRAppBenchmark {
});
}
- @Test
+ @Test(timeout = 60000)
public void benchmark2() throws Exception {
int maps = 100; // Adjust for benchmarking, start with a couple of
thousands
int reduces = 50;
---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]