You are viewing a plain text version of this content. The canonical link for it is here.
Posted to mapreduce-commits@hadoop.apache.org by dd...@apache.org on 2010/02/26 06:58:16 UTC
svn commit: r916578 - in /hadoop/mapreduce/trunk: CHANGES.txt
src/test/mapred/org/apache/hadoop/mapreduce/security/token/TestDelegationTokenRenewal.java
Author: ddas
Date: Fri Feb 26 05:58:15 2010
New Revision: 916578
URL: http://svn.apache.org/viewvc?rev=916578&view=rev
Log:
MAPREDUCE-1537. Fixes a compilation problem in a testcase after commit of HDFS-984. Contributed by Jitendra Nath Pandey.
Modified:
hadoop/mapreduce/trunk/CHANGES.txt
hadoop/mapreduce/trunk/src/test/mapred/org/apache/hadoop/mapreduce/security/token/TestDelegationTokenRenewal.java
Modified: hadoop/mapreduce/trunk/CHANGES.txt
URL: http://svn.apache.org/viewvc/hadoop/mapreduce/trunk/CHANGES.txt?rev=916578&r1=916577&r2=916578&view=diff
==============================================================================
--- hadoop/mapreduce/trunk/CHANGES.txt (original)
+++ hadoop/mapreduce/trunk/CHANGES.txt Fri Feb 26 05:58:15 2010
@@ -383,6 +383,9 @@
MAPREDUCE-1519. RaidNode fails to create new parity file
if an older version already exists. (Rodrigo Schmidt via dhruba)
+ MAPREDUCE-1537. Fixes a compilation problem in a testcase after commit
+ HDFS-984. (Jitendra Nath Pandey via ddas)
+
Release 0.21.0 - Unreleased
INCOMPATIBLE CHANGES
Modified: hadoop/mapreduce/trunk/src/test/mapred/org/apache/hadoop/mapreduce/security/token/TestDelegationTokenRenewal.java
URL: http://svn.apache.org/viewvc/hadoop/mapreduce/trunk/src/test/mapred/org/apache/hadoop/mapreduce/security/token/TestDelegationTokenRenewal.java?rev=916578&r1=916577&r2=916578&view=diff
==============================================================================
--- hadoop/mapreduce/trunk/src/test/mapred/org/apache/hadoop/mapreduce/security/token/TestDelegationTokenRenewal.java (original)
+++ hadoop/mapreduce/trunk/src/test/mapred/org/apache/hadoop/mapreduce/security/token/TestDelegationTokenRenewal.java Fri Feb 26 05:58:15 2010
@@ -34,6 +34,8 @@
import org.apache.hadoop.hdfs.DistributedFileSystem;
import org.apache.hadoop.hdfs.security.token.delegation.DelegationTokenIdentifier;
import org.apache.hadoop.hdfs.security.token.delegation.DelegationTokenSecretManager;
+import org.apache.hadoop.security.token.delegation.DelegationKey;
+import org.apache.hadoop.hdfs.server.namenode.FSNamesystem;
import org.apache.hadoop.io.Text;
import org.apache.hadoop.mapreduce.JobID;
import org.apache.hadoop.security.TokenStorage;
@@ -67,6 +69,22 @@
System.out.println("filesystem uri = " + FileSystem.getDefaultUri(conf).toString());
}
+ private static class MyDelegationTokenSecretManager extends DelegationTokenSecretManager {
+
+ public MyDelegationTokenSecretManager(long delegationKeyUpdateInterval,
+ long delegationTokenMaxLifetime, long delegationTokenRenewInterval,
+ long delegationTokenRemoverScanInterval, FSNamesystem namesystem) {
+ super(delegationKeyUpdateInterval, delegationTokenMaxLifetime,
+ delegationTokenRenewInterval, delegationTokenRemoverScanInterval,
+ namesystem);
+ }
+
+ @Override //DelegationTokenSecretManager
+ public void logUpdateMasterKey(DelegationKey key) throws IOException {
+ return;
+ }
+ }
+
/**
* add some extra functionality for testing
* 1. toString();
@@ -77,7 +95,7 @@
public static final String CANCELED = "CANCELED";
public MyToken(DelegationTokenIdentifier dtId1,
- DelegationTokenSecretManager sm) {
+ MyDelegationTokenSecretManager sm) {
super(dtId1, sm);
status = "GOOD";
}
@@ -165,11 +183,11 @@
throws IOException {
Text user1= new Text("user1");
- DelegationTokenSecretManager sm = new DelegationTokenSecretManager(
+ MyDelegationTokenSecretManager sm = new MyDelegationTokenSecretManager(
DFSConfigKeys.DFS_NAMENODE_DELEGATION_KEY_UPDATE_INTERVAL_DEFAULT,
DFSConfigKeys.DFS_NAMENODE_DELEGATION_KEY_UPDATE_INTERVAL_DEFAULT,
DFSConfigKeys.DFS_NAMENODE_DELEGATION_TOKEN_MAX_LIFETIME_DEFAULT,
- 3600000);
+ 3600000, null);
sm.startThreads();
DelegationTokenIdentifier dtId1 =