hadoop-yarn-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From ss...@apache.org
Subject svn commit: r1400219 - in /hadoop/common/branches/MR-3902/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/ hadoop-y...
Date Fri, 19 Oct 2012 18:49:49 GMT
Author: sseth
Date: Fri Oct 19 18:49:38 2012
New Revision: 1400219

URL: http://svn.apache.org/viewvc?rev=1400219&view=rev
Log:
merge from trunk to branch MR-3902

Modified:
    hadoop/common/branches/MR-3902/hadoop-yarn-project/CHANGES.txt
    hadoop/common/branches/MR-3902/hadoop-yarn-project/hadoop-yarn/hadoop-yarn-common/src/main/java/org/apache/hadoop/yarn/factory/providers/RecordFactoryProvider.java
    hadoop/common/branches/MR-3902/hadoop-yarn-project/hadoop-yarn/hadoop-yarn-common/src/main/java/org/apache/hadoop/yarn/factory/providers/RpcFactoryProvider.java
    hadoop/common/branches/MR-3902/hadoop-yarn-project/hadoop-yarn/hadoop-yarn-common/src/main/java/org/apache/hadoop/yarn/factory/providers/YarnRemoteExceptionFactoryProvider.java
    hadoop/common/branches/MR-3902/hadoop-yarn-project/hadoop-yarn/hadoop-yarn-common/src/main/java/org/apache/hadoop/yarn/state/StateMachineFactory.java
    hadoop/common/branches/MR-3902/hadoop-yarn-project/hadoop-yarn/hadoop-yarn-server/hadoop-yarn-server-nodemanager/src/main/java/org/apache/hadoop/yarn/server/nodemanager/webapp/ContainerLogsPage.java
    hadoop/common/branches/MR-3902/hadoop-yarn-project/hadoop-yarn/hadoop-yarn-server/hadoop-yarn-server-resourcemanager/src/main/java/org/apache/hadoop/yarn/server/resourcemanager/ClusterMetrics.java
    hadoop/common/branches/MR-3902/hadoop-yarn-project/hadoop-yarn/hadoop-yarn-server/hadoop-yarn-server-resourcemanager/src/test/java/org/apache/hadoop/yarn/server/resourcemanager/TestResourceTrackerService.java
    hadoop/common/branches/MR-3902/hadoop-yarn-project/hadoop-yarn/hadoop-yarn-server/hadoop-yarn-server-resourcemanager/src/test/java/org/apache/hadoop/yarn/server/resourcemanager/security/TestApplicationTokens.java
    hadoop/common/branches/MR-3902/hadoop-yarn-project/hadoop-yarn/hadoop-yarn-site/src/site/apt/HistoryServerRest.apt.vm

Modified: hadoop/common/branches/MR-3902/hadoop-yarn-project/CHANGES.txt
URL: http://svn.apache.org/viewvc/hadoop/common/branches/MR-3902/hadoop-yarn-project/CHANGES.txt?rev=1400219&r1=1400218&r2=1400219&view=diff
==============================================================================
--- hadoop/common/branches/MR-3902/hadoop-yarn-project/CHANGES.txt (original)
+++ hadoop/common/branches/MR-3902/hadoop-yarn-project/CHANGES.txt Fri Oct 19 18:49:38 2012
@@ -145,10 +145,22 @@ Release 0.23.5 - UNRELEASED
 
   IMPROVEMENTS
 
+    YARN-161. Fix multiple compiler warnings for unchecked operations in YARN
+    common. (Chris Nauroth via vinodkv)
+
+    YARN-43. Fix TestResourceTrackerService to not depend on test order and thus
+    pass on JDK7. (Thomas Graves via vinodkv)
+
+    YARN-32. Fix TestApplicationTokens to not depend on test order and thus pass
+    on JDK7. (vinodkv)
+
   OPTIMIZATIONS
 
   BUG FIXES
 
+    YARN-163. Retrieving container log via NM webapp can hang with multibyte
+    characters in log (jlowe via bobby)
+
 Release 0.23.4 - UNRELEASED
 
   INCOMPATIBLE CHANGES

Modified: hadoop/common/branches/MR-3902/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/MR-3902/hadoop-yarn-project/hadoop-yarn/hadoop-yarn-common/src/main/java/org/apache/hadoop/yarn/factory/providers/RecordFactoryProvider.java?rev=1400219&r1=1400218&r2=1400219&view=diff
==============================================================================
--- hadoop/common/branches/MR-3902/hadoop-yarn-project/hadoop-yarn/hadoop-yarn-common/src/main/java/org/apache/hadoop/yarn/factory/providers/RecordFactoryProvider.java
(original)
+++ hadoop/common/branches/MR-3902/hadoop-yarn-project/hadoop-yarn/hadoop-yarn-common/src/main/java/org/apache/hadoop/yarn/factory/providers/RecordFactoryProvider.java
Fri Oct 19 18:49:38 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/MR-3902/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/MR-3902/hadoop-yarn-project/hadoop-yarn/hadoop-yarn-common/src/main/java/org/apache/hadoop/yarn/factory/providers/RpcFactoryProvider.java?rev=1400219&r1=1400218&r2=1400219&view=diff
==============================================================================
--- hadoop/common/branches/MR-3902/hadoop-yarn-project/hadoop-yarn/hadoop-yarn-common/src/main/java/org/apache/hadoop/yarn/factory/providers/RpcFactoryProvider.java
(original)
+++ hadoop/common/branches/MR-3902/hadoop-yarn-project/hadoop-yarn/hadoop-yarn-common/src/main/java/org/apache/hadoop/yarn/factory/providers/RpcFactoryProvider.java
Fri Oct 19 18:49:38 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/MR-3902/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/MR-3902/hadoop-yarn-project/hadoop-yarn/hadoop-yarn-common/src/main/java/org/apache/hadoop/yarn/factory/providers/YarnRemoteExceptionFactoryProvider.java?rev=1400219&r1=1400218&r2=1400219&view=diff
==============================================================================
--- hadoop/common/branches/MR-3902/hadoop-yarn-project/hadoop-yarn/hadoop-yarn-common/src/main/java/org/apache/hadoop/yarn/factory/providers/YarnRemoteExceptionFactoryProvider.java
(original)
+++ hadoop/common/branches/MR-3902/hadoop-yarn-project/hadoop-yarn/hadoop-yarn-common/src/main/java/org/apache/hadoop/yarn/factory/providers/YarnRemoteExceptionFactoryProvider.java
Fri Oct 19 18:49:38 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/MR-3902/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/MR-3902/hadoop-yarn-project/hadoop-yarn/hadoop-yarn-common/src/main/java/org/apache/hadoop/yarn/state/StateMachineFactory.java?rev=1400219&r1=1400218&r2=1400219&view=diff
==============================================================================
--- hadoop/common/branches/MR-3902/hadoop-yarn-project/hadoop-yarn/hadoop-yarn-common/src/main/java/org/apache/hadoop/yarn/state/StateMachineFactory.java
(original)
+++ hadoop/common/branches/MR-3902/hadoop-yarn-project/hadoop-yarn/hadoop-yarn-common/src/main/java/org/apache/hadoop/yarn/state/StateMachineFactory.java
Fri Oct 19 18:49:38 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());

Modified: hadoop/common/branches/MR-3902/hadoop-yarn-project/hadoop-yarn/hadoop-yarn-server/hadoop-yarn-server-nodemanager/src/main/java/org/apache/hadoop/yarn/server/nodemanager/webapp/ContainerLogsPage.java
URL: http://svn.apache.org/viewvc/hadoop/common/branches/MR-3902/hadoop-yarn-project/hadoop-yarn/hadoop-yarn-server/hadoop-yarn-server-nodemanager/src/main/java/org/apache/hadoop/yarn/server/nodemanager/webapp/ContainerLogsPage.java?rev=1400219&r1=1400218&r2=1400219&view=diff
==============================================================================
--- hadoop/common/branches/MR-3902/hadoop-yarn-project/hadoop-yarn/hadoop-yarn-server/hadoop-yarn-server-nodemanager/src/main/java/org/apache/hadoop/yarn/server/nodemanager/webapp/ContainerLogsPage.java
(original)
+++ hadoop/common/branches/MR-3902/hadoop-yarn-project/hadoop-yarn/hadoop-yarn-server/hadoop-yarn-server-nodemanager/src/main/java/org/apache/hadoop/yarn/server/nodemanager/webapp/ContainerLogsPage.java
Fri Oct 19 18:49:38 2012
@@ -26,7 +26,7 @@ import static org.apache.hadoop.yarn.web
 import static org.apache.hadoop.yarn.webapp.view.JQueryUI.initID;
 
 import java.io.File;
-import java.io.FileReader;
+import java.io.FileInputStream;
 import java.io.IOException;
 import java.io.InputStreamReader;
 import java.net.URI;
@@ -37,6 +37,7 @@ import java.util.Collections;
 import java.util.EnumSet;
 import java.util.List;
 
+import org.apache.commons.io.IOUtils;
 import org.apache.hadoop.conf.Configuration;
 import org.apache.hadoop.fs.Path;
 import org.apache.hadoop.security.UserGroupInformation;
@@ -54,6 +55,8 @@ import org.apache.hadoop.yarn.server.sec
 import org.apache.hadoop.yarn.util.ConverterUtils;
 import org.apache.hadoop.yarn.webapp.YarnWebParams;
 import org.apache.hadoop.yarn.webapp.SubView;
+import org.apache.hadoop.yarn.webapp.hamlet.Hamlet;
+import org.apache.hadoop.yarn.webapp.hamlet.Hamlet.PRE;
 import org.apache.hadoop.yarn.webapp.view.HtmlBlock;
 import org.mortbay.log.Log;
 
@@ -226,7 +229,7 @@ public class ContainerLogsPage extends N
               + ", end[" + end + "]");
           return;
         } else {
-          InputStreamReader reader = null;
+          FileInputStream logByteStream = null;
           try {
             long toRead = end - start;
             if (toRead < logFile.length()) {
@@ -237,38 +240,34 @@ public class ContainerLogsPage extends N
             }
             // TODO: Use secure IO Utils to avoid symlink attacks.
             // TODO Fix findBugs close warning along with IOUtils change
-            reader = new FileReader(logFile);
+            logByteStream = new FileInputStream(logFile);
+            IOUtils.skipFully(logByteStream, start);
+
+            InputStreamReader reader = new InputStreamReader(logByteStream);
             int bufferSize = 65536;
             char[] cbuf = new char[bufferSize];
 
-            long skipped = 0;
-            long totalSkipped = 0;
-            while (totalSkipped < start) {
-              skipped = reader.skip(start - totalSkipped);
-              totalSkipped += skipped;
-            }
-
             int len = 0;
             int currentToRead = toRead > bufferSize ? bufferSize : (int) toRead;
-            writer().write("<pre>");
+            PRE<Hamlet> pre = html.pre();
 
             while ((len = reader.read(cbuf, 0, currentToRead)) > 0
                 && toRead > 0) {
-              writer().write(cbuf, 0, len); // TODO: HTMl Quoting?
+              pre._(new String(cbuf, 0, len));
               toRead = toRead - len;
               currentToRead = toRead > bufferSize ? bufferSize : (int) toRead;
             }
 
+            pre._();
             reader.close();
-            writer().write("</pre>");
 
           } catch (IOException e) {
             html.h1("Exception reading log-file. Log file was likely aggregated. "
                 + StringUtils.stringifyException(e));
           } finally {
-            if (reader != null) {
+            if (logByteStream != null) {
               try {
-                reader.close();
+                logByteStream.close();
               } catch (IOException e) {
                 // Ignore
               }

Modified: hadoop/common/branches/MR-3902/hadoop-yarn-project/hadoop-yarn/hadoop-yarn-server/hadoop-yarn-server-resourcemanager/src/main/java/org/apache/hadoop/yarn/server/resourcemanager/ClusterMetrics.java
URL: http://svn.apache.org/viewvc/hadoop/common/branches/MR-3902/hadoop-yarn-project/hadoop-yarn/hadoop-yarn-server/hadoop-yarn-server-resourcemanager/src/main/java/org/apache/hadoop/yarn/server/resourcemanager/ClusterMetrics.java?rev=1400219&r1=1400218&r2=1400219&view=diff
==============================================================================
--- hadoop/common/branches/MR-3902/hadoop-yarn-project/hadoop-yarn/hadoop-yarn-server/hadoop-yarn-server-resourcemanager/src/main/java/org/apache/hadoop/yarn/server/resourcemanager/ClusterMetrics.java
(original)
+++ hadoop/common/branches/MR-3902/hadoop-yarn-project/hadoop-yarn/hadoop-yarn-server/hadoop-yarn-server-resourcemanager/src/main/java/org/apache/hadoop/yarn/server/resourcemanager/ClusterMetrics.java
Fri Oct 19 18:49:38 2012
@@ -30,7 +30,7 @@ import org.apache.hadoop.metrics2.annota
 import org.apache.hadoop.metrics2.lib.DefaultMetricsSystem;
 import org.apache.hadoop.metrics2.lib.MetricsRegistry;
 import org.apache.hadoop.metrics2.lib.MutableGaugeInt;
-import org.apache.hadoop.yarn.server.resourcemanager.rmnode.RMNodeEventType;
+import com.google.common.annotations.VisibleForTesting;
 
 @InterfaceAudience.Private
 @Metrics(context="yarn")
@@ -71,6 +71,12 @@ public class ClusterMetrics {
       ms.register("ClusterMetrics", "Metrics for the Yarn Cluster", INSTANCE);
     }
   }
+
+  @VisibleForTesting
+  synchronized static void destroy() {
+    isInitialized.set(false);
+    INSTANCE = null;
+  }
   
   //Active Nodemanagers
   public int getNumActiveNMs() {
@@ -136,4 +142,5 @@ public class ClusterMetrics {
   public void decrNumActiveNodes() {
     numActiveNMs.decr();
   }
+
 }

Modified: hadoop/common/branches/MR-3902/hadoop-yarn-project/hadoop-yarn/hadoop-yarn-server/hadoop-yarn-server-resourcemanager/src/test/java/org/apache/hadoop/yarn/server/resourcemanager/TestResourceTrackerService.java
URL: http://svn.apache.org/viewvc/hadoop/common/branches/MR-3902/hadoop-yarn-project/hadoop-yarn/hadoop-yarn-server/hadoop-yarn-server-resourcemanager/src/test/java/org/apache/hadoop/yarn/server/resourcemanager/TestResourceTrackerService.java?rev=1400219&r1=1400218&r2=1400219&view=diff
==============================================================================
--- hadoop/common/branches/MR-3902/hadoop-yarn-project/hadoop-yarn/hadoop-yarn-server/hadoop-yarn-server-resourcemanager/src/test/java/org/apache/hadoop/yarn/server/resourcemanager/TestResourceTrackerService.java
(original)
+++ hadoop/common/branches/MR-3902/hadoop-yarn-project/hadoop-yarn/hadoop-yarn-server/hadoop-yarn-server-resourcemanager/src/test/java/org/apache/hadoop/yarn/server/resourcemanager/TestResourceTrackerService.java
Fri Oct 19 18:49:38 2012
@@ -414,6 +414,7 @@ public class TestResourceTrackerService 
     if (hostFile != null && hostFile.exists()) {
       hostFile.delete();
     }
+    ClusterMetrics.destroy();
     if (rm != null) {
       rm.stop();
     }

Modified: hadoop/common/branches/MR-3902/hadoop-yarn-project/hadoop-yarn/hadoop-yarn-server/hadoop-yarn-server-resourcemanager/src/test/java/org/apache/hadoop/yarn/server/resourcemanager/security/TestApplicationTokens.java
URL: http://svn.apache.org/viewvc/hadoop/common/branches/MR-3902/hadoop-yarn-project/hadoop-yarn/hadoop-yarn-server/hadoop-yarn-server-resourcemanager/src/test/java/org/apache/hadoop/yarn/server/resourcemanager/security/TestApplicationTokens.java?rev=1400219&r1=1400218&r2=1400219&view=diff
==============================================================================
--- hadoop/common/branches/MR-3902/hadoop-yarn-project/hadoop-yarn/hadoop-yarn-server/hadoop-yarn-server-resourcemanager/src/test/java/org/apache/hadoop/yarn/server/resourcemanager/security/TestApplicationTokens.java
(original)
+++ hadoop/common/branches/MR-3902/hadoop-yarn-project/hadoop-yarn/hadoop-yarn-server/hadoop-yarn-server-resourcemanager/src/test/java/org/apache/hadoop/yarn/server/resourcemanager/security/TestApplicationTokens.java
Fri Oct 19 18:49:38 2012
@@ -64,6 +64,10 @@ public class TestApplicationTokens {
     final MockRM rm = new MockRMWithAMS(new Configuration(), containerManager);
     rm.start();
 
+    final Configuration conf = rm.getConfig();
+    final YarnRPC rpc = YarnRPC.create(conf);
+    AMRMProtocol rmClient = null;
+
     try {
       MockNM nm1 = rm.registerNode("localhost:1234", 5120);
 
@@ -82,9 +86,6 @@ public class TestApplicationTokens {
       ApplicationAttemptId applicationAttemptId = attempt.getAppAttemptId();
 
       // Create a client to the RM.
-      final Configuration conf = rm.getConfig();
-      final YarnRPC rpc = YarnRPC.create(conf);
-
       UserGroupInformation currentUser =
           UserGroupInformation
             .createRemoteUser(applicationAttemptId.toString());
@@ -96,7 +97,7 @@ public class TestApplicationTokens {
       token.decodeFromUrlString(tokenURLEncodedStr);
       currentUser.addToken(token);
 
-      AMRMProtocol rmClient = createRMClient(rm, conf, rpc, currentUser);
+      rmClient = createRMClient(rm, conf, rpc, currentUser);
 
       RegisterApplicationMasterRequest request =
           Records.newRecord(RegisterApplicationMasterRequest.class);
@@ -136,6 +137,9 @@ public class TestApplicationTokens {
 
     } finally {
       rm.stop();
+      if (rmClient != null) {
+        rpc.stopProxy(rmClient, conf); // To avoid using cached client
+      }
     }
   }
 
@@ -153,6 +157,10 @@ public class TestApplicationTokens {
     final MockRM rm = new MockRMWithAMS(config, containerManager);
     rm.start();
 
+    final Configuration conf = rm.getConfig();
+    final YarnRPC rpc = YarnRPC.create(conf);
+    AMRMProtocol rmClient = null;
+
     try {
       MockNM nm1 = rm.registerNode("localhost:1234", 5120);
 
@@ -171,9 +179,6 @@ public class TestApplicationTokens {
       ApplicationAttemptId applicationAttemptId = attempt.getAppAttemptId();
 
       // Create a client to the RM.
-      final Configuration conf = rm.getConfig();
-      final YarnRPC rpc = YarnRPC.create(conf);
-
       UserGroupInformation currentUser =
           UserGroupInformation
             .createRemoteUser(applicationAttemptId.toString());
@@ -185,7 +190,7 @@ public class TestApplicationTokens {
       token.decodeFromUrlString(tokenURLEncodedStr);
       currentUser.addToken(token);
 
-      AMRMProtocol rmClient = createRMClient(rm, conf, rpc, currentUser);
+      rmClient = createRMClient(rm, conf, rpc, currentUser);
 
       RegisterApplicationMasterRequest request =
           Records.newRecord(RegisterApplicationMasterRequest.class);
@@ -217,6 +222,9 @@ public class TestApplicationTokens {
         .getReboot());
     } finally {
       rm.stop();
+      if (rmClient != null) {
+        rpc.stopProxy(rmClient, conf); // To avoid using cached client
+      }
     }
   }
 

Modified: hadoop/common/branches/MR-3902/hadoop-yarn-project/hadoop-yarn/hadoop-yarn-site/src/site/apt/HistoryServerRest.apt.vm
URL: http://svn.apache.org/viewvc/hadoop/common/branches/MR-3902/hadoop-yarn-project/hadoop-yarn/hadoop-yarn-site/src/site/apt/HistoryServerRest.apt.vm?rev=1400219&r1=1400218&r2=1400219&view=diff
==============================================================================
--- hadoop/common/branches/MR-3902/hadoop-yarn-project/hadoop-yarn/hadoop-yarn-site/src/site/apt/HistoryServerRest.apt.vm
(original)
+++ hadoop/common/branches/MR-3902/hadoop-yarn-project/hadoop-yarn/hadoop-yarn-site/src/site/apt/HistoryServerRest.apt.vm
Fri Oct 19 18:49:38 2012
@@ -1527,7 +1527,7 @@ History Server REST API's.
 *---------------+--------------+--------------------------------+
 | progress | float | The progress of the task as a percent|
 *---------------+--------------+--------------------------------+
-| startTime | long | The time in which the task started (in ms since epoch)|
+| startTime | long | The time in which the task started (in ms since epoch) or -1 if it was
never started |
 *---------------+--------------+--------------------------------+
 | finishTime | long | The time in which the task finished (in ms since epoch)|
 *---------------+--------------+--------------------------------+
@@ -1607,7 +1607,7 @@ History Server REST API's.
 
 ** Task Counters API
 
-  With the task counters API, you can object a collection of resources that represent al
the counters for that task. 
+  With the task counters API, you can object a collection of resources that represent all
the counters for that task. 
 
 *** URI
 



Mime
View raw message