Return-Path: Delivered-To: apmail-hadoop-hdfs-commits-archive@minotaur.apache.org Received: (qmail 65966 invoked from network); 19 Aug 2010 22:58:11 -0000 Received: from unknown (HELO mail.apache.org) (140.211.11.3) by 140.211.11.9 with SMTP; 19 Aug 2010 22:58:11 -0000 Received: (qmail 56831 invoked by uid 500); 19 Aug 2010 22:58:11 -0000 Delivered-To: apmail-hadoop-hdfs-commits-archive@hadoop.apache.org Received: (qmail 56801 invoked by uid 500); 19 Aug 2010 22:58:10 -0000 Mailing-List: contact hdfs-commits-help@hadoop.apache.org; run by ezmlm Precedence: bulk List-Help: List-Unsubscribe: List-Post: List-Id: Reply-To: hdfs-dev@hadoop.apache.org Delivered-To: mailing list hdfs-commits@hadoop.apache.org Received: (qmail 56793 invoked by uid 99); 19 Aug 2010 22:58:10 -0000 Received: from athena.apache.org (HELO athena.apache.org) (140.211.11.136) by apache.org (qpsmtpd/0.29) with ESMTP; Thu, 19 Aug 2010 22:58:10 +0000 X-ASF-Spam-Status: No, hits=-2000.0 required=10.0 tests=ALL_TRUSTED X-Spam-Check-By: apache.org Received: from [140.211.11.4] (HELO eris.apache.org) (140.211.11.4) by apache.org (qpsmtpd/0.29) with ESMTP; Thu, 19 Aug 2010 22:58:10 +0000 Received: by eris.apache.org (Postfix, from userid 65534) id DE97A23888FE; Thu, 19 Aug 2010 22:56:52 +0000 (UTC) Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit Subject: svn commit: r987344 - in /hadoop/hdfs/trunk: CHANGES.txt src/test/hdfs/org/apache/hadoop/hdfs/security/TestDelegationToken.java Date: Thu, 19 Aug 2010 22:56:52 -0000 To: hdfs-commits@hadoop.apache.org From: boryas@apache.org X-Mailer: svnmailer-1.0.8 Message-Id: <20100819225652.DE97A23888FE@eris.apache.org> Author: boryas Date: Thu Aug 19 22:56:52 2010 New Revision: 987344 URL: http://svn.apache.org/viewvc?rev=987344&view=rev Log: HDFS-1347. TestDelegationToken uses mortbay.log for logging Modified: hadoop/hdfs/trunk/CHANGES.txt hadoop/hdfs/trunk/src/test/hdfs/org/apache/hadoop/hdfs/security/TestDelegationToken.java Modified: hadoop/hdfs/trunk/CHANGES.txt URL: http://svn.apache.org/viewvc/hadoop/hdfs/trunk/CHANGES.txt?rev=987344&r1=987343&r2=987344&view=diff ============================================================================== --- hadoop/hdfs/trunk/CHANGES.txt (original) +++ hadoop/hdfs/trunk/CHANGES.txt Thu Aug 19 22:56:52 2010 @@ -211,6 +211,8 @@ Trunk (unreleased changes) This patch fixes it by removing delegationtoken string from the URL, before returning a response to the client. (Jitendra Pandey via ddas) + HDFS-1347. TestDelegationToken uses mortbay.log for logging (boryas) + Release 0.21.0 - Unreleased INCOMPATIBLE CHANGES Modified: hadoop/hdfs/trunk/src/test/hdfs/org/apache/hadoop/hdfs/security/TestDelegationToken.java URL: http://svn.apache.org/viewvc/hadoop/hdfs/trunk/src/test/hdfs/org/apache/hadoop/hdfs/security/TestDelegationToken.java?rev=987344&r1=987343&r2=987344&view=diff ============================================================================== --- hadoop/hdfs/trunk/src/test/hdfs/org/apache/hadoop/hdfs/security/TestDelegationToken.java (original) +++ hadoop/hdfs/trunk/src/test/hdfs/org/apache/hadoop/hdfs/security/TestDelegationToken.java Thu Aug 19 22:56:52 2010 @@ -27,27 +27,29 @@ import java.security.PrivilegedException import junit.framework.Assert; +import org.apache.commons.logging.Log; +import org.apache.commons.logging.LogFactory; import org.apache.hadoop.conf.Configuration; import org.apache.hadoop.fs.FileSystem; import org.apache.hadoop.hdfs.DFSConfigKeys; import org.apache.hadoop.hdfs.DistributedFileSystem; import org.apache.hadoop.hdfs.HdfsConfiguration; import org.apache.hadoop.hdfs.MiniDFSCluster; +import org.apache.hadoop.hdfs.security.token.delegation.DelegationTokenIdentifier; +import org.apache.hadoop.hdfs.security.token.delegation.DelegationTokenSecretManager; import org.apache.hadoop.io.Text; import org.apache.hadoop.security.AccessControlException; import org.apache.hadoop.security.UserGroupInformation; -import org.apache.hadoop.security.token.Token; import org.apache.hadoop.security.token.SecretManager.InvalidToken; -import org.apache.hadoop.hdfs.security.token.delegation.DelegationTokenIdentifier; -import org.apache.hadoop.hdfs.security.token.delegation.DelegationTokenSecretManager; +import org.apache.hadoop.security.token.Token; import org.junit.After; import org.junit.Before; import org.junit.Test; -import org.mortbay.log.Log; public class TestDelegationToken { private MiniDFSCluster cluster; Configuration config; + private static final Log LOG = LogFactory.getLog(TestDelegationToken.class); @Before public void setUp() throws Exception { @@ -97,7 +99,7 @@ public class TestDelegationToken { identifier.readFields(new DataInputStream( new ByteArrayInputStream(tokenId))); Assert.assertTrue(null != dtSecretManager.retrievePassword(identifier)); - Log.info("Sleep to expire the token"); + LOG.info("Sleep to expire the token"); Thread.sleep(6000); //Token should be expired try { @@ -108,7 +110,7 @@ public class TestDelegationToken { //Success } dtSecretManager.renewToken(token, "JobTracker"); - Log.info("Sleep beyond the max lifetime"); + LOG.info("Sleep beyond the max lifetime"); Thread.sleep(5000); try { dtSecretManager.renewToken(token, "JobTracker"); @@ -149,7 +151,7 @@ public class TestDelegationToken { byte[] tokenId = token.getIdentifier(); identifier.readFields(new DataInputStream( new ByteArrayInputStream(tokenId))); - Log.info("A valid token should have non-null password, and should be renewed successfully"); + LOG.info("A valid token should have non-null password, and should be renewed successfully"); Assert.assertTrue(null != dtSecretManager.retrievePassword(identifier)); dtSecretManager.renewToken(token, "JobTracker"); }