hadoop-yarn-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From vino...@apache.org
Subject svn commit: r1399057 - in /hadoop/common/branches/branch-2/hadoop-yarn-project: ./ hadoop-yarn/hadoop-yarn-common/src/main/java/org/apache/hadoop/yarn/factory/providers/ hadoop-yarn/hadoop-yarn-common/src/main/java/org/apache/hadoop/yarn/state/
Date Wed, 17 Oct 2012 00:32:37 GMT
Author: vinodkv
Date: Wed Oct 17 00:32:37 2012
New Revision: 1399057

URL: http://svn.apache.org/viewvc?rev=1399057&view=rev
Log:
YARN-161. Fix multiple compiler warnings for unchecked operations in YARN common. Contributed
by Chris Nauroth.
svn merge --ignore-ancestry -c 1399056 ../../trunk/

Modified:
    hadoop/common/branches/branch-2/hadoop-yarn-project/CHANGES.txt
    hadoop/common/branches/branch-2/hadoop-yarn-project/hadoop-yarn/hadoop-yarn-common/src/main/java/org/apache/hadoop/yarn/factory/providers/RecordFactoryProvider.java
    hadoop/common/branches/branch-2/hadoop-yarn-project/hadoop-yarn/hadoop-yarn-common/src/main/java/org/apache/hadoop/yarn/factory/providers/RpcFactoryProvider.java
    hadoop/common/branches/branch-2/hadoop-yarn-project/hadoop-yarn/hadoop-yarn-common/src/main/java/org/apache/hadoop/yarn/factory/providers/YarnRemoteExceptionFactoryProvider.java
    hadoop/common/branches/branch-2/hadoop-yarn-project/hadoop-yarn/hadoop-yarn-common/src/main/java/org/apache/hadoop/yarn/state/StateMachineFactory.java

Modified: hadoop/common/branches/branch-2/hadoop-yarn-project/CHANGES.txt
URL: http://svn.apache.org/viewvc/hadoop/common/branches/branch-2/hadoop-yarn-project/CHANGES.txt?rev=1399057&r1=1399056&r2=1399057&view=diff
==============================================================================
--- hadoop/common/branches/branch-2/hadoop-yarn-project/CHANGES.txt (original)
+++ hadoop/common/branches/branch-2/hadoop-yarn-project/CHANGES.txt Wed Oct 17 00:32:37 2012
@@ -127,6 +127,9 @@ Release 0.23.5 - UNRELEASED
 
   IMPROVEMENTS
 
+    YARN-161. Fix multiple compiler warnings for unchecked operations in YARN
+    common. (Chris Nauroth via vinodkv)
+
   OPTIMIZATIONS
 
   BUG FIXES

Modified: hadoop/common/branches/branch-2/hadoop-yarn-project/hadoop-yarn/hadoop-yarn-common/src/main/java/org/apache/hadoop/yarn/factory/providers/RecordFactoryProvider.java
URL: http://svn.apache.org/viewvc/hadoop/common/branches/branch-2/hadoop-yarn-project/hadoop-yarn/hadoop-yarn-common/src/main/java/org/apache/hadoop/yarn/factory/providers/RecordFactoryProvider.java?rev=1399057&r1=1399056&r2=1399057&view=diff
==============================================================================
--- hadoop/common/branches/branch-2/hadoop-yarn-project/hadoop-yarn/hadoop-yarn-common/src/main/java/org/apache/hadoop/yarn/factory/providers/RecordFactoryProvider.java
(original)
+++ hadoop/common/branches/branch-2/hadoop-yarn-project/hadoop-yarn/hadoop-yarn-common/src/main/java/org/apache/hadoop/yarn/factory/providers/RecordFactoryProvider.java
Wed Oct 17 00:32:37 2012
@@ -58,7 +58,7 @@ public class RecordFactoryProvider {
   
   private static Object getFactoryClassInstance(String factoryClassName) {
     try {
-      Class clazz = Class.forName(factoryClassName);
+      Class<?> clazz = Class.forName(factoryClassName);
       Method method = clazz.getMethod("get", null);
       method.setAccessible(true);
       return method.invoke(null, null);

Modified: hadoop/common/branches/branch-2/hadoop-yarn-project/hadoop-yarn/hadoop-yarn-common/src/main/java/org/apache/hadoop/yarn/factory/providers/RpcFactoryProvider.java
URL: http://svn.apache.org/viewvc/hadoop/common/branches/branch-2/hadoop-yarn-project/hadoop-yarn/hadoop-yarn-common/src/main/java/org/apache/hadoop/yarn/factory/providers/RpcFactoryProvider.java?rev=1399057&r1=1399056&r2=1399057&view=diff
==============================================================================
--- hadoop/common/branches/branch-2/hadoop-yarn-project/hadoop-yarn/hadoop-yarn-common/src/main/java/org/apache/hadoop/yarn/factory/providers/RpcFactoryProvider.java
(original)
+++ hadoop/common/branches/branch-2/hadoop-yarn-project/hadoop-yarn/hadoop-yarn-common/src/main/java/org/apache/hadoop/yarn/factory/providers/RpcFactoryProvider.java
Wed Oct 17 00:32:37 2012
@@ -73,7 +73,7 @@ public class RpcFactoryProvider {
 
   private static Object getFactoryClassInstance(String factoryClassName) {
     try {
-      Class clazz = Class.forName(factoryClassName);
+      Class<?> clazz = Class.forName(factoryClassName);
       Method method = clazz.getMethod("get", null);
       method.setAccessible(true);
       return method.invoke(null, null);

Modified: hadoop/common/branches/branch-2/hadoop-yarn-project/hadoop-yarn/hadoop-yarn-common/src/main/java/org/apache/hadoop/yarn/factory/providers/YarnRemoteExceptionFactoryProvider.java
URL: http://svn.apache.org/viewvc/hadoop/common/branches/branch-2/hadoop-yarn-project/hadoop-yarn/hadoop-yarn-common/src/main/java/org/apache/hadoop/yarn/factory/providers/YarnRemoteExceptionFactoryProvider.java?rev=1399057&r1=1399056&r2=1399057&view=diff
==============================================================================
--- hadoop/common/branches/branch-2/hadoop-yarn-project/hadoop-yarn/hadoop-yarn-common/src/main/java/org/apache/hadoop/yarn/factory/providers/YarnRemoteExceptionFactoryProvider.java
(original)
+++ hadoop/common/branches/branch-2/hadoop-yarn-project/hadoop-yarn/hadoop-yarn-common/src/main/java/org/apache/hadoop/yarn/factory/providers/YarnRemoteExceptionFactoryProvider.java
Wed Oct 17 00:32:37 2012
@@ -51,7 +51,7 @@ public class YarnRemoteExceptionFactoryP
   
   private static Object getFactoryClassInstance(String factoryClassName) {
     try {
-      Class clazz = Class.forName(factoryClassName);
+      Class<?> clazz = Class.forName(factoryClassName);
       Method method = clazz.getMethod("get", null);
       method.setAccessible(true);
       return method.invoke(null, null);

Modified: hadoop/common/branches/branch-2/hadoop-yarn-project/hadoop-yarn/hadoop-yarn-common/src/main/java/org/apache/hadoop/yarn/state/StateMachineFactory.java
URL: http://svn.apache.org/viewvc/hadoop/common/branches/branch-2/hadoop-yarn-project/hadoop-yarn/hadoop-yarn-common/src/main/java/org/apache/hadoop/yarn/state/StateMachineFactory.java?rev=1399057&r1=1399056&r2=1399057&view=diff
==============================================================================
--- hadoop/common/branches/branch-2/hadoop-yarn-project/hadoop-yarn/hadoop-yarn-common/src/main/java/org/apache/hadoop/yarn/state/StateMachineFactory.java
(original)
+++ hadoop/common/branches/branch-2/hadoop-yarn-project/hadoop-yarn/hadoop-yarn-common/src/main/java/org/apache/hadoop/yarn/state/StateMachineFactory.java
Wed Oct 17 00:32:37 2012
@@ -68,7 +68,7 @@ final public class StateMachineFactory
   
   private StateMachineFactory
       (StateMachineFactory<OPERAND, STATE, EVENTTYPE, EVENT> that,
-       ApplicableTransition t) {
+       ApplicableTransition<OPERAND, STATE, EVENTTYPE, EVENT> t) {
     this.defaultInitialState = that.defaultInitialState;
     this.transitionsListNode 
         = new TransitionsListNode(t, that.transitionsListNode);
@@ -96,11 +96,12 @@ final public class StateMachineFactory
   }
 
   private class TransitionsListNode {
-    final ApplicableTransition transition;
+    final ApplicableTransition<OPERAND, STATE, EVENTTYPE, EVENT> transition;
     final TransitionsListNode next;
 
     TransitionsListNode
-        (ApplicableTransition transition, TransitionsListNode next) {
+        (ApplicableTransition<OPERAND, STATE, EVENTTYPE, EVENT> transition,
+        TransitionsListNode next) {
       this.transition = transition;
       this.next = next;
     }
@@ -225,8 +226,8 @@ final public class StateMachineFactory
           addTransition(STATE preState, STATE postState,
                         EVENTTYPE eventType,
                         SingleArcTransition<OPERAND, EVENT> hook){
-    return new StateMachineFactory
-        (this, new ApplicableSingleOrMultipleTransition
+    return new StateMachineFactory<OPERAND, STATE, EVENTTYPE, EVENT>
+        (this, new ApplicableSingleOrMultipleTransition<OPERAND, STATE, EVENTTYPE, EVENT>
            (preState, eventType, new SingleInternalArc(postState, hook)));
   }
 
@@ -248,9 +249,9 @@ final public class StateMachineFactory
           addTransition(STATE preState, Set<STATE> postStates,
                         EVENTTYPE eventType,
                         MultipleArcTransition<OPERAND, EVENT, STATE> hook){
-    return new StateMachineFactory
+    return new StateMachineFactory<OPERAND, STATE, EVENTTYPE, EVENT>
         (this,
-         new ApplicableSingleOrMultipleTransition
+         new ApplicableSingleOrMultipleTransition<OPERAND, STATE, EVENTTYPE, EVENT>
            (preState, eventType, new MultipleInternalArc(postStates, hook)));
   }
 
@@ -273,7 +274,7 @@ final public class StateMachineFactory
   public StateMachineFactory
              <OPERAND, STATE, EVENTTYPE, EVENT>
           installTopology() {
-    return new StateMachineFactory(this, true);
+    return new StateMachineFactory<OPERAND, STATE, EVENTTYPE, EVENT>(this, true);
   }
 
   /**
@@ -308,7 +309,8 @@ final public class StateMachineFactory
   }
 
   private void makeStateMachineTable() {
-    Stack<ApplicableTransition> stack = new Stack<ApplicableTransition>();
+    Stack<ApplicableTransition<OPERAND, STATE, EVENTTYPE, EVENT>> stack =
+      new Stack<ApplicableTransition<OPERAND, STATE, EVENTTYPE, EVENT>>();
 
     Map<STATE, Map<EVENTTYPE, Transition<OPERAND, STATE, EVENTTYPE, EVENT>>>
       prototype = new HashMap<STATE, Map<EVENTTYPE, Transition<OPERAND, STATE, EVENTTYPE,
EVENT>>>();
@@ -469,7 +471,7 @@ final public class StateMachineFactory
         } else if (transition instanceof StateMachineFactory.MultipleInternalArc) {
           StateMachineFactory.MultipleInternalArc ma
               = (StateMachineFactory.MultipleInternalArc) transition;
-          Iterator<STATE> iter = ma.validPostStates.iterator();
+          Iterator iter = ma.validPostStates.iterator();
           while (iter.hasNext()) {
             Graph.Node fromNode = g.getNode(startState.toString());
             Graph.Node toNode = g.getNode(iter.next().toString());



Mime
View raw message