Author: vinodkv Date: Mon Jan 7 11:13:26 2013 New Revision: 1429751 URL: http://svn.apache.org/viewvc?rev=1429751&view=rev Log: MAPREDUCE-4920. Use security token protobuf definition from hadoop common. Contributed by Suresh Srinivas.
Modified: hadoop/common/trunk/hadoop-mapreduce-project/CHANGES.txt hadoop/common/trunk/hadoop-mapreduce-project/hadoop-mapreduce-client/hadoop-mapreduce-client-common/pom.xml hadoop/common/trunk/hadoop-mapreduce-project/hadoop-mapreduce-client/hadoop-mapreduce-client-common/src/main/java/org/apache/hadoop/mapreduce/v2/api/protocolrecords/impl/pb/CancelDelegationTokenRequestPBImpl.java hadoop/common/trunk/hadoop-mapreduce-project/hadoop-mapreduce-client/hadoop-mapreduce-client-common/src/main/java/org/apache/hadoop/mapreduce/v2/api/protocolrecords/impl/pb/GetDelegationTokenResponsePBImpl.java hadoop/common/trunk/hadoop-mapreduce-project/hadoop-mapreduce-client/hadoop-mapreduce-client-common/src/main/java/org/apache/hadoop/mapreduce/v2/api/protocolrecords/impl/pb/RenewDelegationTokenRequestPBImpl.java hadoop/common/trunk/hadoop-mapreduce-project/hadoop-mapreduce-client/hadoop-mapreduce-client-common/src/main/proto/mr_service_protos.proto Modified: hadoop/common/trunk/hadoop-mapreduce-project/CHANGES.txt URL: http://svn.apache.org/viewvc/hadoop/common/trunk/hadoop-mapreduce-project/CHANGES.txt?rev=1429751&r1=1429750&r2=1429751&view=diff ============================================================================== --- hadoop/common/trunk/hadoop-mapreduce-project/CHANGES.txt (original) +++ hadoop/common/trunk/hadoop-mapreduce-project/CHANGES.txt Mon Jan 7 11:13:26 2013 @@ -195,6 +195,9 @@ Release 2.0.3-alpha - Unreleased applications that YARN's ResourceManager doesn't keep track off anymore (Derek Dagit via vinodkv) + MAPREDUCE-4920. Use security token protobuf definition from hadoop common. + (Suresh Srinivas via vinodkv) + OPTIMIZATIONS BUG FIXES Modified: hadoop/common/trunk/hadoop-mapreduce-project/hadoop-mapreduce-client/hadoop-mapreduce-client-common/pom.xml URL: http://svn.apache.org/viewvc/hadoop/common/trunk/hadoop-mapreduce-project/hadoop-mapreduce-client/hadoop-mapreduce-client-common/pom.xml?rev=1429751&r1=1429750&r2=1429751&view=diff ============================================================================== --- hadoop/common/trunk/hadoop-mapreduce-project/hadoop-mapreduce-client/hadoop-mapreduce-client-common/pom.xml (original) +++ hadoop/common/trunk/hadoop-mapreduce-project/hadoop-mapreduce-client/hadoop-mapreduce-client-common/pom.xml Mon Jan 7 11:13:26 2013 @@ -81,6 +81,7 @@ <configuration> <executable>protoc</executable> <arguments> + <argument>-I../../../hadoop-common-project/hadoop-common/src/main/proto/</argument> <argument>-I../../../hadoop-yarn-project/hadoop-yarn/hadoop-yarn-api/src/main/proto/</argument> <argument>-Isrc/main/proto/</argument> <argument>--java_out=target/generated-sources/proto</argument> Modified: hadoop/common/trunk/hadoop-mapreduce-project/hadoop-mapreduce-client/hadoop-mapreduce-client-common/src/main/java/org/apache/hadoop/mapreduce/v2/api/protocolrecords/impl/pb/CancelDelegationTokenRequestPBImpl.java URL: http://svn.apache.org/viewvc/hadoop/common/trunk/hadoop-mapreduce-project/hadoop-mapreduce-client/hadoop-mapreduce-client-common/src/main/java/org/apache/hadoop/mapreduce/v2/api/protocolrecords/impl/pb/CancelDelegationTokenRequestPBImpl.java?rev=1429751&r1=1429750&r2=1429751&view=diff ============================================================================== --- hadoop/common/trunk/hadoop-mapreduce-project/hadoop-mapreduce-client/hadoop-mapreduce-client-common/src/main/java/org/apache/hadoop/mapreduce/v2/api/protocolrecords/impl/pb/CancelDelegationTokenRequestPBImpl.java (original) +++ hadoop/common/trunk/hadoop-mapreduce-project/hadoop-mapreduce-client/hadoop-mapreduce-client-common/src/main/java/org/apache/hadoop/mapreduce/v2/api/protocolrecords/impl/pb/CancelDelegationTokenRequestPBImpl.java Mon Jan 7 11:13:26 2013 @@ -20,10 +20,10 @@ package org.apache.hadoop.mapreduce.v2.a import org.apache.hadoop.mapreduce.v2.api.protocolrecords.CancelDelegationTokenRequest; import org.apache.hadoop.mapreduce.v2.proto.MRServiceProtos.CancelDelegationTokenRequestProto; import org.apache.hadoop.mapreduce.v2.proto.MRServiceProtos.CancelDelegationTokenRequestProtoOrBuilder; +import org.apache.hadoop.security.proto.SecurityProtos.TokenProto; import org.apache.hadoop.yarn.api.records.DelegationToken; import org.apache.hadoop.yarn.api.records.ProtoBase; import org.apache.hadoop.yarn.api.records.impl.pb.DelegationTokenPBImpl; -import org.apache.hadoop.yarn.proto.YarnProtos.DelegationTokenProto; public class CancelDelegationTokenRequestPBImpl extends ProtoBase<CancelDelegationTokenRequestProto> implements @@ -98,11 +98,11 @@ public class CancelDelegationTokenReques } - private DelegationTokenPBImpl convertFromProtoFormat(DelegationTokenProto p) { + private DelegationTokenPBImpl convertFromProtoFormat(TokenProto p) { return new DelegationTokenPBImpl(p); } - private DelegationTokenProto convertToProtoFormat(DelegationToken t) { + private TokenProto convertToProtoFormat(DelegationToken t) { return ((DelegationTokenPBImpl)t).getProto(); } } Modified: hadoop/common/trunk/hadoop-mapreduce-project/hadoop-mapreduce-client/hadoop-mapreduce-client-common/src/main/java/org/apache/hadoop/mapreduce/v2/api/protocolrecords/impl/pb/GetDelegationTokenResponsePBImpl.java URL: http://svn.apache.org/viewvc/hadoop/common/trunk/hadoop-mapreduce-project/hadoop-mapreduce-client/hadoop-mapreduce-client-common/src/main/java/org/apache/hadoop/mapreduce/v2/api/protocolrecords/impl/pb/GetDelegationTokenResponsePBImpl.java?rev=1429751&r1=1429750&r2=1429751&view=diff ============================================================================== --- hadoop/common/trunk/hadoop-mapreduce-project/hadoop-mapreduce-client/hadoop-mapreduce-client-common/src/main/java/org/apache/hadoop/mapreduce/v2/api/protocolrecords/impl/pb/GetDelegationTokenResponsePBImpl.java (original) +++ hadoop/common/trunk/hadoop-mapreduce-project/hadoop-mapreduce-client/hadoop-mapreduce-client-common/src/main/java/org/apache/hadoop/mapreduce/v2/api/protocolrecords/impl/pb/GetDelegationTokenResponsePBImpl.java Mon Jan 7 11:13:26 2013 @@ -20,10 +20,10 @@ package org.apache.hadoop.mapreduce.v2.a import org.apache.hadoop.mapreduce.v2.api.protocolrecords.GetDelegationTokenResponse; import org.apache.hadoop.mapreduce.v2.proto.MRServiceProtos.GetDelegationTokenResponseProto; import org.apache.hadoop.mapreduce.v2.proto.MRServiceProtos.GetDelegationTokenResponseProtoOrBuilder; +import org.apache.hadoop.security.proto.SecurityProtos.TokenProto; import org.apache.hadoop.yarn.api.records.DelegationToken; import org.apache.hadoop.yarn.api.records.ProtoBase; import org.apache.hadoop.yarn.api.records.impl.pb.DelegationTokenPBImpl; -import org.apache.hadoop.yarn.proto.YarnProtos.DelegationTokenProto; public class GetDelegationTokenResponsePBImpl extends @@ -99,11 +99,11 @@ public class GetDelegationTokenResponseP } - private DelegationTokenPBImpl convertFromProtoFormat(DelegationTokenProto p) { + private DelegationTokenPBImpl convertFromProtoFormat(TokenProto p) { return new DelegationTokenPBImpl(p); } - private DelegationTokenProto convertToProtoFormat(DelegationToken t) { + private TokenProto convertToProtoFormat(DelegationToken t) { return ((DelegationTokenPBImpl)t).getProto(); } } Modified: hadoop/common/trunk/hadoop-mapreduce-project/hadoop-mapreduce-client/hadoop-mapreduce-client-common/src/main/java/org/apache/hadoop/mapreduce/v2/api/protocolrecords/impl/pb/RenewDelegationTokenRequestPBImpl.java URL: http://svn.apache.org/viewvc/hadoop/common/trunk/hadoop-mapreduce-project/hadoop-mapreduce-client/hadoop-mapreduce-client-common/src/main/java/org/apache/hadoop/mapreduce/v2/api/protocolrecords/impl/pb/RenewDelegationTokenRequestPBImpl.java?rev=1429751&r1=1429750&r2=1429751&view=diff ============================================================================== --- hadoop/common/trunk/hadoop-mapreduce-project/hadoop-mapreduce-client/hadoop-mapreduce-client-common/src/main/java/org/apache/hadoop/mapreduce/v2/api/protocolrecords/impl/pb/RenewDelegationTokenRequestPBImpl.java (original) +++ hadoop/common/trunk/hadoop-mapreduce-project/hadoop-mapreduce-client/hadoop-mapreduce-client-common/src/main/java/org/apache/hadoop/mapreduce/v2/api/protocolrecords/impl/pb/RenewDelegationTokenRequestPBImpl.java Mon Jan 7 11:13:26 2013 @@ -20,10 +20,10 @@ package org.apache.hadoop.mapreduce.v2.a import org.apache.hadoop.mapreduce.v2.api.protocolrecords.RenewDelegationTokenRequest; import org.apache.hadoop.mapreduce.v2.proto.MRServiceProtos.RenewDelegationTokenRequestProto; import org.apache.hadoop.mapreduce.v2.proto.MRServiceProtos.RenewDelegationTokenRequestProtoOrBuilder; +import org.apache.hadoop.security.proto.SecurityProtos.TokenProto; import org.apache.hadoop.yarn.api.records.DelegationToken; import org.apache.hadoop.yarn.api.records.ProtoBase; import org.apache.hadoop.yarn.api.records.impl.pb.DelegationTokenPBImpl; -import org.apache.hadoop.yarn.proto.YarnProtos.DelegationTokenProto; public class RenewDelegationTokenRequestPBImpl extends ProtoBase<RenewDelegationTokenRequestProto> implements @@ -96,11 +96,11 @@ public class RenewDelegationTokenRequest viaProto = false; } - private DelegationTokenPBImpl convertFromProtoFormat(DelegationTokenProto p) { + private DelegationTokenPBImpl convertFromProtoFormat(TokenProto p) { return new DelegationTokenPBImpl(p); } - private DelegationTokenProto convertToProtoFormat(DelegationToken t) { + private TokenProto convertToProtoFormat(DelegationToken t) { return ((DelegationTokenPBImpl) t).getProto(); } } Modified: hadoop/common/trunk/hadoop-mapreduce-project/hadoop-mapreduce-client/hadoop-mapreduce-client-common/src/main/proto/mr_service_protos.proto URL: http://svn.apache.org/viewvc/hadoop/common/trunk/hadoop-mapreduce-project/hadoop-mapreduce-client/hadoop-mapreduce-client-common/src/main/proto/mr_service_protos.proto?rev=1429751&r1=1429750&r2=1429751&view=diff ============================================================================== --- hadoop/common/trunk/hadoop-mapreduce-project/hadoop-mapreduce-client/hadoop-mapreduce-client-common/src/main/proto/mr_service_protos.proto (original) +++ hadoop/common/trunk/hadoop-mapreduce-project/hadoop-mapreduce-client/hadoop-mapreduce-client-common/src/main/proto/mr_service_protos.proto Mon Jan 7 11:13:26 2013 @@ -21,6 +21,7 @@ option java_outer_classname = "MRService option java_generic_services = true; option java_generate_equals_and_hash = true; +import "Security.proto"; import "mr_protos.proto"; import "yarn_protos.proto"; @@ -81,7 +82,7 @@ message GetDelegationTokenRequestProto { } message GetDelegationTokenResponseProto { - optional DelegationTokenProto m_r_delegation_token = 1; + optional hadoop.common.TokenProto m_r_delegation_token = 1; } message KillJobRequestProto { @@ -109,7 +110,7 @@ message FailTaskAttemptResponseProto { } message RenewDelegationTokenRequestProto { - required DelegationTokenProto delegation_token = 1; + required hadoop.common.TokenProto delegation_token = 1; } message RenewDelegationTokenResponseProto { @@ -117,7 +118,7 @@ message RenewDelegationTokenResponseProt } message CancelDelegationTokenRequestProto { - required DelegationTokenProto delegation_token = 1; + required hadoop.common.TokenProto delegation_token = 1; } message CancelDelegationTokenResponseProto {