hadoop-yarn-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From szets...@apache.org
Subject svn commit: r1582856 - /hadoop/common/trunk/hadoop-yarn-project/hadoop-yarn/hadoop-yarn-server/hadoop-yarn-server-resourcemanager/src/test/java/org/apache/hadoop/yarn/server/resourcemanager/security/TestDelegationTokenRenewer.java
Date Fri, 28 Mar 2014 18:29:31 GMT
Author: szetszwo
Date: Fri Mar 28 18:29:31 2014
New Revision: 1582856

URL: http://svn.apache.org/r1582856
Log:
HDFS-6168. Remove a deprecated constructor and the deprecated methods reportChecksumFailure,
getDelegationToken(Text), renewDelegationToken and cancelDelegationToken from DistributedFileSystem.

Modified:
    hadoop/common/trunk/hadoop-yarn-project/hadoop-yarn/hadoop-yarn-server/hadoop-yarn-server-resourcemanager/src/test/java/org/apache/hadoop/yarn/server/resourcemanager/security/TestDelegationTokenRenewer.java

Modified: hadoop/common/trunk/hadoop-yarn-project/hadoop-yarn/hadoop-yarn-server/hadoop-yarn-server-resourcemanager/src/test/java/org/apache/hadoop/yarn/server/resourcemanager/security/TestDelegationTokenRenewer.java
URL: http://svn.apache.org/viewvc/hadoop/common/trunk/hadoop-yarn-project/hadoop-yarn/hadoop-yarn-server/hadoop-yarn-server-resourcemanager/src/test/java/org/apache/hadoop/yarn/server/resourcemanager/security/TestDelegationTokenRenewer.java?rev=1582856&r1=1582855&r2=1582856&view=diff
==============================================================================
--- hadoop/common/trunk/hadoop-yarn-project/hadoop-yarn/hadoop-yarn-server/hadoop-yarn-server-resourcemanager/src/test/java/org/apache/hadoop/yarn/server/resourcemanager/security/TestDelegationTokenRenewer.java
(original)
+++ hadoop/common/trunk/hadoop-yarn-project/hadoop-yarn/hadoop-yarn-server/hadoop-yarn-server-resourcemanager/src/test/java/org/apache/hadoop/yarn/server/resourcemanager/security/TestDelegationTokenRenewer.java
Fri Mar 28 18:29:31 2014
@@ -271,8 +271,8 @@ public class TestDelegationTokenRenewer 
     public void initialize(URI uri, Configuration conf) throws IOException {}
     
     @Override 
-    public MyToken getDelegationToken(Text renewer) throws IOException {
-      MyToken result = createTokens(renewer);
+    public MyToken getDelegationToken(String renewer) throws IOException {
+      MyToken result = createTokens(new Text(renewer));
       LOG.info("Called MYDFS.getdelegationtoken " + result);
       return result;
     }
@@ -329,9 +329,9 @@ public class TestDelegationTokenRenewer 
     
     // get the delegation tokens
     MyToken token1, token2, token3;
-    token1 = dfs.getDelegationToken(new Text("user1"));
-    token2 = dfs.getDelegationToken(new Text("user2"));
-    token3 = dfs.getDelegationToken(new Text("user3"));
+    token1 = dfs.getDelegationToken("user1");
+    token2 = dfs.getDelegationToken("user2");
+    token3 = dfs.getDelegationToken("user3");
 
     //to cause this one to be set for renew in 2 secs
     Renewer.tokenToRenewIn2Sec = token1;
@@ -381,7 +381,7 @@ public class TestDelegationTokenRenewer 
     // time is up.
     // Wait for 3 secs , and make sure no renews were called
     ts = new Credentials();
-    MyToken token4 = dfs.getDelegationToken(new Text("user4"));
+    MyToken token4 = dfs.getDelegationToken("user4");
     
     //to cause this one to be set for renew in 2 secs
     Renewer.tokenToRenewIn2Sec = token4; 
@@ -420,7 +420,7 @@ public class TestDelegationTokenRenewer 
     MyFS dfs = (MyFS)FileSystem.get(conf);
     LOG.info("dfs="+(Object)dfs.hashCode() + ";conf="+conf.hashCode());
 
-    MyToken token = dfs.getDelegationToken(new Text("user1"));
+    MyToken token = dfs.getDelegationToken("user1");
     token.cancelToken();
 
     Credentials ts = new Credentials();
@@ -461,7 +461,7 @@ public class TestDelegationTokenRenewer 
     LOG.info("dfs="+(Object)dfs.hashCode() + ";conf="+conf.hashCode());
 
     Credentials ts = new Credentials();
-    MyToken token1 = dfs.getDelegationToken(new Text("user1"));
+    MyToken token1 = dfs.getDelegationToken("user1");
 
     //to cause this one to be set for renew in 2 secs
     Renewer.tokenToRenewIn2Sec = token1; 
@@ -532,7 +532,7 @@ public class TestDelegationTokenRenewer 
     
     Credentials ts = new Credentials();
     // get the delegation tokens
-    MyToken token1 = dfs.getDelegationToken(new Text("user1"));
+    MyToken token1 = dfs.getDelegationToken("user1");
 
     String nn1 = DelegationTokenRenewer.SCHEME + "://host1:0";
     ts.addToken(new Text(nn1), token1);
@@ -609,7 +609,7 @@ public class TestDelegationTokenRenewer 
 
     Credentials ts = new Credentials();
     // get the delegation tokens
-    MyToken token1 = dfs.getDelegationToken(new Text("user1"));
+    MyToken token1 = dfs.getDelegationToken("user1");
     
     String nn1 = DelegationTokenRenewer.SCHEME + "://host1:0";
     ts.addToken(new Text(nn1), token1);



Mime
View raw message