MAPREDUCE-4920. Use security token protobuf definition from hadoop common. Contributed by Suresh Srinivas.
svn merge --ignore-ancestry -c 1429751 ../../trunk/ git-svn-id: https://svn.apache.org/repos/asf/hadoop/common/branches/branch-2@1429752 13f79535-47bb-0310-9956-ffa450edef68
This commit is contained in:
parent
c166490bf0
commit
9a87b2f7fe
|
@ -30,6 +30,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
|
||||
|
|
|
@ -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>
|
||||
|
|
|
@ -20,10 +20,10 @@ package org.apache.hadoop.mapreduce.v2.api.protocolrecords.impl.pb;
|
|||
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 CancelDelegationTokenRequestPBImpl extends
|
|||
}
|
||||
|
||||
|
||||
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();
|
||||
}
|
||||
}
|
||||
|
|
|
@ -20,10 +20,10 @@ package org.apache.hadoop.mapreduce.v2.api.protocolrecords.impl.pb;
|
|||
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 GetDelegationTokenResponsePBImpl extends
|
|||
}
|
||||
|
||||
|
||||
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();
|
||||
}
|
||||
}
|
||||
|
|
|
@ -20,10 +20,10 @@ package org.apache.hadoop.mapreduce.v2.api.protocolrecords.impl.pb;
|
|||
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 RenewDelegationTokenRequestPBImpl extends
|
|||
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();
|
||||
}
|
||||
}
|
||||
|
|
|
@ -21,6 +21,7 @@ option java_outer_classname = "MRServiceProtos";
|
|||
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 RenewDelegationTokenResponseProto {
|
|||
}
|
||||
|
||||
message CancelDelegationTokenRequestProto {
|
||||
required DelegationTokenProto delegation_token = 1;
|
||||
required hadoop.common.TokenProto delegation_token = 1;
|
||||
}
|
||||
|
||||
message CancelDelegationTokenResponseProto {
|
||||
|
|
Loading…
Reference in New Issue