hadoop-common-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From cur...@apache.org
Subject [05/49] hadoop git commit: YARN-7722. Rename variables in MockNM, MockRM for better clarity. Contributed by Lovekesh bansal
Date Thu, 18 Jan 2018 23:47:36 GMT
YARN-7722. Rename variables in MockNM, MockRM for better clarity. Contributed by Lovekesh bansal


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

Branch: refs/heads/YARN-7402
Commit: afd8caba2730262cb8c5d7c4a5d2d1081b671f1d
Parents: d98a2e6
Author: Sunil G <sunilg@apache.org>
Authored: Wed Jan 10 20:51:34 2018 +0530
Committer: Sunil G <sunilg@apache.org>
Committed: Wed Jan 10 20:51:34 2018 +0530

----------------------------------------------------------------------
 .../yarn/server/resourcemanager/MockNM.java     | 26 ++++++++++----------
 .../yarn/server/resourcemanager/MockRM.java     |  4 +--
 2 files changed, 15 insertions(+), 15 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/hadoop/blob/afd8caba/hadoop-yarn-project/hadoop-yarn/hadoop-yarn-server/hadoop-yarn-server-resourcemanager/src/test/java/org/apache/hadoop/yarn/server/resourcemanager/MockNM.java
----------------------------------------------------------------------
diff --git a/hadoop-yarn-project/hadoop-yarn/hadoop-yarn-server/hadoop-yarn-server-resourcemanager/src/test/java/org/apache/hadoop/yarn/server/resourcemanager/MockNM.java
b/hadoop-yarn-project/hadoop-yarn/hadoop-yarn-server/hadoop-yarn-server-resourcemanager/src/test/java/org/apache/hadoop/yarn/server/resourcemanager/MockNM.java
index 909d023..05b51e3 100644
--- a/hadoop-yarn-project/hadoop-yarn/hadoop-yarn-server/hadoop-yarn-server-resourcemanager/src/test/java/org/apache/hadoop/yarn/server/resourcemanager/MockNM.java
+++ b/hadoop-yarn-project/hadoop-yarn/hadoop-yarn-server/hadoop-yarn-server-resourcemanager/src/test/java/org/apache/hadoop/yarn/server/resourcemanager/MockNM.java
@@ -55,7 +55,7 @@ public class MockNM {
 
   private int responseId;
   private NodeId nodeId;
-  private Resource capatibility;
+  private Resource capability;
   private ResourceTrackerService resourceTracker;
   private int httpPort = 2;
   private MasterKey currentContainerTokenMasterKey;
@@ -86,15 +86,15 @@ public class MockNM {
         version);
   }
 
-  public MockNM(String nodeIdStr, Resource capatibility,
+  public MockNM(String nodeIdStr, Resource capability,
       ResourceTrackerService resourceTracker) {
-    this(nodeIdStr, capatibility, resourceTracker,
+    this(nodeIdStr, capability, resourceTracker,
         YarnVersionInfo.getVersion());
   }
 
-  public MockNM(String nodeIdStr, Resource capatibility,
+  public MockNM(String nodeIdStr, Resource capability,
       ResourceTrackerService resourceTracker, String version) {
-    this.capatibility = capatibility;
+    this.capability = capability;
     this.resourceTracker = resourceTracker;
     this.version = version;
     String[] splits = nodeIdStr.split(":");
@@ -166,7 +166,7 @@ public class MockNM {
         RegisterNodeManagerRequest.class);
     req.setNodeId(nodeId);
     req.setHttpPort(httpPort);
-    req.setResource(capatibility);
+    req.setResource(capability);
     req.setContainerStatuses(containerReports);
     req.setNMVersion(version);
     req.setRunningApplications(runningApplications);
@@ -177,7 +177,7 @@ public class MockNM {
     this.currentNMTokenMasterKey = registrationResponse.getNMTokenMasterKey();
     Resource newResource = registrationResponse.getResource();
     if (newResource != null) {
-      capatibility = Resources.clone(newResource);
+      capability = Resources.clone(newResource);
     }
     containerStats.clear();
     if (containerReports != null) {
@@ -202,7 +202,7 @@ public class MockNM {
       long containerId, ContainerState containerState) throws Exception {
     ContainerStatus containerStatus = BuilderUtils.newContainerStatus(
         BuilderUtils.newContainerId(attemptId, containerId), containerState,
-        "Success", 0, capatibility);
+        "Success", 0, capability);
     ArrayList<ContainerStatus> containerStatusList =
         new ArrayList<ContainerStatus>(1);
     containerStatusList.add(containerStatus);
@@ -282,22 +282,22 @@ public class MockNM {
 
     Resource newResource = heartbeatResponse.getResource();
     if (newResource != null) {
-      capatibility = Resources.clone(newResource);
+      capability = Resources.clone(newResource);
     }
 
     return heartbeatResponse;
   }
 
   public long getMemory() {
-    return capatibility.getMemorySize();
+    return capability.getMemorySize();
   }
 
   public int getvCores() {
-    return capatibility.getVirtualCores();
+    return capability.getVirtualCores();
   }
 
-  public Resource getCapatibility() {
-    return capatibility;
+  public Resource getCapability() {
+    return capability;
   }
 
   public String getVersion() {

http://git-wip-us.apache.org/repos/asf/hadoop/blob/afd8caba/hadoop-yarn-project/hadoop-yarn/hadoop-yarn-server/hadoop-yarn-server-resourcemanager/src/test/java/org/apache/hadoop/yarn/server/resourcemanager/MockRM.java
----------------------------------------------------------------------
diff --git a/hadoop-yarn-project/hadoop-yarn/hadoop-yarn-server/hadoop-yarn-server-resourcemanager/src/test/java/org/apache/hadoop/yarn/server/resourcemanager/MockRM.java
b/hadoop-yarn-project/hadoop-yarn/hadoop-yarn-server/hadoop-yarn-server-resourcemanager/src/test/java/org/apache/hadoop/yarn/server/resourcemanager/MockRM.java
index 302f5b3..2df3788 100644
--- a/hadoop-yarn-project/hadoop-yarn/hadoop-yarn-server/hadoop-yarn-server-resourcemanager/src/test/java/org/apache/hadoop/yarn/server/resourcemanager/MockRM.java
+++ b/hadoop-yarn-project/hadoop-yarn/hadoop-yarn-server/hadoop-yarn-server-resourcemanager/src/test/java/org/apache/hadoop/yarn/server/resourcemanager/MockRM.java
@@ -855,9 +855,9 @@ public class MockRM extends ResourceManager {
     return nm;
   }
 
-  public MockNM registerNode(String nodeIdStr, Resource nodeCapatibility)
+  public MockNM registerNode(String nodeIdStr, Resource nodeCapability)
       throws Exception {
-    MockNM nm = new MockNM(nodeIdStr, nodeCapatibility,
+    MockNM nm = new MockNM(nodeIdStr, nodeCapability,
         getResourceTrackerService());
     nm.registerNode();
     drainEventsImplicitly();


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