hadoop-common-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From w...@apache.org
Subject hadoop git commit: YARN-8969. AbstractYarnScheduler#getNodeTracker should return generic type to avoid type casting. Contributed by Wanqiang Ji.
Date Tue, 06 Nov 2018 05:47:06 GMT
Repository: hadoop
Updated Branches:
  refs/heads/branch-3.0 4b47daa64 -> c3a0f07db


YARN-8969. AbstractYarnScheduler#getNodeTracker should return generic type to avoid type casting.
Contributed by Wanqiang Ji.

(cherry picked from commit c7fcca0d7ec9e31d43ef3040ecd576ec808f1f8b)


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

Branch: refs/heads/branch-3.0
Commit: c3a0f07db0bf3b2926118d6331c6a99267a1b101
Parents: 4b47daa
Author: Weiwei Yang <wwei@apache.org>
Authored: Tue Nov 6 13:14:57 2018 +0800
Committer: Weiwei Yang <wwei@apache.org>
Committed: Tue Nov 6 13:43:24 2018 +0800

----------------------------------------------------------------------
 .../server/resourcemanager/scheduler/AbstractYarnScheduler.java    | 2 +-
 .../server/resourcemanager/scheduler/fair/FSPreemptionThread.java  | 2 +-
 2 files changed, 2 insertions(+), 2 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/hadoop/blob/c3a0f07d/hadoop-yarn-project/hadoop-yarn/hadoop-yarn-server/hadoop-yarn-server-resourcemanager/src/main/java/org/apache/hadoop/yarn/server/resourcemanager/scheduler/AbstractYarnScheduler.java
----------------------------------------------------------------------
diff --git a/hadoop-yarn-project/hadoop-yarn/hadoop-yarn-server/hadoop-yarn-server-resourcemanager/src/main/java/org/apache/hadoop/yarn/server/resourcemanager/scheduler/AbstractYarnScheduler.java
b/hadoop-yarn-project/hadoop-yarn/hadoop-yarn-server/hadoop-yarn-server-resourcemanager/src/main/java/org/apache/hadoop/yarn/server/resourcemanager/scheduler/AbstractYarnScheduler.java
index 7847573..50e7b10 100644
--- a/hadoop-yarn-project/hadoop-yarn/hadoop-yarn-server/hadoop-yarn-server-resourcemanager/src/main/java/org/apache/hadoop/yarn/server/resourcemanager/scheduler/AbstractYarnScheduler.java
+++ b/hadoop-yarn-project/hadoop-yarn/hadoop-yarn-server/hadoop-yarn-server-resourcemanager/src/main/java/org/apache/hadoop/yarn/server/resourcemanager/scheduler/AbstractYarnScheduler.java
@@ -230,7 +230,7 @@ public abstract class AbstractYarnScheduler
   }
 
   @VisibleForTesting
-  public ClusterNodeTracker getNodeTracker() {
+  public ClusterNodeTracker<N> getNodeTracker() {
     return nodeTracker;
   }
 

http://git-wip-us.apache.org/repos/asf/hadoop/blob/c3a0f07d/hadoop-yarn-project/hadoop-yarn/hadoop-yarn-server/hadoop-yarn-server-resourcemanager/src/main/java/org/apache/hadoop/yarn/server/resourcemanager/scheduler/fair/FSPreemptionThread.java
----------------------------------------------------------------------
diff --git a/hadoop-yarn-project/hadoop-yarn/hadoop-yarn-server/hadoop-yarn-server-resourcemanager/src/main/java/org/apache/hadoop/yarn/server/resourcemanager/scheduler/fair/FSPreemptionThread.java
b/hadoop-yarn-project/hadoop-yarn/hadoop-yarn-server/hadoop-yarn-server-resourcemanager/src/main/java/org/apache/hadoop/yarn/server/resourcemanager/scheduler/fair/FSPreemptionThread.java
index 47e580d..cbadf03 100644
--- a/hadoop-yarn-project/hadoop-yarn/hadoop-yarn-server/hadoop-yarn-server-resourcemanager/src/main/java/org/apache/hadoop/yarn/server/resourcemanager/scheduler/fair/FSPreemptionThread.java
+++ b/hadoop-yarn-project/hadoop-yarn/hadoop-yarn-server/hadoop-yarn-server-resourcemanager/src/main/java/org/apache/hadoop/yarn/server/resourcemanager/scheduler/fair/FSPreemptionThread.java
@@ -208,7 +208,7 @@ class FSPreemptionThread extends Thread {
 
   private void trackPreemptionsAgainstNode(List<RMContainer> containers,
                                            FSAppAttempt app) {
-    FSSchedulerNode node = (FSSchedulerNode) scheduler.getNodeTracker()
+    FSSchedulerNode node = scheduler.getNodeTracker()
         .getNode(containers.get(0).getNodeId());
     node.addContainersForPreemption(containers, app);
   }


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