MAPREDUCE-5117. Changed MRClientProtocolPBClientImpl to be closeable and thus fix failures in renewal of HistoryServer's delegations tokens. Contributed by Siddharth Seth.

svn merge --ignore-ancestry -c 1463828 ../../trunk/


git-svn-id: https://svn.apache.org/repos/asf/hadoop/common/branches/branch-2@1463829 13f79535-47bb-0310-9956-ffa450edef68
This commit is contained in:
Vinod Kumar Vavilapalli 2013-04-03 05:40:21 +00:00
parent 8565f5f81d
commit 523e98d914
2 changed files with 14 additions and 1 deletions

View File

@ -125,6 +125,10 @@ Release 2.0.4-alpha - UNRELEASED
BUG FIXES BUG FIXES
MAPREDUCE-5117. Changed MRClientProtocolPBClientImpl to be closeable and thus
fix failures in renewal of HistoryServer's delegations tokens. (Siddharth
Seth via vinodkv)
Release 2.0.3-alpha - 2013-02-06 Release 2.0.3-alpha - 2013-02-06
INCOMPATIBLE CHANGES INCOMPATIBLE CHANGES

View File

@ -18,6 +18,7 @@
package org.apache.hadoop.mapreduce.v2.api.impl.pb.client; package org.apache.hadoop.mapreduce.v2.api.impl.pb.client;
import java.io.Closeable;
import java.io.IOException; import java.io.IOException;
import java.net.InetSocketAddress; import java.net.InetSocketAddress;
@ -101,7 +102,8 @@ import org.apache.hadoop.yarn.exceptions.impl.pb.YarnRemoteExceptionPBImpl;
import com.google.protobuf.ServiceException; import com.google.protobuf.ServiceException;
public class MRClientProtocolPBClientImpl implements MRClientProtocol { public class MRClientProtocolPBClientImpl implements MRClientProtocol,
Closeable {
protected MRClientProtocolPB proxy; protected MRClientProtocolPB proxy;
@ -117,6 +119,13 @@ public class MRClientProtocolPBClientImpl implements MRClientProtocol {
return RPC.getServerAddress(proxy); return RPC.getServerAddress(proxy);
} }
@Override
public void close() {
if (this.proxy != null) {
RPC.stopProxy(this.proxy);
}
}
@Override @Override
public GetJobReportResponse getJobReport(GetJobReportRequest request) public GetJobReportResponse getJobReport(GetJobReportRequest request)
throws YarnRemoteException { throws YarnRemoteException {