YARN-532. Change RMAdmin and Localization client protocol PB implementations to implement closeable so that they can be stopped when needed via RPC.stopProxy(). Contributed by Siddharth Seth.
git-svn-id: https://svn.apache.org/repos/asf/hadoop/common/trunk@1464788 13f79535-47bb-0310-9956-ffa450edef68
This commit is contained in:
parent
999ce497f0
commit
0836d68abf
|
@ -191,6 +191,10 @@ Release 2.0.5-beta - UNRELEASED
|
||||||
YARN-538. RM address DNS lookup can cause unnecessary slowness on every JHS
|
YARN-538. RM address DNS lookup can cause unnecessary slowness on every JHS
|
||||||
page load. (sandyr via tucu)
|
page load. (sandyr via tucu)
|
||||||
|
|
||||||
|
YARN-532. Change RMAdmin and Localization client protocol PB implementations
|
||||||
|
to implement closeable so that they can be stopped when needed via
|
||||||
|
RPC.stopProxy(). (Siddharth Seth via vinodkv)
|
||||||
|
|
||||||
Release 2.0.4-alpha - UNRELEASED
|
Release 2.0.4-alpha - UNRELEASED
|
||||||
|
|
||||||
INCOMPATIBLE CHANGES
|
INCOMPATIBLE CHANGES
|
||||||
|
|
|
@ -18,6 +18,7 @@
|
||||||
|
|
||||||
package org.apache.hadoop.yarn.api.impl.pb.client;
|
package org.apache.hadoop.yarn.api.impl.pb.client;
|
||||||
|
|
||||||
|
import java.io.Closeable;
|
||||||
import java.io.IOException;
|
import java.io.IOException;
|
||||||
import java.net.InetSocketAddress;
|
import java.net.InetSocketAddress;
|
||||||
|
|
||||||
|
@ -65,7 +66,7 @@ import org.apache.hadoop.yarn.proto.YarnServerResourceManagerServiceProtos.Refre
|
||||||
import com.google.protobuf.ServiceException;
|
import com.google.protobuf.ServiceException;
|
||||||
|
|
||||||
|
|
||||||
public class RMAdminProtocolPBClientImpl implements RMAdminProtocol {
|
public class RMAdminProtocolPBClientImpl implements RMAdminProtocol, Closeable {
|
||||||
|
|
||||||
private RMAdminProtocolPB proxy;
|
private RMAdminProtocolPB proxy;
|
||||||
|
|
||||||
|
@ -77,6 +78,13 @@ public class RMAdminProtocolPBClientImpl implements RMAdminProtocol {
|
||||||
RMAdminProtocolPB.class, clientVersion, addr, conf);
|
RMAdminProtocolPB.class, clientVersion, addr, conf);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public void close() {
|
||||||
|
if (this.proxy != null) {
|
||||||
|
RPC.stopProxy(this.proxy);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
public RefreshQueuesResponse refreshQueues(RefreshQueuesRequest request)
|
public RefreshQueuesResponse refreshQueues(RefreshQueuesRequest request)
|
||||||
throws YarnRemoteException {
|
throws YarnRemoteException {
|
||||||
|
|
|
@ -17,6 +17,7 @@
|
||||||
*/
|
*/
|
||||||
package org.apache.hadoop.yarn.server.nodemanager.api.impl.pb.client;
|
package org.apache.hadoop.yarn.server.nodemanager.api.impl.pb.client;
|
||||||
|
|
||||||
|
import java.io.Closeable;
|
||||||
import java.io.IOException;
|
import java.io.IOException;
|
||||||
import java.net.InetSocketAddress;
|
import java.net.InetSocketAddress;
|
||||||
|
|
||||||
|
@ -35,7 +36,8 @@ import org.apache.hadoop.yarn.server.nodemanager.api.protocolrecords.impl.pb.Loc
|
||||||
|
|
||||||
import com.google.protobuf.ServiceException;
|
import com.google.protobuf.ServiceException;
|
||||||
|
|
||||||
public class LocalizationProtocolPBClientImpl implements LocalizationProtocol {
|
public class LocalizationProtocolPBClientImpl implements LocalizationProtocol,
|
||||||
|
Closeable {
|
||||||
|
|
||||||
private LocalizationProtocolPB proxy;
|
private LocalizationProtocolPB proxy;
|
||||||
|
|
||||||
|
@ -45,6 +47,13 @@ public class LocalizationProtocolPBClientImpl implements LocalizationProtocol {
|
||||||
LocalizationProtocolPB.class, clientVersion, addr, conf);
|
LocalizationProtocolPB.class, clientVersion, addr, conf);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public void close() {
|
||||||
|
if (this.proxy != null) {
|
||||||
|
RPC.stopProxy(this.proxy);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
public LocalizerHeartbeatResponse heartbeat(LocalizerStatus status)
|
public LocalizerHeartbeatResponse heartbeat(LocalizerStatus status)
|
||||||
throws YarnRemoteException {
|
throws YarnRemoteException {
|
||||||
|
|
Loading…
Reference in New Issue