You are viewing a plain text version of this content. The canonical link for it is here.
Posted to common-commits@hadoop.apache.org by om...@apache.org on 2010/02/25 19:34:05 UTC
svn commit: r916390 - in /hadoop/common/trunk: CHANGES.txt
src/java/org/apache/hadoop/security/token/delegation/AbstractDelegationTokenIdentifier.java
Author: omalley
Date: Thu Feb 25 18:34:05 2010
New Revision: 916390
URL: http://svn.apache.org/viewvc?rev=916390&view=rev
Log:
HADOOP-6596. Add a version field to the AbstractDelegationTokenIdentifier's
serialized value. (omalley)
Modified:
hadoop/common/trunk/CHANGES.txt
hadoop/common/trunk/src/java/org/apache/hadoop/security/token/delegation/AbstractDelegationTokenIdentifier.java
Modified: hadoop/common/trunk/CHANGES.txt
URL: http://svn.apache.org/viewvc/hadoop/common/trunk/CHANGES.txt?rev=916390&r1=916389&r2=916390&view=diff
==============================================================================
--- hadoop/common/trunk/CHANGES.txt (original)
+++ hadoop/common/trunk/CHANGES.txt Thu Feb 25 18:34:05 2010
@@ -164,6 +164,9 @@
HADOOP-6579. Provide a mechanism for encoding/decoding Tokens from
a url-safe string and change the commons-code library to 1.4. (omalley)
+ HADOOP-6596. Add a version field to the AbstractDelegationTokenIdentifier's
+ serialized value. (omalley)
+
OPTIMIZATIONS
HADOOP-6467. Improve the performance on HarFileSystem.listStatus(..).
Modified: hadoop/common/trunk/src/java/org/apache/hadoop/security/token/delegation/AbstractDelegationTokenIdentifier.java
URL: http://svn.apache.org/viewvc/hadoop/common/trunk/src/java/org/apache/hadoop/security/token/delegation/AbstractDelegationTokenIdentifier.java?rev=916390&r1=916389&r2=916390&view=diff
==============================================================================
--- hadoop/common/trunk/src/java/org/apache/hadoop/security/token/delegation/AbstractDelegationTokenIdentifier.java (original)
+++ hadoop/common/trunk/src/java/org/apache/hadoop/security/token/delegation/AbstractDelegationTokenIdentifier.java Thu Feb 25 18:34:05 2010
@@ -34,6 +34,7 @@
@InterfaceAudience.LimitedPrivate({HDFS, MAPREDUCE})
public abstract class AbstractDelegationTokenIdentifier
extends TokenIdentifier {
+ private static final byte VERSION = 0;
private Text owner;
private Text renewer;
@@ -145,6 +146,11 @@
}
public void readFields(DataInput in) throws IOException {
+ byte version = in.readByte();
+ if (version != VERSION) {
+ throw new IOException("Unknown version of delegation token " +
+ version);
+ }
owner.readFields(in);
renewer.readFields(in);
realUser.readFields(in);
@@ -155,6 +161,7 @@
}
public void write(DataOutput out) throws IOException {
+ out.writeByte(VERSION);
owner.write(out);
renewer.write(out);
realUser.write(out);