From 86825d839078d3fb01fcd1406ff99fa081f5dc49 Mon Sep 17 00:00:00 2001 From: Suresh Srinivas Date: Tue, 15 Jan 2013 00:11:16 +0000 Subject: [PATCH] MAPREDUCE-4938. Use token request messages defined in hadoop common. Contributed by Suresh Srinvias. git-svn-id: https://svn.apache.org/repos/asf/hadoop/common/trunk@1433227 13f79535-47bb-0310-9956-ffa450edef68 --- hadoop-mapreduce-project/CHANGES.txt | 3 +++ .../client/MRClientProtocolPBClientImpl.java | 9 ++++---- .../MRClientProtocolPBServiceImpl.java | 12 +++++----- .../CancelDelegationTokenRequestPBImpl.java | 13 +++++------ .../CancelDelegationTokenResponsePBImpl.java | 2 +- .../pb/GetDelegationTokenRequestPBImpl.java | 7 ++---- .../pb/GetDelegationTokenResponsePBImpl.java | 12 +++++----- .../pb/RenewDelegationTokenRequestPBImpl.java | 13 +++++------ .../RenewDelegationTokenResponsePBImpl.java | 8 +++---- .../src/main/proto/MRClientProtocol.proto | 7 +++--- .../src/main/proto/mr_service_protos.proto | 22 ------------------- 11 files changed, 40 insertions(+), 68 deletions(-) diff --git a/hadoop-mapreduce-project/CHANGES.txt b/hadoop-mapreduce-project/CHANGES.txt index eeec45d2cd..8e7f15c6aa 100644 --- a/hadoop-mapreduce-project/CHANGES.txt +++ b/hadoop-mapreduce-project/CHANGES.txt @@ -170,6 +170,9 @@ Release 2.0.3-alpha - Unreleased MAPREDUCE-4123. Remove the 'mapred groups' command, which is no longer supported. (Devaraj K via sseth) + MAPREDUCE-4938. Use token request messages defined in hadoop common. + (suresh) + NEW FEATURES MAPREDUCE-4520. Added support for MapReduce applications to request for diff --git a/hadoop-mapreduce-project/hadoop-mapreduce-client/hadoop-mapreduce-client-common/src/main/java/org/apache/hadoop/mapreduce/v2/api/impl/pb/client/MRClientProtocolPBClientImpl.java b/hadoop-mapreduce-project/hadoop-mapreduce-client/hadoop-mapreduce-client-common/src/main/java/org/apache/hadoop/mapreduce/v2/api/impl/pb/client/MRClientProtocolPBClientImpl.java index 930163a56e..ad2ce63144 100644 --- a/hadoop-mapreduce-project/hadoop-mapreduce-client/hadoop-mapreduce-client-common/src/main/java/org/apache/hadoop/mapreduce/v2/api/impl/pb/client/MRClientProtocolPBClientImpl.java +++ b/hadoop-mapreduce-project/hadoop-mapreduce-client/hadoop-mapreduce-client-common/src/main/java/org/apache/hadoop/mapreduce/v2/api/impl/pb/client/MRClientProtocolPBClientImpl.java @@ -82,10 +82,8 @@ import org.apache.hadoop.mapreduce.v2.api.protocolrecords.impl.pb.KillTaskResponsePBImpl; import org.apache.hadoop.mapreduce.v2.api.protocolrecords.impl.pb.RenewDelegationTokenRequestPBImpl; import org.apache.hadoop.mapreduce.v2.api.protocolrecords.impl.pb.RenewDelegationTokenResponsePBImpl; -import org.apache.hadoop.mapreduce.v2.proto.MRServiceProtos.CancelDelegationTokenRequestProto; import org.apache.hadoop.mapreduce.v2.proto.MRServiceProtos.FailTaskAttemptRequestProto; import org.apache.hadoop.mapreduce.v2.proto.MRServiceProtos.GetCountersRequestProto; -import org.apache.hadoop.mapreduce.v2.proto.MRServiceProtos.GetDelegationTokenRequestProto; import org.apache.hadoop.mapreduce.v2.proto.MRServiceProtos.GetDiagnosticsRequestProto; import org.apache.hadoop.mapreduce.v2.proto.MRServiceProtos.GetJobReportRequestProto; import org.apache.hadoop.mapreduce.v2.proto.MRServiceProtos.GetTaskAttemptCompletionEventsRequestProto; @@ -95,7 +93,9 @@ import org.apache.hadoop.mapreduce.v2.proto.MRServiceProtos.KillJobRequestProto; import org.apache.hadoop.mapreduce.v2.proto.MRServiceProtos.KillTaskAttemptRequestProto; import org.apache.hadoop.mapreduce.v2.proto.MRServiceProtos.KillTaskRequestProto; -import org.apache.hadoop.mapreduce.v2.proto.MRServiceProtos.RenewDelegationTokenRequestProto; +import org.apache.hadoop.security.proto.SecurityProtos.CancelDelegationTokenRequestProto; +import org.apache.hadoop.security.proto.SecurityProtos.GetDelegationTokenRequestProto; +import org.apache.hadoop.security.proto.SecurityProtos.RenewDelegationTokenRequestProto; import org.apache.hadoop.yarn.exceptions.YarnRemoteException; import org.apache.hadoop.yarn.exceptions.impl.pb.YarnRemoteExceptionPBImpl; @@ -109,8 +109,7 @@ public class MRClientProtocolPBClientImpl implements MRClientProtocol { public MRClientProtocolPBClientImpl(long clientVersion, InetSocketAddress addr, Configuration conf) throws IOException { RPC.setProtocolEngine(conf, MRClientProtocolPB.class, ProtobufRpcEngine.class); - proxy = (MRClientProtocolPB)RPC.getProxy( - MRClientProtocolPB.class, clientVersion, addr, conf); + proxy = RPC.getProxy(MRClientProtocolPB.class, clientVersion, addr, conf); } @Override diff --git a/hadoop-mapreduce-project/hadoop-mapreduce-client/hadoop-mapreduce-client-common/src/main/java/org/apache/hadoop/mapreduce/v2/api/impl/pb/service/MRClientProtocolPBServiceImpl.java b/hadoop-mapreduce-project/hadoop-mapreduce-client/hadoop-mapreduce-client-common/src/main/java/org/apache/hadoop/mapreduce/v2/api/impl/pb/service/MRClientProtocolPBServiceImpl.java index 492272ce8e..0cfb5279e3 100644 --- a/hadoop-mapreduce-project/hadoop-mapreduce-client/hadoop-mapreduce-client-common/src/main/java/org/apache/hadoop/mapreduce/v2/api/impl/pb/service/MRClientProtocolPBServiceImpl.java +++ b/hadoop-mapreduce-project/hadoop-mapreduce-client/hadoop-mapreduce-client-common/src/main/java/org/apache/hadoop/mapreduce/v2/api/impl/pb/service/MRClientProtocolPBServiceImpl.java @@ -73,14 +73,10 @@ import org.apache.hadoop.mapreduce.v2.api.protocolrecords.impl.pb.KillTaskResponsePBImpl; import org.apache.hadoop.mapreduce.v2.api.protocolrecords.impl.pb.RenewDelegationTokenRequestPBImpl; import org.apache.hadoop.mapreduce.v2.api.protocolrecords.impl.pb.RenewDelegationTokenResponsePBImpl; -import org.apache.hadoop.mapreduce.v2.proto.MRServiceProtos.CancelDelegationTokenRequestProto; -import org.apache.hadoop.mapreduce.v2.proto.MRServiceProtos.CancelDelegationTokenResponseProto; import org.apache.hadoop.mapreduce.v2.proto.MRServiceProtos.FailTaskAttemptRequestProto; import org.apache.hadoop.mapreduce.v2.proto.MRServiceProtos.FailTaskAttemptResponseProto; import org.apache.hadoop.mapreduce.v2.proto.MRServiceProtos.GetCountersRequestProto; import org.apache.hadoop.mapreduce.v2.proto.MRServiceProtos.GetCountersResponseProto; -import org.apache.hadoop.mapreduce.v2.proto.MRServiceProtos.GetDelegationTokenRequestProto; -import org.apache.hadoop.mapreduce.v2.proto.MRServiceProtos.GetDelegationTokenResponseProto; import org.apache.hadoop.mapreduce.v2.proto.MRServiceProtos.GetDiagnosticsRequestProto; import org.apache.hadoop.mapreduce.v2.proto.MRServiceProtos.GetDiagnosticsResponseProto; import org.apache.hadoop.mapreduce.v2.proto.MRServiceProtos.GetJobReportRequestProto; @@ -99,8 +95,12 @@ import org.apache.hadoop.mapreduce.v2.proto.MRServiceProtos.KillTaskAttemptResponseProto; import org.apache.hadoop.mapreduce.v2.proto.MRServiceProtos.KillTaskRequestProto; import org.apache.hadoop.mapreduce.v2.proto.MRServiceProtos.KillTaskResponseProto; -import org.apache.hadoop.mapreduce.v2.proto.MRServiceProtos.RenewDelegationTokenRequestProto; -import org.apache.hadoop.mapreduce.v2.proto.MRServiceProtos.RenewDelegationTokenResponseProto; +import org.apache.hadoop.security.proto.SecurityProtos.CancelDelegationTokenRequestProto; +import org.apache.hadoop.security.proto.SecurityProtos.CancelDelegationTokenResponseProto; +import org.apache.hadoop.security.proto.SecurityProtos.GetDelegationTokenRequestProto; +import org.apache.hadoop.security.proto.SecurityProtos.GetDelegationTokenResponseProto; +import org.apache.hadoop.security.proto.SecurityProtos.RenewDelegationTokenRequestProto; +import org.apache.hadoop.security.proto.SecurityProtos.RenewDelegationTokenResponseProto; import org.apache.hadoop.yarn.exceptions.YarnRemoteException; import com.google.protobuf.RpcController; diff --git a/hadoop-mapreduce-project/hadoop-mapreduce-client/hadoop-mapreduce-client-common/src/main/java/org/apache/hadoop/mapreduce/v2/api/protocolrecords/impl/pb/CancelDelegationTokenRequestPBImpl.java b/hadoop-mapreduce-project/hadoop-mapreduce-client/hadoop-mapreduce-client-common/src/main/java/org/apache/hadoop/mapreduce/v2/api/protocolrecords/impl/pb/CancelDelegationTokenRequestPBImpl.java index 68ffcccf28..8a4045552e 100644 --- a/hadoop-mapreduce-project/hadoop-mapreduce-client/hadoop-mapreduce-client-common/src/main/java/org/apache/hadoop/mapreduce/v2/api/protocolrecords/impl/pb/CancelDelegationTokenRequestPBImpl.java +++ b/hadoop-mapreduce-project/hadoop-mapreduce-client/hadoop-mapreduce-client-common/src/main/java/org/apache/hadoop/mapreduce/v2/api/protocolrecords/impl/pb/CancelDelegationTokenRequestPBImpl.java @@ -18,8 +18,8 @@ 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.CancelDelegationTokenRequestProto; +import org.apache.hadoop.security.proto.SecurityProtos.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; @@ -52,10 +52,7 @@ public DelegationToken getDelegationToken() { if (this.token != null) { return this.token; } - if (!p.hasDelegationToken()) { - return null; - } - this.token = convertFromProtoFormat(p.getDelegationToken()); + this.token = convertFromProtoFormat(p.getToken()); return this.token; } @@ -63,7 +60,7 @@ public DelegationToken getDelegationToken() { public void setDelegationToken(DelegationToken token) { maybeInitBuilder(); if (token == null) - builder.clearDelegationToken(); + builder.clearToken(); this.token = token; } @@ -78,7 +75,7 @@ public CancelDelegationTokenRequestProto getProto() { private void mergeLocalToBuilder() { if (token != null) { - builder.setDelegationToken(convertToProtoFormat(this.token)); + builder.setToken(convertToProtoFormat(this.token)); } } diff --git a/hadoop-mapreduce-project/hadoop-mapreduce-client/hadoop-mapreduce-client-common/src/main/java/org/apache/hadoop/mapreduce/v2/api/protocolrecords/impl/pb/CancelDelegationTokenResponsePBImpl.java b/hadoop-mapreduce-project/hadoop-mapreduce-client/hadoop-mapreduce-client-common/src/main/java/org/apache/hadoop/mapreduce/v2/api/protocolrecords/impl/pb/CancelDelegationTokenResponsePBImpl.java index 4c7989aad1..59f0ae9f9c 100644 --- a/hadoop-mapreduce-project/hadoop-mapreduce-client/hadoop-mapreduce-client-common/src/main/java/org/apache/hadoop/mapreduce/v2/api/protocolrecords/impl/pb/CancelDelegationTokenResponsePBImpl.java +++ b/hadoop-mapreduce-project/hadoop-mapreduce-client/hadoop-mapreduce-client-common/src/main/java/org/apache/hadoop/mapreduce/v2/api/protocolrecords/impl/pb/CancelDelegationTokenResponsePBImpl.java @@ -18,7 +18,7 @@ package org.apache.hadoop.mapreduce.v2.api.protocolrecords.impl.pb; import org.apache.hadoop.mapreduce.v2.api.protocolrecords.CancelDelegationTokenResponse; -import org.apache.hadoop.mapreduce.v2.proto.MRServiceProtos.CancelDelegationTokenResponseProto; +import org.apache.hadoop.security.proto.SecurityProtos.CancelDelegationTokenResponseProto; import org.apache.hadoop.yarn.api.records.ProtoBase; public class CancelDelegationTokenResponsePBImpl extends diff --git a/hadoop-mapreduce-project/hadoop-mapreduce-client/hadoop-mapreduce-client-common/src/main/java/org/apache/hadoop/mapreduce/v2/api/protocolrecords/impl/pb/GetDelegationTokenRequestPBImpl.java b/hadoop-mapreduce-project/hadoop-mapreduce-client/hadoop-mapreduce-client-common/src/main/java/org/apache/hadoop/mapreduce/v2/api/protocolrecords/impl/pb/GetDelegationTokenRequestPBImpl.java index 9cf26a2620..b028c53b37 100644 --- a/hadoop-mapreduce-project/hadoop-mapreduce-client/hadoop-mapreduce-client-common/src/main/java/org/apache/hadoop/mapreduce/v2/api/protocolrecords/impl/pb/GetDelegationTokenRequestPBImpl.java +++ b/hadoop-mapreduce-project/hadoop-mapreduce-client/hadoop-mapreduce-client-common/src/main/java/org/apache/hadoop/mapreduce/v2/api/protocolrecords/impl/pb/GetDelegationTokenRequestPBImpl.java @@ -18,8 +18,8 @@ package org.apache.hadoop.mapreduce.v2.api.protocolrecords.impl.pb; import org.apache.hadoop.mapreduce.v2.api.protocolrecords.GetDelegationTokenRequest; -import org.apache.hadoop.mapreduce.v2.proto.MRServiceProtos.GetDelegationTokenRequestProto; -import org.apache.hadoop.mapreduce.v2.proto.MRServiceProtos.GetDelegationTokenRequestProtoOrBuilder; +import org.apache.hadoop.security.proto.SecurityProtos.GetDelegationTokenRequestProto; +import org.apache.hadoop.security.proto.SecurityProtos.GetDelegationTokenRequestProtoOrBuilder; import org.apache.hadoop.yarn.api.records.ProtoBase; @@ -50,9 +50,6 @@ public String getRenewer(){ if (this.renewer != null) { return this.renewer; } - if (!p.hasRenewer()) { - return null; - } this.renewer = p.getRenewer(); return this.renewer; } diff --git a/hadoop-mapreduce-project/hadoop-mapreduce-client/hadoop-mapreduce-client-common/src/main/java/org/apache/hadoop/mapreduce/v2/api/protocolrecords/impl/pb/GetDelegationTokenResponsePBImpl.java b/hadoop-mapreduce-project/hadoop-mapreduce-client/hadoop-mapreduce-client-common/src/main/java/org/apache/hadoop/mapreduce/v2/api/protocolrecords/impl/pb/GetDelegationTokenResponsePBImpl.java index 5967522573..9a43a27958 100644 --- a/hadoop-mapreduce-project/hadoop-mapreduce-client/hadoop-mapreduce-client-common/src/main/java/org/apache/hadoop/mapreduce/v2/api/protocolrecords/impl/pb/GetDelegationTokenResponsePBImpl.java +++ b/hadoop-mapreduce-project/hadoop-mapreduce-client/hadoop-mapreduce-client-common/src/main/java/org/apache/hadoop/mapreduce/v2/api/protocolrecords/impl/pb/GetDelegationTokenResponsePBImpl.java @@ -18,8 +18,8 @@ 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.GetDelegationTokenResponseProto; +import org.apache.hadoop.security.proto.SecurityProtos.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; @@ -53,10 +53,10 @@ public DelegationToken getDelegationToken() { if (this.mrToken != null) { return this.mrToken; } - if (!p.hasMRDelegationToken()) { + if (!p.hasToken()) { return null; } - this.mrToken = convertFromProtoFormat(p.getMRDelegationToken()); + this.mrToken = convertFromProtoFormat(p.getToken()); return this.mrToken; } @@ -64,7 +64,7 @@ public DelegationToken getDelegationToken() { public void setDelegationToken(DelegationToken mrToken) { maybeInitBuilder(); if (mrToken == null) - builder.clearMRDelegationToken(); + builder.getToken(); this.mrToken = mrToken; } @@ -79,7 +79,7 @@ public GetDelegationTokenResponseProto getProto() { private void mergeLocalToBuilder() { if (mrToken != null) { - builder.setMRDelegationToken(convertToProtoFormat(this.mrToken)); + builder.setToken(convertToProtoFormat(this.mrToken)); } } diff --git a/hadoop-mapreduce-project/hadoop-mapreduce-client/hadoop-mapreduce-client-common/src/main/java/org/apache/hadoop/mapreduce/v2/api/protocolrecords/impl/pb/RenewDelegationTokenRequestPBImpl.java b/hadoop-mapreduce-project/hadoop-mapreduce-client/hadoop-mapreduce-client-common/src/main/java/org/apache/hadoop/mapreduce/v2/api/protocolrecords/impl/pb/RenewDelegationTokenRequestPBImpl.java index 7d9017d935..5b616b6b9a 100644 --- a/hadoop-mapreduce-project/hadoop-mapreduce-client/hadoop-mapreduce-client-common/src/main/java/org/apache/hadoop/mapreduce/v2/api/protocolrecords/impl/pb/RenewDelegationTokenRequestPBImpl.java +++ b/hadoop-mapreduce-project/hadoop-mapreduce-client/hadoop-mapreduce-client-common/src/main/java/org/apache/hadoop/mapreduce/v2/api/protocolrecords/impl/pb/RenewDelegationTokenRequestPBImpl.java @@ -18,8 +18,8 @@ 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.RenewDelegationTokenRequestProto; +import org.apache.hadoop.security.proto.SecurityProtos.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; @@ -52,10 +52,7 @@ public DelegationToken getDelegationToken() { if (this.token != null) { return this.token; } - if (!p.hasDelegationToken()) { - return null; - } - this.token = convertFromProtoFormat(p.getDelegationToken()); + this.token = convertFromProtoFormat(p.getToken()); return this.token; } @@ -63,7 +60,7 @@ public DelegationToken getDelegationToken() { public void setDelegationToken(DelegationToken token) { maybeInitBuilder(); if (token == null) - builder.clearDelegationToken(); + builder.clearToken(); this.token = token; } @@ -77,7 +74,7 @@ public RenewDelegationTokenRequestProto getProto() { private void mergeLocalToBuilder() { if (token != null) { - builder.setDelegationToken(convertToProtoFormat(this.token)); + builder.setToken(convertToProtoFormat(this.token)); } } diff --git a/hadoop-mapreduce-project/hadoop-mapreduce-client/hadoop-mapreduce-client-common/src/main/java/org/apache/hadoop/mapreduce/v2/api/protocolrecords/impl/pb/RenewDelegationTokenResponsePBImpl.java b/hadoop-mapreduce-project/hadoop-mapreduce-client/hadoop-mapreduce-client-common/src/main/java/org/apache/hadoop/mapreduce/v2/api/protocolrecords/impl/pb/RenewDelegationTokenResponsePBImpl.java index 0a9e1275e6..beb78de7c1 100644 --- a/hadoop-mapreduce-project/hadoop-mapreduce-client/hadoop-mapreduce-client-common/src/main/java/org/apache/hadoop/mapreduce/v2/api/protocolrecords/impl/pb/RenewDelegationTokenResponsePBImpl.java +++ b/hadoop-mapreduce-project/hadoop-mapreduce-client/hadoop-mapreduce-client-common/src/main/java/org/apache/hadoop/mapreduce/v2/api/protocolrecords/impl/pb/RenewDelegationTokenResponsePBImpl.java @@ -19,8 +19,8 @@ import org.apache.hadoop.mapreduce.v2.api.protocolrecords.RenewDelegationTokenResponse; -import org.apache.hadoop.mapreduce.v2.proto.MRServiceProtos.RenewDelegationTokenResponseProto; -import org.apache.hadoop.mapreduce.v2.proto.MRServiceProtos.RenewDelegationTokenResponseProtoOrBuilder; +import org.apache.hadoop.security.proto.SecurityProtos.RenewDelegationTokenResponseProto; +import org.apache.hadoop.security.proto.SecurityProtos.RenewDelegationTokenResponseProtoOrBuilder; import org.apache.hadoop.yarn.api.records.ProtoBase; public class RenewDelegationTokenResponsePBImpl extends @@ -59,12 +59,12 @@ private void maybeInitBuilder() { @Override public long getNextExpirationTime() { RenewDelegationTokenResponseProtoOrBuilder p = viaProto ? proto : builder; - return p.getNextExpiryTs(); + return p.getNewExpiryTime(); } @Override public void setNextExpirationTime(long expTime) { maybeInitBuilder(); - builder.setNextExpiryTs(expTime); + builder.setNewExpiryTime(expTime); } } diff --git a/hadoop-mapreduce-project/hadoop-mapreduce-client/hadoop-mapreduce-client-common/src/main/proto/MRClientProtocol.proto b/hadoop-mapreduce-project/hadoop-mapreduce-client/hadoop-mapreduce-client-common/src/main/proto/MRClientProtocol.proto index f9de094f43..83a946f4ce 100644 --- a/hadoop-mapreduce-project/hadoop-mapreduce-client/hadoop-mapreduce-client-common/src/main/proto/MRClientProtocol.proto +++ b/hadoop-mapreduce-project/hadoop-mapreduce-client/hadoop-mapreduce-client-common/src/main/proto/MRClientProtocol.proto @@ -20,6 +20,7 @@ option java_package = "org.apache.hadoop.yarn.proto"; option java_outer_classname = "MRClientProtocol"; option java_generic_services = true; +import "Security.proto"; import "mr_service_protos.proto"; /* If making changes to this, please edit HSClientProtocolService */ @@ -31,11 +32,11 @@ service MRClientProtocolService { rpc getTaskAttemptCompletionEvents (GetTaskAttemptCompletionEventsRequestProto) returns (GetTaskAttemptCompletionEventsResponseProto); rpc getTaskReports (GetTaskReportsRequestProto) returns (GetTaskReportsResponseProto); rpc getDiagnostics (GetDiagnosticsRequestProto) returns (GetDiagnosticsResponseProto); - rpc getDelegationToken (GetDelegationTokenRequestProto) returns (GetDelegationTokenResponseProto); + rpc getDelegationToken (hadoop.common.GetDelegationTokenRequestProto) returns (hadoop.common.GetDelegationTokenResponseProto); rpc killJob (KillJobRequestProto) returns (KillJobResponseProto); rpc killTask (KillTaskRequestProto) returns (KillTaskResponseProto); rpc killTaskAttempt (KillTaskAttemptRequestProto) returns (KillTaskAttemptResponseProto); rpc failTaskAttempt (FailTaskAttemptRequestProto) returns (FailTaskAttemptResponseProto); - rpc renewDelegationToken(RenewDelegationTokenRequestProto) returns (RenewDelegationTokenResponseProto); - rpc cancelDelegationToken(CancelDelegationTokenRequestProto) returns (CancelDelegationTokenResponseProto); + rpc renewDelegationToken(hadoop.common.RenewDelegationTokenRequestProto) returns (hadoop.common.RenewDelegationTokenResponseProto); + rpc cancelDelegationToken(hadoop.common.CancelDelegationTokenRequestProto) returns (hadoop.common.CancelDelegationTokenResponseProto); } diff --git a/hadoop-mapreduce-project/hadoop-mapreduce-client/hadoop-mapreduce-client-common/src/main/proto/mr_service_protos.proto b/hadoop-mapreduce-project/hadoop-mapreduce-client/hadoop-mapreduce-client-common/src/main/proto/mr_service_protos.proto index 12c05209f3..ff965f3077 100644 --- a/hadoop-mapreduce-project/hadoop-mapreduce-client/hadoop-mapreduce-client-common/src/main/proto/mr_service_protos.proto +++ b/hadoop-mapreduce-project/hadoop-mapreduce-client/hadoop-mapreduce-client-common/src/main/proto/mr_service_protos.proto @@ -77,14 +77,6 @@ message GetDiagnosticsResponseProto { repeated string diagnostics = 1; } -message GetDelegationTokenRequestProto { - optional string renewer = 1; -} - -message GetDelegationTokenResponseProto { - optional hadoop.common.TokenProto m_r_delegation_token = 1; -} - message KillJobRequestProto { optional JobIdProto job_id = 1; } @@ -109,17 +101,3 @@ message FailTaskAttemptRequestProto { message FailTaskAttemptResponseProto { } -message RenewDelegationTokenRequestProto { - required hadoop.common.TokenProto delegation_token = 1; -} - -message RenewDelegationTokenResponseProto { - required int64 next_expiry_ts = 1; -} - -message CancelDelegationTokenRequestProto { - required hadoop.common.TokenProto delegation_token = 1; -} - -message CancelDelegationTokenResponseProto { -}