Merge trunk into branch
git-svn-id: https://svn.apache.org/repos/asf/hadoop/common/branches/HDFS-347@1433249 13f79535-47bb-0310-9956-ffa450edef68
This commit is contained in:
commit
2f4e2c607e
|
@ -540,6 +540,9 @@ Release 2.0.3-alpha - Unreleased
|
||||||
|
|
||||||
HADOOP-9183. Potential deadlock in ActiveStandbyElector. (tomwhite)
|
HADOOP-9183. Potential deadlock in ActiveStandbyElector. (tomwhite)
|
||||||
|
|
||||||
|
HADOOP-9203. RPCCallBenchmark should find a random available port.
|
||||||
|
(Andrew Purtell via suresh)
|
||||||
|
|
||||||
Release 2.0.2-alpha - 2012-09-07
|
Release 2.0.2-alpha - 2012-09-07
|
||||||
|
|
||||||
INCOMPATIBLE CHANGES
|
INCOMPATIBLE CHANGES
|
||||||
|
|
|
@ -25,6 +25,7 @@ import java.net.InetAddress;
|
||||||
import java.net.InetSocketAddress;
|
import java.net.InetSocketAddress;
|
||||||
import java.net.NetworkInterface;
|
import java.net.NetworkInterface;
|
||||||
import java.net.NoRouteToHostException;
|
import java.net.NoRouteToHostException;
|
||||||
|
import java.net.ServerSocket;
|
||||||
import java.net.Socket;
|
import java.net.Socket;
|
||||||
import java.net.SocketAddress;
|
import java.net.SocketAddress;
|
||||||
import java.net.SocketException;
|
import java.net.SocketException;
|
||||||
|
@ -865,4 +866,23 @@ public class NetUtils {
|
||||||
}
|
}
|
||||||
return addrs;
|
return addrs;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Return a free port number. There is no guarantee it will remain free, so
|
||||||
|
* it should be used immediately.
|
||||||
|
*
|
||||||
|
* @returns A free port for binding a local socket
|
||||||
|
*/
|
||||||
|
public static int getFreeSocketPort() {
|
||||||
|
int port = 0;
|
||||||
|
try {
|
||||||
|
ServerSocket s = new ServerSocket(0);
|
||||||
|
port = s.getLocalPort();
|
||||||
|
s.close();
|
||||||
|
return port;
|
||||||
|
} catch (IOException e) {
|
||||||
|
// Could not get a free port. Return default port 0.
|
||||||
|
}
|
||||||
|
return port;
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
|
@ -67,7 +67,7 @@ public class RPCCallBenchmark implements Tool, Configurable {
|
||||||
private int serverReaderThreads = 1;
|
private int serverReaderThreads = 1;
|
||||||
private int clientThreads = 0;
|
private int clientThreads = 0;
|
||||||
private String host = "0.0.0.0";
|
private String host = "0.0.0.0";
|
||||||
private int port = 12345;
|
private int port = 0;
|
||||||
public int secondsToRun = 15;
|
public int secondsToRun = 15;
|
||||||
private int msgSize = 1024;
|
private int msgSize = 1024;
|
||||||
public Class<? extends RpcEngine> rpcEngine =
|
public Class<? extends RpcEngine> rpcEngine =
|
||||||
|
@ -201,11 +201,21 @@ public class RPCCallBenchmark implements Tool, Configurable {
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
public int getPort() {
|
||||||
|
if (port == 0) {
|
||||||
|
port = NetUtils.getFreeSocketPort();
|
||||||
|
if (port == 0) {
|
||||||
|
throw new RuntimeException("Could not find a free port");
|
||||||
|
}
|
||||||
|
}
|
||||||
|
return port;
|
||||||
|
}
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
public String toString() {
|
public String toString() {
|
||||||
return "rpcEngine=" + rpcEngine + "\nserverThreads=" + serverThreads
|
return "rpcEngine=" + rpcEngine + "\nserverThreads=" + serverThreads
|
||||||
+ "\nserverReaderThreads=" + serverReaderThreads + "\nclientThreads="
|
+ "\nserverReaderThreads=" + serverReaderThreads + "\nclientThreads="
|
||||||
+ clientThreads + "\nhost=" + host + "\nport=" + port
|
+ clientThreads + "\nhost=" + host + "\nport=" + getPort()
|
||||||
+ "\nsecondsToRun=" + secondsToRun + "\nmsgSize=" + msgSize;
|
+ "\nsecondsToRun=" + secondsToRun + "\nmsgSize=" + msgSize;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
@ -228,12 +238,12 @@ public class RPCCallBenchmark implements Tool, Configurable {
|
||||||
.newReflectiveBlockingService(serverImpl);
|
.newReflectiveBlockingService(serverImpl);
|
||||||
|
|
||||||
server = new RPC.Builder(conf).setProtocol(TestRpcService.class)
|
server = new RPC.Builder(conf).setProtocol(TestRpcService.class)
|
||||||
.setInstance(service).setBindAddress(opts.host).setPort(opts.port)
|
.setInstance(service).setBindAddress(opts.host).setPort(opts.getPort())
|
||||||
.setNumHandlers(opts.serverThreads).setVerbose(false).build();
|
.setNumHandlers(opts.serverThreads).setVerbose(false).build();
|
||||||
} else if (opts.rpcEngine == WritableRpcEngine.class) {
|
} else if (opts.rpcEngine == WritableRpcEngine.class) {
|
||||||
server = new RPC.Builder(conf).setProtocol(TestProtocol.class)
|
server = new RPC.Builder(conf).setProtocol(TestProtocol.class)
|
||||||
.setInstance(new TestRPC.TestImpl()).setBindAddress(opts.host)
|
.setInstance(new TestRPC.TestImpl()).setBindAddress(opts.host)
|
||||||
.setPort(opts.port).setNumHandlers(opts.serverThreads)
|
.setPort(opts.getPort()).setNumHandlers(opts.serverThreads)
|
||||||
.setVerbose(false).build();
|
.setVerbose(false).build();
|
||||||
} else {
|
} else {
|
||||||
throw new RuntimeException("Bad engine: " + opts.rpcEngine);
|
throw new RuntimeException("Bad engine: " + opts.rpcEngine);
|
||||||
|
@ -378,7 +388,7 @@ public class RPCCallBenchmark implements Tool, Configurable {
|
||||||
* Create a client proxy for the specified engine.
|
* Create a client proxy for the specified engine.
|
||||||
*/
|
*/
|
||||||
private RpcServiceWrapper createRpcClient(MyOptions opts) throws IOException {
|
private RpcServiceWrapper createRpcClient(MyOptions opts) throws IOException {
|
||||||
InetSocketAddress addr = NetUtils.createSocketAddr(opts.host, opts.port);
|
InetSocketAddress addr = NetUtils.createSocketAddr(opts.host, opts.getPort());
|
||||||
|
|
||||||
if (opts.rpcEngine == ProtobufRpcEngine.class) {
|
if (opts.rpcEngine == ProtobufRpcEngine.class) {
|
||||||
final TestRpcService proxy = RPC.getProxy(TestRpcService.class, 0, addr, conf);
|
final TestRpcService proxy = RPC.getProxy(TestRpcService.class, 0, addr, conf);
|
||||||
|
|
|
@ -309,6 +309,11 @@ Release 2.0.3-alpha - Unreleased
|
||||||
HDFS-4367. GetDataEncryptionKeyResponseProto does not handle null
|
HDFS-4367. GetDataEncryptionKeyResponseProto does not handle null
|
||||||
response. (suresh)
|
response. (suresh)
|
||||||
|
|
||||||
|
HDFS-4364. GetLinkTargetResponseProto does not handle null path. (suresh)
|
||||||
|
|
||||||
|
HDFS-4369. GetBlockKeysResponseProto does not handle null response.
|
||||||
|
(suresh)
|
||||||
|
|
||||||
NEW FEATURES
|
NEW FEATURES
|
||||||
|
|
||||||
HDFS-2656. Add libwebhdfs, a pure C client based on WebHDFS.
|
HDFS-2656. Add libwebhdfs, a pure C client based on WebHDFS.
|
||||||
|
@ -480,6 +485,9 @@ Release 2.0.3-alpha - Unreleased
|
||||||
HDFS-4381. Document fsimage format details in FSImageFormat class javadoc.
|
HDFS-4381. Document fsimage format details in FSImageFormat class javadoc.
|
||||||
(Jing Zhao via suresh)
|
(Jing Zhao via suresh)
|
||||||
|
|
||||||
|
HDFS-4375. Use token request messages defined in hadoop common.
|
||||||
|
(suresh)
|
||||||
|
|
||||||
OPTIMIZATIONS
|
OPTIMIZATIONS
|
||||||
|
|
||||||
HDFS-3429. DataNode reads checksums even if client does not need them (todd)
|
HDFS-3429. DataNode reads checksums even if client does not need them (todd)
|
||||||
|
|
|
@ -37,8 +37,6 @@ import org.apache.hadoop.hdfs.protocol.proto.ClientNamenodeProtocolProtos.AddBlo
|
||||||
import org.apache.hadoop.hdfs.protocol.proto.ClientNamenodeProtocolProtos.AddBlockResponseProto;
|
import org.apache.hadoop.hdfs.protocol.proto.ClientNamenodeProtocolProtos.AddBlockResponseProto;
|
||||||
import org.apache.hadoop.hdfs.protocol.proto.ClientNamenodeProtocolProtos.AppendRequestProto;
|
import org.apache.hadoop.hdfs.protocol.proto.ClientNamenodeProtocolProtos.AppendRequestProto;
|
||||||
import org.apache.hadoop.hdfs.protocol.proto.ClientNamenodeProtocolProtos.AppendResponseProto;
|
import org.apache.hadoop.hdfs.protocol.proto.ClientNamenodeProtocolProtos.AppendResponseProto;
|
||||||
import org.apache.hadoop.hdfs.protocol.proto.ClientNamenodeProtocolProtos.CancelDelegationTokenRequestProto;
|
|
||||||
import org.apache.hadoop.hdfs.protocol.proto.ClientNamenodeProtocolProtos.CancelDelegationTokenResponseProto;
|
|
||||||
import org.apache.hadoop.hdfs.protocol.proto.ClientNamenodeProtocolProtos.CompleteRequestProto;
|
import org.apache.hadoop.hdfs.protocol.proto.ClientNamenodeProtocolProtos.CompleteRequestProto;
|
||||||
import org.apache.hadoop.hdfs.protocol.proto.ClientNamenodeProtocolProtos.CompleteResponseProto;
|
import org.apache.hadoop.hdfs.protocol.proto.ClientNamenodeProtocolProtos.CompleteResponseProto;
|
||||||
import org.apache.hadoop.hdfs.protocol.proto.ClientNamenodeProtocolProtos.ConcatRequestProto;
|
import org.apache.hadoop.hdfs.protocol.proto.ClientNamenodeProtocolProtos.ConcatRequestProto;
|
||||||
|
@ -64,8 +62,6 @@ import org.apache.hadoop.hdfs.protocol.proto.ClientNamenodeProtocolProtos.GetCon
|
||||||
import org.apache.hadoop.hdfs.protocol.proto.ClientNamenodeProtocolProtos.GetContentSummaryResponseProto;
|
import org.apache.hadoop.hdfs.protocol.proto.ClientNamenodeProtocolProtos.GetContentSummaryResponseProto;
|
||||||
import org.apache.hadoop.hdfs.protocol.proto.ClientNamenodeProtocolProtos.GetDatanodeReportRequestProto;
|
import org.apache.hadoop.hdfs.protocol.proto.ClientNamenodeProtocolProtos.GetDatanodeReportRequestProto;
|
||||||
import org.apache.hadoop.hdfs.protocol.proto.ClientNamenodeProtocolProtos.GetDatanodeReportResponseProto;
|
import org.apache.hadoop.hdfs.protocol.proto.ClientNamenodeProtocolProtos.GetDatanodeReportResponseProto;
|
||||||
import org.apache.hadoop.hdfs.protocol.proto.ClientNamenodeProtocolProtos.GetDelegationTokenRequestProto;
|
|
||||||
import org.apache.hadoop.hdfs.protocol.proto.ClientNamenodeProtocolProtos.GetDelegationTokenResponseProto;
|
|
||||||
import org.apache.hadoop.hdfs.protocol.proto.ClientNamenodeProtocolProtos.GetFileInfoRequestProto;
|
import org.apache.hadoop.hdfs.protocol.proto.ClientNamenodeProtocolProtos.GetFileInfoRequestProto;
|
||||||
import org.apache.hadoop.hdfs.protocol.proto.ClientNamenodeProtocolProtos.GetFileInfoResponseProto;
|
import org.apache.hadoop.hdfs.protocol.proto.ClientNamenodeProtocolProtos.GetFileInfoResponseProto;
|
||||||
import org.apache.hadoop.hdfs.protocol.proto.ClientNamenodeProtocolProtos.GetFileLinkInfoRequestProto;
|
import org.apache.hadoop.hdfs.protocol.proto.ClientNamenodeProtocolProtos.GetFileLinkInfoRequestProto;
|
||||||
|
@ -94,8 +90,6 @@ import org.apache.hadoop.hdfs.protocol.proto.ClientNamenodeProtocolProtos.Rename
|
||||||
import org.apache.hadoop.hdfs.protocol.proto.ClientNamenodeProtocolProtos.Rename2ResponseProto;
|
import org.apache.hadoop.hdfs.protocol.proto.ClientNamenodeProtocolProtos.Rename2ResponseProto;
|
||||||
import org.apache.hadoop.hdfs.protocol.proto.ClientNamenodeProtocolProtos.RenameRequestProto;
|
import org.apache.hadoop.hdfs.protocol.proto.ClientNamenodeProtocolProtos.RenameRequestProto;
|
||||||
import org.apache.hadoop.hdfs.protocol.proto.ClientNamenodeProtocolProtos.RenameResponseProto;
|
import org.apache.hadoop.hdfs.protocol.proto.ClientNamenodeProtocolProtos.RenameResponseProto;
|
||||||
import org.apache.hadoop.hdfs.protocol.proto.ClientNamenodeProtocolProtos.RenewDelegationTokenRequestProto;
|
|
||||||
import org.apache.hadoop.hdfs.protocol.proto.ClientNamenodeProtocolProtos.RenewDelegationTokenResponseProto;
|
|
||||||
import org.apache.hadoop.hdfs.protocol.proto.ClientNamenodeProtocolProtos.RenewLeaseRequestProto;
|
import org.apache.hadoop.hdfs.protocol.proto.ClientNamenodeProtocolProtos.RenewLeaseRequestProto;
|
||||||
import org.apache.hadoop.hdfs.protocol.proto.ClientNamenodeProtocolProtos.RenewLeaseResponseProto;
|
import org.apache.hadoop.hdfs.protocol.proto.ClientNamenodeProtocolProtos.RenewLeaseResponseProto;
|
||||||
import org.apache.hadoop.hdfs.protocol.proto.ClientNamenodeProtocolProtos.ReportBadBlocksRequestProto;
|
import org.apache.hadoop.hdfs.protocol.proto.ClientNamenodeProtocolProtos.ReportBadBlocksRequestProto;
|
||||||
|
@ -130,6 +124,12 @@ import org.apache.hadoop.hdfs.protocol.proto.HdfsProtos.LocatedBlockProto;
|
||||||
import org.apache.hadoop.hdfs.security.token.block.DataEncryptionKey;
|
import org.apache.hadoop.hdfs.security.token.block.DataEncryptionKey;
|
||||||
import org.apache.hadoop.hdfs.security.token.delegation.DelegationTokenIdentifier;
|
import org.apache.hadoop.hdfs.security.token.delegation.DelegationTokenIdentifier;
|
||||||
import org.apache.hadoop.io.Text;
|
import org.apache.hadoop.io.Text;
|
||||||
|
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.security.token.Token;
|
import org.apache.hadoop.security.token.Token;
|
||||||
|
|
||||||
import com.google.protobuf.RpcController;
|
import com.google.protobuf.RpcController;
|
||||||
|
@ -729,8 +729,12 @@ public class ClientNamenodeProtocolServerSideTranslatorPB implements
|
||||||
GetLinkTargetRequestProto req) throws ServiceException {
|
GetLinkTargetRequestProto req) throws ServiceException {
|
||||||
try {
|
try {
|
||||||
String result = server.getLinkTarget(req.getPath());
|
String result = server.getLinkTarget(req.getPath());
|
||||||
return GetLinkTargetResponseProto.newBuilder().setTargetPath(result)
|
GetLinkTargetResponseProto.Builder builder = GetLinkTargetResponseProto
|
||||||
.build();
|
.newBuilder();
|
||||||
|
if (result != null) {
|
||||||
|
builder.setTargetPath(result);
|
||||||
|
}
|
||||||
|
return builder.build();
|
||||||
} catch (IOException e) {
|
} catch (IOException e) {
|
||||||
throw new ServiceException(e);
|
throw new ServiceException(e);
|
||||||
}
|
}
|
||||||
|
@ -795,7 +799,7 @@ public class ClientNamenodeProtocolServerSideTranslatorPB implements
|
||||||
long result = server.renewDelegationToken(PBHelper
|
long result = server.renewDelegationToken(PBHelper
|
||||||
.convertDelegationToken(req.getToken()));
|
.convertDelegationToken(req.getToken()));
|
||||||
return RenewDelegationTokenResponseProto.newBuilder()
|
return RenewDelegationTokenResponseProto.newBuilder()
|
||||||
.setNewExireTime(result).build();
|
.setNewExpiryTime(result).build();
|
||||||
} catch (IOException e) {
|
} catch (IOException e) {
|
||||||
throw new ServiceException(e);
|
throw new ServiceException(e);
|
||||||
}
|
}
|
||||||
|
|
|
@ -51,7 +51,6 @@ import org.apache.hadoop.hdfs.protocol.proto.ClientNamenodeProtocolProtos.Abando
|
||||||
import org.apache.hadoop.hdfs.protocol.proto.ClientNamenodeProtocolProtos.AddBlockRequestProto;
|
import org.apache.hadoop.hdfs.protocol.proto.ClientNamenodeProtocolProtos.AddBlockRequestProto;
|
||||||
import org.apache.hadoop.hdfs.protocol.proto.ClientNamenodeProtocolProtos.AppendRequestProto;
|
import org.apache.hadoop.hdfs.protocol.proto.ClientNamenodeProtocolProtos.AppendRequestProto;
|
||||||
import org.apache.hadoop.hdfs.protocol.proto.ClientNamenodeProtocolProtos.AppendResponseProto;
|
import org.apache.hadoop.hdfs.protocol.proto.ClientNamenodeProtocolProtos.AppendResponseProto;
|
||||||
import org.apache.hadoop.hdfs.protocol.proto.ClientNamenodeProtocolProtos.CancelDelegationTokenRequestProto;
|
|
||||||
import org.apache.hadoop.hdfs.protocol.proto.ClientNamenodeProtocolProtos.CompleteRequestProto;
|
import org.apache.hadoop.hdfs.protocol.proto.ClientNamenodeProtocolProtos.CompleteRequestProto;
|
||||||
import org.apache.hadoop.hdfs.protocol.proto.ClientNamenodeProtocolProtos.ConcatRequestProto;
|
import org.apache.hadoop.hdfs.protocol.proto.ClientNamenodeProtocolProtos.ConcatRequestProto;
|
||||||
import org.apache.hadoop.hdfs.protocol.proto.ClientNamenodeProtocolProtos.CreateRequestProto;
|
import org.apache.hadoop.hdfs.protocol.proto.ClientNamenodeProtocolProtos.CreateRequestProto;
|
||||||
|
@ -66,14 +65,13 @@ import org.apache.hadoop.hdfs.protocol.proto.ClientNamenodeProtocolProtos.GetBlo
|
||||||
import org.apache.hadoop.hdfs.protocol.proto.ClientNamenodeProtocolProtos.GetContentSummaryRequestProto;
|
import org.apache.hadoop.hdfs.protocol.proto.ClientNamenodeProtocolProtos.GetContentSummaryRequestProto;
|
||||||
import org.apache.hadoop.hdfs.protocol.proto.ClientNamenodeProtocolProtos.GetDataEncryptionKeyResponseProto;
|
import org.apache.hadoop.hdfs.protocol.proto.ClientNamenodeProtocolProtos.GetDataEncryptionKeyResponseProto;
|
||||||
import org.apache.hadoop.hdfs.protocol.proto.ClientNamenodeProtocolProtos.GetDatanodeReportRequestProto;
|
import org.apache.hadoop.hdfs.protocol.proto.ClientNamenodeProtocolProtos.GetDatanodeReportRequestProto;
|
||||||
import org.apache.hadoop.hdfs.protocol.proto.ClientNamenodeProtocolProtos.GetDelegationTokenRequestProto;
|
|
||||||
import org.apache.hadoop.hdfs.protocol.proto.ClientNamenodeProtocolProtos.GetDelegationTokenResponseProto;
|
|
||||||
import org.apache.hadoop.hdfs.protocol.proto.ClientNamenodeProtocolProtos.GetFileInfoRequestProto;
|
import org.apache.hadoop.hdfs.protocol.proto.ClientNamenodeProtocolProtos.GetFileInfoRequestProto;
|
||||||
import org.apache.hadoop.hdfs.protocol.proto.ClientNamenodeProtocolProtos.GetFileInfoResponseProto;
|
import org.apache.hadoop.hdfs.protocol.proto.ClientNamenodeProtocolProtos.GetFileInfoResponseProto;
|
||||||
import org.apache.hadoop.hdfs.protocol.proto.ClientNamenodeProtocolProtos.GetFileLinkInfoRequestProto;
|
import org.apache.hadoop.hdfs.protocol.proto.ClientNamenodeProtocolProtos.GetFileLinkInfoRequestProto;
|
||||||
import org.apache.hadoop.hdfs.protocol.proto.ClientNamenodeProtocolProtos.GetFileLinkInfoResponseProto;
|
import org.apache.hadoop.hdfs.protocol.proto.ClientNamenodeProtocolProtos.GetFileLinkInfoResponseProto;
|
||||||
import org.apache.hadoop.hdfs.protocol.proto.ClientNamenodeProtocolProtos.GetFsStatusRequestProto;
|
import org.apache.hadoop.hdfs.protocol.proto.ClientNamenodeProtocolProtos.GetFsStatusRequestProto;
|
||||||
import org.apache.hadoop.hdfs.protocol.proto.ClientNamenodeProtocolProtos.GetLinkTargetRequestProto;
|
import org.apache.hadoop.hdfs.protocol.proto.ClientNamenodeProtocolProtos.GetLinkTargetRequestProto;
|
||||||
|
import org.apache.hadoop.hdfs.protocol.proto.ClientNamenodeProtocolProtos.GetLinkTargetResponseProto;
|
||||||
import org.apache.hadoop.hdfs.protocol.proto.ClientNamenodeProtocolProtos.GetListingRequestProto;
|
import org.apache.hadoop.hdfs.protocol.proto.ClientNamenodeProtocolProtos.GetListingRequestProto;
|
||||||
import org.apache.hadoop.hdfs.protocol.proto.ClientNamenodeProtocolProtos.GetListingResponseProto;
|
import org.apache.hadoop.hdfs.protocol.proto.ClientNamenodeProtocolProtos.GetListingResponseProto;
|
||||||
import org.apache.hadoop.hdfs.protocol.proto.ClientNamenodeProtocolProtos.GetPreferredBlockSizeRequestProto;
|
import org.apache.hadoop.hdfs.protocol.proto.ClientNamenodeProtocolProtos.GetPreferredBlockSizeRequestProto;
|
||||||
|
@ -85,7 +83,6 @@ import org.apache.hadoop.hdfs.protocol.proto.ClientNamenodeProtocolProtos.Recove
|
||||||
import org.apache.hadoop.hdfs.protocol.proto.ClientNamenodeProtocolProtos.RefreshNodesRequestProto;
|
import org.apache.hadoop.hdfs.protocol.proto.ClientNamenodeProtocolProtos.RefreshNodesRequestProto;
|
||||||
import org.apache.hadoop.hdfs.protocol.proto.ClientNamenodeProtocolProtos.Rename2RequestProto;
|
import org.apache.hadoop.hdfs.protocol.proto.ClientNamenodeProtocolProtos.Rename2RequestProto;
|
||||||
import org.apache.hadoop.hdfs.protocol.proto.ClientNamenodeProtocolProtos.RenameRequestProto;
|
import org.apache.hadoop.hdfs.protocol.proto.ClientNamenodeProtocolProtos.RenameRequestProto;
|
||||||
import org.apache.hadoop.hdfs.protocol.proto.ClientNamenodeProtocolProtos.RenewDelegationTokenRequestProto;
|
|
||||||
import org.apache.hadoop.hdfs.protocol.proto.ClientNamenodeProtocolProtos.RenewLeaseRequestProto;
|
import org.apache.hadoop.hdfs.protocol.proto.ClientNamenodeProtocolProtos.RenewLeaseRequestProto;
|
||||||
import org.apache.hadoop.hdfs.protocol.proto.ClientNamenodeProtocolProtos.ReportBadBlocksRequestProto;
|
import org.apache.hadoop.hdfs.protocol.proto.ClientNamenodeProtocolProtos.ReportBadBlocksRequestProto;
|
||||||
import org.apache.hadoop.hdfs.protocol.proto.ClientNamenodeProtocolProtos.RestoreFailedStorageRequestProto;
|
import org.apache.hadoop.hdfs.protocol.proto.ClientNamenodeProtocolProtos.RestoreFailedStorageRequestProto;
|
||||||
|
@ -112,6 +109,10 @@ import org.apache.hadoop.ipc.ProtocolMetaInterface;
|
||||||
import org.apache.hadoop.ipc.RPC;
|
import org.apache.hadoop.ipc.RPC;
|
||||||
import org.apache.hadoop.ipc.RpcClientUtil;
|
import org.apache.hadoop.ipc.RpcClientUtil;
|
||||||
import org.apache.hadoop.security.AccessControlException;
|
import org.apache.hadoop.security.AccessControlException;
|
||||||
|
import org.apache.hadoop.security.proto.SecurityProtos.CancelDelegationTokenRequestProto;
|
||||||
|
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.token.Token;
|
import org.apache.hadoop.security.token.Token;
|
||||||
|
|
||||||
import com.google.protobuf.ByteString;
|
import com.google.protobuf.ByteString;
|
||||||
|
@ -714,7 +715,8 @@ public class ClientNamenodeProtocolTranslatorPB implements
|
||||||
GetLinkTargetRequestProto req = GetLinkTargetRequestProto.newBuilder()
|
GetLinkTargetRequestProto req = GetLinkTargetRequestProto.newBuilder()
|
||||||
.setPath(path).build();
|
.setPath(path).build();
|
||||||
try {
|
try {
|
||||||
return rpcProxy.getLinkTarget(null, req).getTargetPath();
|
GetLinkTargetResponseProto rsp = rpcProxy.getLinkTarget(null, req);
|
||||||
|
return rsp.hasTargetPath() ? rsp.getTargetPath() : null;
|
||||||
} catch (ServiceException e) {
|
} catch (ServiceException e) {
|
||||||
throw ProtobufHelper.getRemoteException(e);
|
throw ProtobufHelper.getRemoteException(e);
|
||||||
}
|
}
|
||||||
|
@ -775,7 +777,7 @@ public class ClientNamenodeProtocolTranslatorPB implements
|
||||||
setToken(PBHelper.convert(token)).
|
setToken(PBHelper.convert(token)).
|
||||||
build();
|
build();
|
||||||
try {
|
try {
|
||||||
return rpcProxy.renewDelegationToken(null, req).getNewExireTime();
|
return rpcProxy.renewDelegationToken(null, req).getNewExpiryTime();
|
||||||
} catch (ServiceException e) {
|
} catch (ServiceException e) {
|
||||||
throw ProtobufHelper.getRemoteException(e);
|
throw ProtobufHelper.getRemoteException(e);
|
||||||
}
|
}
|
||||||
|
|
|
@ -91,8 +91,12 @@ public class NamenodeProtocolServerSideTranslatorPB implements
|
||||||
} catch (IOException e) {
|
} catch (IOException e) {
|
||||||
throw new ServiceException(e);
|
throw new ServiceException(e);
|
||||||
}
|
}
|
||||||
return GetBlockKeysResponseProto.newBuilder()
|
GetBlockKeysResponseProto.Builder builder =
|
||||||
.setKeys(PBHelper.convert(keys)).build();
|
GetBlockKeysResponseProto.newBuilder();
|
||||||
|
if (keys != null) {
|
||||||
|
builder.setKeys(PBHelper.convert(keys));
|
||||||
|
}
|
||||||
|
return builder.build();
|
||||||
}
|
}
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
|
|
|
@ -29,6 +29,7 @@ import org.apache.hadoop.hdfs.protocol.proto.HdfsProtos.VersionRequestProto;
|
||||||
import org.apache.hadoop.hdfs.protocol.proto.NamenodeProtocolProtos.EndCheckpointRequestProto;
|
import org.apache.hadoop.hdfs.protocol.proto.NamenodeProtocolProtos.EndCheckpointRequestProto;
|
||||||
import org.apache.hadoop.hdfs.protocol.proto.NamenodeProtocolProtos.ErrorReportRequestProto;
|
import org.apache.hadoop.hdfs.protocol.proto.NamenodeProtocolProtos.ErrorReportRequestProto;
|
||||||
import org.apache.hadoop.hdfs.protocol.proto.NamenodeProtocolProtos.GetBlockKeysRequestProto;
|
import org.apache.hadoop.hdfs.protocol.proto.NamenodeProtocolProtos.GetBlockKeysRequestProto;
|
||||||
|
import org.apache.hadoop.hdfs.protocol.proto.NamenodeProtocolProtos.GetBlockKeysResponseProto;
|
||||||
import org.apache.hadoop.hdfs.protocol.proto.NamenodeProtocolProtos.GetBlocksRequestProto;
|
import org.apache.hadoop.hdfs.protocol.proto.NamenodeProtocolProtos.GetBlocksRequestProto;
|
||||||
import org.apache.hadoop.hdfs.protocol.proto.NamenodeProtocolProtos.GetEditLogManifestRequestProto;
|
import org.apache.hadoop.hdfs.protocol.proto.NamenodeProtocolProtos.GetEditLogManifestRequestProto;
|
||||||
import org.apache.hadoop.hdfs.protocol.proto.NamenodeProtocolProtos.GetMostRecentCheckpointTxIdRequestProto;
|
import org.apache.hadoop.hdfs.protocol.proto.NamenodeProtocolProtos.GetMostRecentCheckpointTxIdRequestProto;
|
||||||
|
@ -104,8 +105,9 @@ public class NamenodeProtocolTranslatorPB implements NamenodeProtocol,
|
||||||
@Override
|
@Override
|
||||||
public ExportedBlockKeys getBlockKeys() throws IOException {
|
public ExportedBlockKeys getBlockKeys() throws IOException {
|
||||||
try {
|
try {
|
||||||
return PBHelper.convert(rpcProxy.getBlockKeys(NULL_CONTROLLER,
|
GetBlockKeysResponseProto rsp = rpcProxy.getBlockKeys(NULL_CONTROLLER,
|
||||||
GET_BLOCKKEYS).getKeys());
|
GET_BLOCKKEYS);
|
||||||
|
return rsp.hasKeys() ? PBHelper.convert(rsp.getKeys()) : null;
|
||||||
} catch (ServiceException e) {
|
} catch (ServiceException e) {
|
||||||
throw ProtobufHelper.getRemoteException(e);
|
throw ProtobufHelper.getRemoteException(e);
|
||||||
}
|
}
|
||||||
|
|
|
@ -387,7 +387,7 @@ message GetLinkTargetRequestProto {
|
||||||
required string path = 1;
|
required string path = 1;
|
||||||
}
|
}
|
||||||
message GetLinkTargetResponseProto {
|
message GetLinkTargetResponseProto {
|
||||||
required string targetPath = 1;
|
optional string targetPath = 1;
|
||||||
}
|
}
|
||||||
|
|
||||||
message UpdateBlockForPipelineRequestProto {
|
message UpdateBlockForPipelineRequestProto {
|
||||||
|
@ -409,29 +409,6 @@ message UpdatePipelineRequestProto {
|
||||||
message UpdatePipelineResponseProto { // void response
|
message UpdatePipelineResponseProto { // void response
|
||||||
}
|
}
|
||||||
|
|
||||||
message GetDelegationTokenRequestProto {
|
|
||||||
required string renewer = 1;
|
|
||||||
}
|
|
||||||
|
|
||||||
message GetDelegationTokenResponseProto {
|
|
||||||
optional hadoop.common.TokenProto token = 1;
|
|
||||||
}
|
|
||||||
|
|
||||||
message RenewDelegationTokenRequestProto {
|
|
||||||
required hadoop.common.TokenProto token = 1;
|
|
||||||
}
|
|
||||||
|
|
||||||
message RenewDelegationTokenResponseProto {
|
|
||||||
required uint64 newExireTime = 1;
|
|
||||||
}
|
|
||||||
|
|
||||||
message CancelDelegationTokenRequestProto {
|
|
||||||
required hadoop.common.TokenProto token = 1;
|
|
||||||
}
|
|
||||||
|
|
||||||
message CancelDelegationTokenResponseProto { // void response
|
|
||||||
}
|
|
||||||
|
|
||||||
message SetBalancerBandwidthRequestProto {
|
message SetBalancerBandwidthRequestProto {
|
||||||
required int64 bandwidth = 1;
|
required int64 bandwidth = 1;
|
||||||
}
|
}
|
||||||
|
@ -509,12 +486,12 @@ service ClientNamenodeProtocol {
|
||||||
returns(UpdateBlockForPipelineResponseProto);
|
returns(UpdateBlockForPipelineResponseProto);
|
||||||
rpc updatePipeline(UpdatePipelineRequestProto)
|
rpc updatePipeline(UpdatePipelineRequestProto)
|
||||||
returns(UpdatePipelineResponseProto);
|
returns(UpdatePipelineResponseProto);
|
||||||
rpc getDelegationToken(GetDelegationTokenRequestProto)
|
rpc getDelegationToken(hadoop.common.GetDelegationTokenRequestProto)
|
||||||
returns(GetDelegationTokenResponseProto);
|
returns(hadoop.common.GetDelegationTokenResponseProto);
|
||||||
rpc renewDelegationToken(RenewDelegationTokenRequestProto)
|
rpc renewDelegationToken(hadoop.common.RenewDelegationTokenRequestProto)
|
||||||
returns(RenewDelegationTokenResponseProto);
|
returns(hadoop.common.RenewDelegationTokenResponseProto);
|
||||||
rpc cancelDelegationToken(CancelDelegationTokenRequestProto)
|
rpc cancelDelegationToken(hadoop.common.CancelDelegationTokenRequestProto)
|
||||||
returns(CancelDelegationTokenResponseProto);
|
returns(hadoop.common.CancelDelegationTokenResponseProto);
|
||||||
rpc setBalancerBandwidth(SetBalancerBandwidthRequestProto)
|
rpc setBalancerBandwidth(SetBalancerBandwidthRequestProto)
|
||||||
returns(SetBalancerBandwidthResponseProto);
|
returns(SetBalancerBandwidthResponseProto);
|
||||||
rpc getDataEncryptionKey(GetDataEncryptionKeyRequestProto)
|
rpc getDataEncryptionKey(GetDataEncryptionKeyRequestProto)
|
||||||
|
|
|
@ -56,7 +56,7 @@ message GetBlockKeysRequestProto {
|
||||||
* keys - Information about block keys at the active namenode
|
* keys - Information about block keys at the active namenode
|
||||||
*/
|
*/
|
||||||
message GetBlockKeysResponseProto {
|
message GetBlockKeysResponseProto {
|
||||||
required ExportedBlockKeysProto keys = 1;
|
optional ExportedBlockKeysProto keys = 1;
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
|
|
|
@ -170,6 +170,9 @@ Release 2.0.3-alpha - Unreleased
|
||||||
MAPREDUCE-4123. Remove the 'mapred groups' command, which is no longer
|
MAPREDUCE-4123. Remove the 'mapred groups' command, which is no longer
|
||||||
supported. (Devaraj K via sseth)
|
supported. (Devaraj K via sseth)
|
||||||
|
|
||||||
|
MAPREDUCE-4938. Use token request messages defined in hadoop common.
|
||||||
|
(suresh)
|
||||||
|
|
||||||
NEW FEATURES
|
NEW FEATURES
|
||||||
|
|
||||||
MAPREDUCE-4520. Added support for MapReduce applications to request for
|
MAPREDUCE-4520. Added support for MapReduce applications to request for
|
||||||
|
|
|
@ -82,10 +82,8 @@ import org.apache.hadoop.mapreduce.v2.api.protocolrecords.impl.pb.KillTaskReques
|
||||||
import org.apache.hadoop.mapreduce.v2.api.protocolrecords.impl.pb.KillTaskResponsePBImpl;
|
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.RenewDelegationTokenRequestPBImpl;
|
||||||
import org.apache.hadoop.mapreduce.v2.api.protocolrecords.impl.pb.RenewDelegationTokenResponsePBImpl;
|
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.FailTaskAttemptRequestProto;
|
||||||
import org.apache.hadoop.mapreduce.v2.proto.MRServiceProtos.GetCountersRequestProto;
|
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.GetDiagnosticsRequestProto;
|
||||||
import org.apache.hadoop.mapreduce.v2.proto.MRServiceProtos.GetJobReportRequestProto;
|
import org.apache.hadoop.mapreduce.v2.proto.MRServiceProtos.GetJobReportRequestProto;
|
||||||
import org.apache.hadoop.mapreduce.v2.proto.MRServiceProtos.GetTaskAttemptCompletionEventsRequestProto;
|
import org.apache.hadoop.mapreduce.v2.proto.MRServiceProtos.GetTaskAttemptCompletionEventsRequestProto;
|
||||||
|
@ -95,7 +93,9 @@ import org.apache.hadoop.mapreduce.v2.proto.MRServiceProtos.GetTaskReportsReques
|
||||||
import org.apache.hadoop.mapreduce.v2.proto.MRServiceProtos.KillJobRequestProto;
|
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.KillTaskAttemptRequestProto;
|
||||||
import org.apache.hadoop.mapreduce.v2.proto.MRServiceProtos.KillTaskRequestProto;
|
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.YarnRemoteException;
|
||||||
import org.apache.hadoop.yarn.exceptions.impl.pb.YarnRemoteExceptionPBImpl;
|
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 {
|
public MRClientProtocolPBClientImpl(long clientVersion, InetSocketAddress addr, Configuration conf) throws IOException {
|
||||||
RPC.setProtocolEngine(conf, MRClientProtocolPB.class, ProtobufRpcEngine.class);
|
RPC.setProtocolEngine(conf, MRClientProtocolPB.class, ProtobufRpcEngine.class);
|
||||||
proxy = (MRClientProtocolPB)RPC.getProxy(
|
proxy = RPC.getProxy(MRClientProtocolPB.class, clientVersion, addr, conf);
|
||||||
MRClientProtocolPB.class, clientVersion, addr, conf);
|
|
||||||
}
|
}
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
|
|
|
@ -73,14 +73,10 @@ import org.apache.hadoop.mapreduce.v2.api.protocolrecords.impl.pb.KillTaskReques
|
||||||
import org.apache.hadoop.mapreduce.v2.api.protocolrecords.impl.pb.KillTaskResponsePBImpl;
|
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.RenewDelegationTokenRequestPBImpl;
|
||||||
import org.apache.hadoop.mapreduce.v2.api.protocolrecords.impl.pb.RenewDelegationTokenResponsePBImpl;
|
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.FailTaskAttemptRequestProto;
|
||||||
import org.apache.hadoop.mapreduce.v2.proto.MRServiceProtos.FailTaskAttemptResponseProto;
|
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.GetCountersRequestProto;
|
||||||
import org.apache.hadoop.mapreduce.v2.proto.MRServiceProtos.GetCountersResponseProto;
|
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.GetDiagnosticsRequestProto;
|
||||||
import org.apache.hadoop.mapreduce.v2.proto.MRServiceProtos.GetDiagnosticsResponseProto;
|
import org.apache.hadoop.mapreduce.v2.proto.MRServiceProtos.GetDiagnosticsResponseProto;
|
||||||
import org.apache.hadoop.mapreduce.v2.proto.MRServiceProtos.GetJobReportRequestProto;
|
import org.apache.hadoop.mapreduce.v2.proto.MRServiceProtos.GetJobReportRequestProto;
|
||||||
|
@ -99,8 +95,12 @@ import org.apache.hadoop.mapreduce.v2.proto.MRServiceProtos.KillTaskAttemptReque
|
||||||
import org.apache.hadoop.mapreduce.v2.proto.MRServiceProtos.KillTaskAttemptResponseProto;
|
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.KillTaskRequestProto;
|
||||||
import org.apache.hadoop.mapreduce.v2.proto.MRServiceProtos.KillTaskResponseProto;
|
import org.apache.hadoop.mapreduce.v2.proto.MRServiceProtos.KillTaskResponseProto;
|
||||||
import org.apache.hadoop.mapreduce.v2.proto.MRServiceProtos.RenewDelegationTokenRequestProto;
|
import org.apache.hadoop.security.proto.SecurityProtos.CancelDelegationTokenRequestProto;
|
||||||
import org.apache.hadoop.mapreduce.v2.proto.MRServiceProtos.RenewDelegationTokenResponseProto;
|
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 org.apache.hadoop.yarn.exceptions.YarnRemoteException;
|
||||||
|
|
||||||
import com.google.protobuf.RpcController;
|
import com.google.protobuf.RpcController;
|
||||||
|
|
|
@ -18,8 +18,8 @@
|
||||||
package org.apache.hadoop.mapreduce.v2.api.protocolrecords.impl.pb;
|
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.api.protocolrecords.CancelDelegationTokenRequest;
|
||||||
import org.apache.hadoop.mapreduce.v2.proto.MRServiceProtos.CancelDelegationTokenRequestProto;
|
import org.apache.hadoop.security.proto.SecurityProtos.CancelDelegationTokenRequestProto;
|
||||||
import org.apache.hadoop.mapreduce.v2.proto.MRServiceProtos.CancelDelegationTokenRequestProtoOrBuilder;
|
import org.apache.hadoop.security.proto.SecurityProtos.CancelDelegationTokenRequestProtoOrBuilder;
|
||||||
import org.apache.hadoop.security.proto.SecurityProtos.TokenProto;
|
import org.apache.hadoop.security.proto.SecurityProtos.TokenProto;
|
||||||
import org.apache.hadoop.yarn.api.records.DelegationToken;
|
import org.apache.hadoop.yarn.api.records.DelegationToken;
|
||||||
import org.apache.hadoop.yarn.api.records.ProtoBase;
|
import org.apache.hadoop.yarn.api.records.ProtoBase;
|
||||||
|
@ -52,10 +52,7 @@ public class CancelDelegationTokenRequestPBImpl extends
|
||||||
if (this.token != null) {
|
if (this.token != null) {
|
||||||
return this.token;
|
return this.token;
|
||||||
}
|
}
|
||||||
if (!p.hasDelegationToken()) {
|
this.token = convertFromProtoFormat(p.getToken());
|
||||||
return null;
|
|
||||||
}
|
|
||||||
this.token = convertFromProtoFormat(p.getDelegationToken());
|
|
||||||
return this.token;
|
return this.token;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -63,7 +60,7 @@ public class CancelDelegationTokenRequestPBImpl extends
|
||||||
public void setDelegationToken(DelegationToken token) {
|
public void setDelegationToken(DelegationToken token) {
|
||||||
maybeInitBuilder();
|
maybeInitBuilder();
|
||||||
if (token == null)
|
if (token == null)
|
||||||
builder.clearDelegationToken();
|
builder.clearToken();
|
||||||
this.token = token;
|
this.token = token;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -78,7 +75,7 @@ public class CancelDelegationTokenRequestPBImpl extends
|
||||||
|
|
||||||
private void mergeLocalToBuilder() {
|
private void mergeLocalToBuilder() {
|
||||||
if (token != null) {
|
if (token != null) {
|
||||||
builder.setDelegationToken(convertToProtoFormat(this.token));
|
builder.setToken(convertToProtoFormat(this.token));
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
@ -18,7 +18,7 @@
|
||||||
package org.apache.hadoop.mapreduce.v2.api.protocolrecords.impl.pb;
|
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.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;
|
import org.apache.hadoop.yarn.api.records.ProtoBase;
|
||||||
|
|
||||||
public class CancelDelegationTokenResponsePBImpl extends
|
public class CancelDelegationTokenResponsePBImpl extends
|
||||||
|
|
|
@ -18,8 +18,8 @@
|
||||||
package org.apache.hadoop.mapreduce.v2.api.protocolrecords.impl.pb;
|
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.api.protocolrecords.GetDelegationTokenRequest;
|
||||||
import org.apache.hadoop.mapreduce.v2.proto.MRServiceProtos.GetDelegationTokenRequestProto;
|
import org.apache.hadoop.security.proto.SecurityProtos.GetDelegationTokenRequestProto;
|
||||||
import org.apache.hadoop.mapreduce.v2.proto.MRServiceProtos.GetDelegationTokenRequestProtoOrBuilder;
|
import org.apache.hadoop.security.proto.SecurityProtos.GetDelegationTokenRequestProtoOrBuilder;
|
||||||
import org.apache.hadoop.yarn.api.records.ProtoBase;
|
import org.apache.hadoop.yarn.api.records.ProtoBase;
|
||||||
|
|
||||||
|
|
||||||
|
@ -50,9 +50,6 @@ public class GetDelegationTokenRequestPBImpl extends
|
||||||
if (this.renewer != null) {
|
if (this.renewer != null) {
|
||||||
return this.renewer;
|
return this.renewer;
|
||||||
}
|
}
|
||||||
if (!p.hasRenewer()) {
|
|
||||||
return null;
|
|
||||||
}
|
|
||||||
this.renewer = p.getRenewer();
|
this.renewer = p.getRenewer();
|
||||||
return this.renewer;
|
return this.renewer;
|
||||||
}
|
}
|
||||||
|
|
|
@ -18,8 +18,8 @@
|
||||||
package org.apache.hadoop.mapreduce.v2.api.protocolrecords.impl.pb;
|
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.api.protocolrecords.GetDelegationTokenResponse;
|
||||||
import org.apache.hadoop.mapreduce.v2.proto.MRServiceProtos.GetDelegationTokenResponseProto;
|
import org.apache.hadoop.security.proto.SecurityProtos.GetDelegationTokenResponseProto;
|
||||||
import org.apache.hadoop.mapreduce.v2.proto.MRServiceProtos.GetDelegationTokenResponseProtoOrBuilder;
|
import org.apache.hadoop.security.proto.SecurityProtos.GetDelegationTokenResponseProtoOrBuilder;
|
||||||
import org.apache.hadoop.security.proto.SecurityProtos.TokenProto;
|
import org.apache.hadoop.security.proto.SecurityProtos.TokenProto;
|
||||||
import org.apache.hadoop.yarn.api.records.DelegationToken;
|
import org.apache.hadoop.yarn.api.records.DelegationToken;
|
||||||
import org.apache.hadoop.yarn.api.records.ProtoBase;
|
import org.apache.hadoop.yarn.api.records.ProtoBase;
|
||||||
|
@ -53,10 +53,10 @@ public class GetDelegationTokenResponsePBImpl extends
|
||||||
if (this.mrToken != null) {
|
if (this.mrToken != null) {
|
||||||
return this.mrToken;
|
return this.mrToken;
|
||||||
}
|
}
|
||||||
if (!p.hasMRDelegationToken()) {
|
if (!p.hasToken()) {
|
||||||
return null;
|
return null;
|
||||||
}
|
}
|
||||||
this.mrToken = convertFromProtoFormat(p.getMRDelegationToken());
|
this.mrToken = convertFromProtoFormat(p.getToken());
|
||||||
return this.mrToken;
|
return this.mrToken;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -64,7 +64,7 @@ public class GetDelegationTokenResponsePBImpl extends
|
||||||
public void setDelegationToken(DelegationToken mrToken) {
|
public void setDelegationToken(DelegationToken mrToken) {
|
||||||
maybeInitBuilder();
|
maybeInitBuilder();
|
||||||
if (mrToken == null)
|
if (mrToken == null)
|
||||||
builder.clearMRDelegationToken();
|
builder.getToken();
|
||||||
this.mrToken = mrToken;
|
this.mrToken = mrToken;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -79,7 +79,7 @@ public class GetDelegationTokenResponsePBImpl extends
|
||||||
|
|
||||||
private void mergeLocalToBuilder() {
|
private void mergeLocalToBuilder() {
|
||||||
if (mrToken != null) {
|
if (mrToken != null) {
|
||||||
builder.setMRDelegationToken(convertToProtoFormat(this.mrToken));
|
builder.setToken(convertToProtoFormat(this.mrToken));
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
@ -18,8 +18,8 @@
|
||||||
package org.apache.hadoop.mapreduce.v2.api.protocolrecords.impl.pb;
|
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.api.protocolrecords.RenewDelegationTokenRequest;
|
||||||
import org.apache.hadoop.mapreduce.v2.proto.MRServiceProtos.RenewDelegationTokenRequestProto;
|
import org.apache.hadoop.security.proto.SecurityProtos.RenewDelegationTokenRequestProto;
|
||||||
import org.apache.hadoop.mapreduce.v2.proto.MRServiceProtos.RenewDelegationTokenRequestProtoOrBuilder;
|
import org.apache.hadoop.security.proto.SecurityProtos.RenewDelegationTokenRequestProtoOrBuilder;
|
||||||
import org.apache.hadoop.security.proto.SecurityProtos.TokenProto;
|
import org.apache.hadoop.security.proto.SecurityProtos.TokenProto;
|
||||||
import org.apache.hadoop.yarn.api.records.DelegationToken;
|
import org.apache.hadoop.yarn.api.records.DelegationToken;
|
||||||
import org.apache.hadoop.yarn.api.records.ProtoBase;
|
import org.apache.hadoop.yarn.api.records.ProtoBase;
|
||||||
|
@ -52,10 +52,7 @@ public class RenewDelegationTokenRequestPBImpl extends
|
||||||
if (this.token != null) {
|
if (this.token != null) {
|
||||||
return this.token;
|
return this.token;
|
||||||
}
|
}
|
||||||
if (!p.hasDelegationToken()) {
|
this.token = convertFromProtoFormat(p.getToken());
|
||||||
return null;
|
|
||||||
}
|
|
||||||
this.token = convertFromProtoFormat(p.getDelegationToken());
|
|
||||||
return this.token;
|
return this.token;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -63,7 +60,7 @@ public class RenewDelegationTokenRequestPBImpl extends
|
||||||
public void setDelegationToken(DelegationToken token) {
|
public void setDelegationToken(DelegationToken token) {
|
||||||
maybeInitBuilder();
|
maybeInitBuilder();
|
||||||
if (token == null)
|
if (token == null)
|
||||||
builder.clearDelegationToken();
|
builder.clearToken();
|
||||||
this.token = token;
|
this.token = token;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -77,7 +74,7 @@ public class RenewDelegationTokenRequestPBImpl extends
|
||||||
|
|
||||||
private void mergeLocalToBuilder() {
|
private void mergeLocalToBuilder() {
|
||||||
if (token != null) {
|
if (token != null) {
|
||||||
builder.setDelegationToken(convertToProtoFormat(this.token));
|
builder.setToken(convertToProtoFormat(this.token));
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
@ -19,8 +19,8 @@ package org.apache.hadoop.mapreduce.v2.api.protocolrecords.impl.pb;
|
||||||
|
|
||||||
|
|
||||||
import org.apache.hadoop.mapreduce.v2.api.protocolrecords.RenewDelegationTokenResponse;
|
import org.apache.hadoop.mapreduce.v2.api.protocolrecords.RenewDelegationTokenResponse;
|
||||||
import org.apache.hadoop.mapreduce.v2.proto.MRServiceProtos.RenewDelegationTokenResponseProto;
|
import org.apache.hadoop.security.proto.SecurityProtos.RenewDelegationTokenResponseProto;
|
||||||
import org.apache.hadoop.mapreduce.v2.proto.MRServiceProtos.RenewDelegationTokenResponseProtoOrBuilder;
|
import org.apache.hadoop.security.proto.SecurityProtos.RenewDelegationTokenResponseProtoOrBuilder;
|
||||||
import org.apache.hadoop.yarn.api.records.ProtoBase;
|
import org.apache.hadoop.yarn.api.records.ProtoBase;
|
||||||
|
|
||||||
public class RenewDelegationTokenResponsePBImpl extends
|
public class RenewDelegationTokenResponsePBImpl extends
|
||||||
|
@ -59,12 +59,12 @@ public class RenewDelegationTokenResponsePBImpl extends
|
||||||
@Override
|
@Override
|
||||||
public long getNextExpirationTime() {
|
public long getNextExpirationTime() {
|
||||||
RenewDelegationTokenResponseProtoOrBuilder p = viaProto ? proto : builder;
|
RenewDelegationTokenResponseProtoOrBuilder p = viaProto ? proto : builder;
|
||||||
return p.getNextExpiryTs();
|
return p.getNewExpiryTime();
|
||||||
}
|
}
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
public void setNextExpirationTime(long expTime) {
|
public void setNextExpirationTime(long expTime) {
|
||||||
maybeInitBuilder();
|
maybeInitBuilder();
|
||||||
builder.setNextExpiryTs(expTime);
|
builder.setNewExpiryTime(expTime);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
|
@ -20,6 +20,7 @@ option java_package = "org.apache.hadoop.yarn.proto";
|
||||||
option java_outer_classname = "MRClientProtocol";
|
option java_outer_classname = "MRClientProtocol";
|
||||||
option java_generic_services = true;
|
option java_generic_services = true;
|
||||||
|
|
||||||
|
import "Security.proto";
|
||||||
import "mr_service_protos.proto";
|
import "mr_service_protos.proto";
|
||||||
|
|
||||||
/* If making changes to this, please edit HSClientProtocolService */
|
/* If making changes to this, please edit HSClientProtocolService */
|
||||||
|
@ -31,11 +32,11 @@ service MRClientProtocolService {
|
||||||
rpc getTaskAttemptCompletionEvents (GetTaskAttemptCompletionEventsRequestProto) returns (GetTaskAttemptCompletionEventsResponseProto);
|
rpc getTaskAttemptCompletionEvents (GetTaskAttemptCompletionEventsRequestProto) returns (GetTaskAttemptCompletionEventsResponseProto);
|
||||||
rpc getTaskReports (GetTaskReportsRequestProto) returns (GetTaskReportsResponseProto);
|
rpc getTaskReports (GetTaskReportsRequestProto) returns (GetTaskReportsResponseProto);
|
||||||
rpc getDiagnostics (GetDiagnosticsRequestProto) returns (GetDiagnosticsResponseProto);
|
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 killJob (KillJobRequestProto) returns (KillJobResponseProto);
|
||||||
rpc killTask (KillTaskRequestProto) returns (KillTaskResponseProto);
|
rpc killTask (KillTaskRequestProto) returns (KillTaskResponseProto);
|
||||||
rpc killTaskAttempt (KillTaskAttemptRequestProto) returns (KillTaskAttemptResponseProto);
|
rpc killTaskAttempt (KillTaskAttemptRequestProto) returns (KillTaskAttemptResponseProto);
|
||||||
rpc failTaskAttempt (FailTaskAttemptRequestProto) returns (FailTaskAttemptResponseProto);
|
rpc failTaskAttempt (FailTaskAttemptRequestProto) returns (FailTaskAttemptResponseProto);
|
||||||
rpc renewDelegationToken(RenewDelegationTokenRequestProto) returns (RenewDelegationTokenResponseProto);
|
rpc renewDelegationToken(hadoop.common.RenewDelegationTokenRequestProto) returns (hadoop.common.RenewDelegationTokenResponseProto);
|
||||||
rpc cancelDelegationToken(CancelDelegationTokenRequestProto) returns (CancelDelegationTokenResponseProto);
|
rpc cancelDelegationToken(hadoop.common.CancelDelegationTokenRequestProto) returns (hadoop.common.CancelDelegationTokenResponseProto);
|
||||||
}
|
}
|
||||||
|
|
|
@ -77,14 +77,6 @@ message GetDiagnosticsResponseProto {
|
||||||
repeated string diagnostics = 1;
|
repeated string diagnostics = 1;
|
||||||
}
|
}
|
||||||
|
|
||||||
message GetDelegationTokenRequestProto {
|
|
||||||
optional string renewer = 1;
|
|
||||||
}
|
|
||||||
|
|
||||||
message GetDelegationTokenResponseProto {
|
|
||||||
optional hadoop.common.TokenProto m_r_delegation_token = 1;
|
|
||||||
}
|
|
||||||
|
|
||||||
message KillJobRequestProto {
|
message KillJobRequestProto {
|
||||||
optional JobIdProto job_id = 1;
|
optional JobIdProto job_id = 1;
|
||||||
}
|
}
|
||||||
|
@ -109,17 +101,3 @@ message FailTaskAttemptRequestProto {
|
||||||
message FailTaskAttemptResponseProto {
|
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 {
|
|
||||||
}
|
|
||||||
|
|
|
@ -35,6 +35,8 @@ Release 2.0.3-alpha - Unreleased
|
||||||
YARN-2. Enhanced CapacityScheduler to account for CPU alongwith memory for
|
YARN-2. Enhanced CapacityScheduler to account for CPU alongwith memory for
|
||||||
multi-dimensional resource scheduling. (acmurthy)
|
multi-dimensional resource scheduling. (acmurthy)
|
||||||
|
|
||||||
|
YARN-328. Use token request messages defined in hadoop common. (suresh)
|
||||||
|
|
||||||
IMPROVEMENTS
|
IMPROVEMENTS
|
||||||
|
|
||||||
YARN-223. Update process tree instead of getting new process trees.
|
YARN-223. Update process tree instead of getting new process trees.
|
||||||
|
@ -185,6 +187,9 @@ Release 2.0.3-alpha - Unreleased
|
||||||
YARN-253. Fixed container-launch to not fail when there are no local
|
YARN-253. Fixed container-launch to not fail when there are no local
|
||||||
resources to localize. (Tom White via vinodkv)
|
resources to localize. (Tom White via vinodkv)
|
||||||
|
|
||||||
|
YARN-330. Fix flakey test: TestNodeManagerShutdown#testKillContainersOnShutdown.
|
||||||
|
(Sandy Ryza via hitesh)
|
||||||
|
|
||||||
Release 2.0.2-alpha - 2012-09-07
|
Release 2.0.2-alpha - 2012-09-07
|
||||||
|
|
||||||
INCOMPATIBLE CHANGES
|
INCOMPATIBLE CHANGES
|
||||||
|
|
|
@ -17,13 +17,13 @@
|
||||||
|
|
||||||
package org.apache.hadoop.yarn.api.protocolrecords.impl.pb;
|
package org.apache.hadoop.yarn.api.protocolrecords.impl.pb;
|
||||||
|
|
||||||
|
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.security.proto.SecurityProtos.TokenProto;
|
||||||
import org.apache.hadoop.yarn.api.protocolrecords.CancelDelegationTokenRequest;
|
import org.apache.hadoop.yarn.api.protocolrecords.CancelDelegationTokenRequest;
|
||||||
import org.apache.hadoop.yarn.api.records.DelegationToken;
|
import org.apache.hadoop.yarn.api.records.DelegationToken;
|
||||||
import org.apache.hadoop.yarn.api.records.ProtoBase;
|
import org.apache.hadoop.yarn.api.records.ProtoBase;
|
||||||
import org.apache.hadoop.yarn.api.records.impl.pb.DelegationTokenPBImpl;
|
import org.apache.hadoop.yarn.api.records.impl.pb.DelegationTokenPBImpl;
|
||||||
import org.apache.hadoop.yarn.proto.YarnServiceProtos.CancelDelegationTokenRequestProto;
|
|
||||||
import org.apache.hadoop.yarn.proto.YarnServiceProtos.CancelDelegationTokenRequestProtoOrBuilder;
|
|
||||||
|
|
||||||
public class CancelDelegationTokenRequestPBImpl extends
|
public class CancelDelegationTokenRequestPBImpl extends
|
||||||
ProtoBase<CancelDelegationTokenRequestProto> implements
|
ProtoBase<CancelDelegationTokenRequestProto> implements
|
||||||
|
@ -52,10 +52,7 @@ public class CancelDelegationTokenRequestPBImpl extends
|
||||||
if (this.token != null) {
|
if (this.token != null) {
|
||||||
return this.token;
|
return this.token;
|
||||||
}
|
}
|
||||||
if (!p.hasDelegationToken()) {
|
this.token = convertFromProtoFormat(p.getToken());
|
||||||
return null;
|
|
||||||
}
|
|
||||||
this.token = convertFromProtoFormat(p.getDelegationToken());
|
|
||||||
return this.token;
|
return this.token;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -63,7 +60,7 @@ public class CancelDelegationTokenRequestPBImpl extends
|
||||||
public void setDelegationToken(DelegationToken token) {
|
public void setDelegationToken(DelegationToken token) {
|
||||||
maybeInitBuilder();
|
maybeInitBuilder();
|
||||||
if (token == null)
|
if (token == null)
|
||||||
builder.clearDelegationToken();
|
builder.clearToken();
|
||||||
this.token = token;
|
this.token = token;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -77,7 +74,7 @@ public class CancelDelegationTokenRequestPBImpl extends
|
||||||
|
|
||||||
private void mergeLocalToBuilder() {
|
private void mergeLocalToBuilder() {
|
||||||
if (token != null) {
|
if (token != null) {
|
||||||
builder.setDelegationToken(convertToProtoFormat(this.token));
|
builder.setToken(convertToProtoFormat(this.token));
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
@ -17,9 +17,9 @@
|
||||||
|
|
||||||
package org.apache.hadoop.yarn.api.protocolrecords.impl.pb;
|
package org.apache.hadoop.yarn.api.protocolrecords.impl.pb;
|
||||||
|
|
||||||
|
import org.apache.hadoop.security.proto.SecurityProtos.CancelDelegationTokenResponseProto;
|
||||||
import org.apache.hadoop.yarn.api.protocolrecords.CancelDelegationTokenResponse;
|
import org.apache.hadoop.yarn.api.protocolrecords.CancelDelegationTokenResponse;
|
||||||
import org.apache.hadoop.yarn.api.records.ProtoBase;
|
import org.apache.hadoop.yarn.api.records.ProtoBase;
|
||||||
import org.apache.hadoop.yarn.proto.YarnServiceProtos.CancelDelegationTokenResponseProto;
|
|
||||||
|
|
||||||
public class CancelDelegationTokenResponsePBImpl extends
|
public class CancelDelegationTokenResponsePBImpl extends
|
||||||
ProtoBase<CancelDelegationTokenResponseProto> implements
|
ProtoBase<CancelDelegationTokenResponseProto> implements
|
||||||
|
|
|
@ -17,10 +17,10 @@
|
||||||
*/
|
*/
|
||||||
package org.apache.hadoop.yarn.api.protocolrecords.impl.pb;
|
package org.apache.hadoop.yarn.api.protocolrecords.impl.pb;
|
||||||
|
|
||||||
|
import org.apache.hadoop.security.proto.SecurityProtos.GetDelegationTokenRequestProto;
|
||||||
|
import org.apache.hadoop.security.proto.SecurityProtos.GetDelegationTokenRequestProtoOrBuilder;
|
||||||
import org.apache.hadoop.yarn.api.protocolrecords.GetDelegationTokenRequest;
|
import org.apache.hadoop.yarn.api.protocolrecords.GetDelegationTokenRequest;
|
||||||
import org.apache.hadoop.yarn.api.records.ProtoBase;
|
import org.apache.hadoop.yarn.api.records.ProtoBase;
|
||||||
import org.apache.hadoop.yarn.proto.YarnServiceProtos.GetDelegationTokenRequestProto;
|
|
||||||
import org.apache.hadoop.yarn.proto.YarnServiceProtos.GetDelegationTokenRequestProtoOrBuilder;
|
|
||||||
|
|
||||||
public class GetDelegationTokenRequestPBImpl extends
|
public class GetDelegationTokenRequestPBImpl extends
|
||||||
ProtoBase<GetDelegationTokenRequestProto> implements GetDelegationTokenRequest {
|
ProtoBase<GetDelegationTokenRequestProto> implements GetDelegationTokenRequest {
|
||||||
|
@ -48,9 +48,6 @@ public class GetDelegationTokenRequestPBImpl extends
|
||||||
if (this.renewer != null) {
|
if (this.renewer != null) {
|
||||||
return this.renewer;
|
return this.renewer;
|
||||||
}
|
}
|
||||||
if (!p.hasRenewer()) {
|
|
||||||
return null;
|
|
||||||
}
|
|
||||||
this.renewer = p.getRenewer();
|
this.renewer = p.getRenewer();
|
||||||
return this.renewer;
|
return this.renewer;
|
||||||
}
|
}
|
||||||
|
|
|
@ -18,13 +18,13 @@
|
||||||
|
|
||||||
package org.apache.hadoop.yarn.api.protocolrecords.impl.pb;
|
package org.apache.hadoop.yarn.api.protocolrecords.impl.pb;
|
||||||
|
|
||||||
|
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.security.proto.SecurityProtos.TokenProto;
|
||||||
import org.apache.hadoop.yarn.api.protocolrecords.GetDelegationTokenResponse;
|
import org.apache.hadoop.yarn.api.protocolrecords.GetDelegationTokenResponse;
|
||||||
import org.apache.hadoop.yarn.api.records.DelegationToken;
|
import org.apache.hadoop.yarn.api.records.DelegationToken;
|
||||||
import org.apache.hadoop.yarn.api.records.ProtoBase;
|
import org.apache.hadoop.yarn.api.records.ProtoBase;
|
||||||
import org.apache.hadoop.yarn.api.records.impl.pb.DelegationTokenPBImpl;
|
import org.apache.hadoop.yarn.api.records.impl.pb.DelegationTokenPBImpl;
|
||||||
import org.apache.hadoop.yarn.proto.YarnServiceProtos.GetDelegationTokenResponseProto;
|
|
||||||
import org.apache.hadoop.yarn.proto.YarnServiceProtos.GetDelegationTokenResponseProtoOrBuilder;
|
|
||||||
|
|
||||||
public class GetDelegationTokenResponsePBImpl extends
|
public class GetDelegationTokenResponsePBImpl extends
|
||||||
ProtoBase<GetDelegationTokenResponseProto> implements GetDelegationTokenResponse {
|
ProtoBase<GetDelegationTokenResponseProto> implements GetDelegationTokenResponse {
|
||||||
|
@ -53,10 +53,10 @@ ProtoBase<GetDelegationTokenResponseProto> implements GetDelegationTokenResponse
|
||||||
if (this.appToken != null) {
|
if (this.appToken != null) {
|
||||||
return this.appToken;
|
return this.appToken;
|
||||||
}
|
}
|
||||||
if (!p.hasApplicationToken()) {
|
if (!p.hasToken()) {
|
||||||
return null;
|
return null;
|
||||||
}
|
}
|
||||||
this.appToken = convertFromProtoFormat(p.getApplicationToken());
|
this.appToken = convertFromProtoFormat(p.getToken());
|
||||||
return this.appToken;
|
return this.appToken;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -64,7 +64,7 @@ ProtoBase<GetDelegationTokenResponseProto> implements GetDelegationTokenResponse
|
||||||
public void setRMDelegationToken(DelegationToken appToken) {
|
public void setRMDelegationToken(DelegationToken appToken) {
|
||||||
maybeInitBuilder();
|
maybeInitBuilder();
|
||||||
if (appToken == null)
|
if (appToken == null)
|
||||||
builder.clearApplicationToken();
|
builder.clearToken();
|
||||||
this.appToken = appToken;
|
this.appToken = appToken;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -79,7 +79,7 @@ ProtoBase<GetDelegationTokenResponseProto> implements GetDelegationTokenResponse
|
||||||
|
|
||||||
private void mergeLocalToBuilder() {
|
private void mergeLocalToBuilder() {
|
||||||
if (appToken != null) {
|
if (appToken != null) {
|
||||||
builder.setApplicationToken(convertToProtoFormat(this.appToken));
|
builder.setToken(convertToProtoFormat(this.appToken));
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
@ -17,13 +17,13 @@
|
||||||
|
|
||||||
package org.apache.hadoop.yarn.api.protocolrecords.impl.pb;
|
package org.apache.hadoop.yarn.api.protocolrecords.impl.pb;
|
||||||
|
|
||||||
|
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.security.proto.SecurityProtos.TokenProto;
|
||||||
import org.apache.hadoop.yarn.api.protocolrecords.RenewDelegationTokenRequest;
|
import org.apache.hadoop.yarn.api.protocolrecords.RenewDelegationTokenRequest;
|
||||||
import org.apache.hadoop.yarn.api.records.DelegationToken;
|
import org.apache.hadoop.yarn.api.records.DelegationToken;
|
||||||
import org.apache.hadoop.yarn.api.records.ProtoBase;
|
import org.apache.hadoop.yarn.api.records.ProtoBase;
|
||||||
import org.apache.hadoop.yarn.api.records.impl.pb.DelegationTokenPBImpl;
|
import org.apache.hadoop.yarn.api.records.impl.pb.DelegationTokenPBImpl;
|
||||||
import org.apache.hadoop.yarn.proto.YarnServiceProtos.RenewDelegationTokenRequestProto;
|
|
||||||
import org.apache.hadoop.yarn.proto.YarnServiceProtos.RenewDelegationTokenRequestProtoOrBuilder;
|
|
||||||
|
|
||||||
public class RenewDelegationTokenRequestPBImpl extends
|
public class RenewDelegationTokenRequestPBImpl extends
|
||||||
ProtoBase<RenewDelegationTokenRequestProto> implements
|
ProtoBase<RenewDelegationTokenRequestProto> implements
|
||||||
|
@ -51,10 +51,7 @@ public class RenewDelegationTokenRequestPBImpl extends
|
||||||
if (this.token != null) {
|
if (this.token != null) {
|
||||||
return this.token;
|
return this.token;
|
||||||
}
|
}
|
||||||
if (!p.hasDelegationToken()) {
|
this.token = convertFromProtoFormat(p.getToken());
|
||||||
return null;
|
|
||||||
}
|
|
||||||
this.token = convertFromProtoFormat(p.getDelegationToken());
|
|
||||||
return this.token;
|
return this.token;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -62,7 +59,7 @@ public class RenewDelegationTokenRequestPBImpl extends
|
||||||
public void setDelegationToken(DelegationToken token) {
|
public void setDelegationToken(DelegationToken token) {
|
||||||
maybeInitBuilder();
|
maybeInitBuilder();
|
||||||
if (token == null)
|
if (token == null)
|
||||||
builder.clearDelegationToken();
|
builder.clearToken();
|
||||||
this.token = token;
|
this.token = token;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -77,7 +74,7 @@ public class RenewDelegationTokenRequestPBImpl extends
|
||||||
|
|
||||||
private void mergeLocalToBuilder() {
|
private void mergeLocalToBuilder() {
|
||||||
if (token != null) {
|
if (token != null) {
|
||||||
builder.setDelegationToken(convertToProtoFormat(this.token));
|
builder.setToken(convertToProtoFormat(this.token));
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
@ -17,10 +17,10 @@
|
||||||
|
|
||||||
package org.apache.hadoop.yarn.api.protocolrecords.impl.pb;
|
package org.apache.hadoop.yarn.api.protocolrecords.impl.pb;
|
||||||
|
|
||||||
|
import org.apache.hadoop.security.proto.SecurityProtos.RenewDelegationTokenResponseProto;
|
||||||
|
import org.apache.hadoop.security.proto.SecurityProtos.RenewDelegationTokenResponseProtoOrBuilder;
|
||||||
import org.apache.hadoop.yarn.api.protocolrecords.RenewDelegationTokenResponse;
|
import org.apache.hadoop.yarn.api.protocolrecords.RenewDelegationTokenResponse;
|
||||||
import org.apache.hadoop.yarn.api.records.ProtoBase;
|
import org.apache.hadoop.yarn.api.records.ProtoBase;
|
||||||
import org.apache.hadoop.yarn.proto.YarnServiceProtos.RenewDelegationTokenResponseProto;
|
|
||||||
import org.apache.hadoop.yarn.proto.YarnServiceProtos.RenewDelegationTokenResponseProtoOrBuilder;
|
|
||||||
|
|
||||||
public class RenewDelegationTokenResponsePBImpl extends
|
public class RenewDelegationTokenResponsePBImpl extends
|
||||||
ProtoBase<RenewDelegationTokenResponseProto> implements
|
ProtoBase<RenewDelegationTokenResponseProto> implements
|
||||||
|
@ -58,12 +58,12 @@ public class RenewDelegationTokenResponsePBImpl extends
|
||||||
@Override
|
@Override
|
||||||
public long getNextExpirationTime() {
|
public long getNextExpirationTime() {
|
||||||
RenewDelegationTokenResponseProtoOrBuilder p = viaProto ? proto : builder;
|
RenewDelegationTokenResponseProtoOrBuilder p = viaProto ? proto : builder;
|
||||||
return p.getNextExpiryTs();
|
return p.getNewExpiryTime();
|
||||||
}
|
}
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
public void setNextExpirationTime(long expTime) {
|
public void setNextExpirationTime(long expTime) {
|
||||||
maybeInitBuilder();
|
maybeInitBuilder();
|
||||||
builder.setNextExpiryTs(expTime);
|
builder.setNewExpiryTime(expTime);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
|
@ -21,6 +21,7 @@ option java_outer_classname = "ClientRMProtocol";
|
||||||
option java_generic_services = true;
|
option java_generic_services = true;
|
||||||
option java_generate_equals_and_hash = true;
|
option java_generate_equals_and_hash = true;
|
||||||
|
|
||||||
|
import "Security.proto";
|
||||||
import "yarn_service_protos.proto";
|
import "yarn_service_protos.proto";
|
||||||
|
|
||||||
service ClientRMProtocolService {
|
service ClientRMProtocolService {
|
||||||
|
@ -33,8 +34,8 @@ service ClientRMProtocolService {
|
||||||
rpc getClusterNodes (GetClusterNodesRequestProto) returns (GetClusterNodesResponseProto);
|
rpc getClusterNodes (GetClusterNodesRequestProto) returns (GetClusterNodesResponseProto);
|
||||||
rpc getQueueInfo (GetQueueInfoRequestProto) returns (GetQueueInfoResponseProto);
|
rpc getQueueInfo (GetQueueInfoRequestProto) returns (GetQueueInfoResponseProto);
|
||||||
rpc getQueueUserAcls (GetQueueUserAclsInfoRequestProto) returns (GetQueueUserAclsInfoResponseProto);
|
rpc getQueueUserAcls (GetQueueUserAclsInfoRequestProto) returns (GetQueueUserAclsInfoResponseProto);
|
||||||
rpc getDelegationToken(GetDelegationTokenRequestProto) returns (GetDelegationTokenResponseProto);
|
rpc getDelegationToken(hadoop.common.GetDelegationTokenRequestProto) returns (hadoop.common.GetDelegationTokenResponseProto);
|
||||||
rpc renewDelegationToken(RenewDelegationTokenRequestProto) returns (RenewDelegationTokenResponseProto);
|
rpc renewDelegationToken(hadoop.common.RenewDelegationTokenRequestProto) returns (hadoop.common.RenewDelegationTokenResponseProto);
|
||||||
rpc cancelDelegationToken(CancelDelegationTokenRequestProto) returns (CancelDelegationTokenResponseProto);
|
rpc cancelDelegationToken(hadoop.common.CancelDelegationTokenRequestProto) returns (hadoop.common.CancelDelegationTokenResponseProto);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
@ -140,30 +140,6 @@ message GetQueueUserAclsInfoResponseProto {
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
message GetDelegationTokenRequestProto {
|
|
||||||
optional string renewer = 1;
|
|
||||||
}
|
|
||||||
|
|
||||||
message GetDelegationTokenResponseProto {
|
|
||||||
optional hadoop.common.TokenProto application_token = 1;
|
|
||||||
}
|
|
||||||
|
|
||||||
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 {
|
|
||||||
}
|
|
||||||
|
|
||||||
|
|
||||||
//////////////////////////////////////////////////////
|
//////////////////////////////////////////////////////
|
||||||
/////// client_NM_Protocol ///////////////////////////
|
/////// client_NM_Protocol ///////////////////////////
|
||||||
//////////////////////////////////////////////////////
|
//////////////////////////////////////////////////////
|
||||||
|
|
|
@ -25,6 +25,9 @@ import java.net.InetSocketAddress;
|
||||||
import org.apache.hadoop.conf.Configuration;
|
import org.apache.hadoop.conf.Configuration;
|
||||||
import org.apache.hadoop.ipc.ProtobufRpcEngine;
|
import org.apache.hadoop.ipc.ProtobufRpcEngine;
|
||||||
import org.apache.hadoop.ipc.RPC;
|
import org.apache.hadoop.ipc.RPC;
|
||||||
|
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.api.ClientRMProtocol;
|
import org.apache.hadoop.yarn.api.ClientRMProtocol;
|
||||||
import org.apache.hadoop.yarn.api.ClientRMProtocolPB;
|
import org.apache.hadoop.yarn.api.ClientRMProtocolPB;
|
||||||
import org.apache.hadoop.yarn.api.protocolrecords.CancelDelegationTokenRequest;
|
import org.apache.hadoop.yarn.api.protocolrecords.CancelDelegationTokenRequest;
|
||||||
|
@ -77,17 +80,14 @@ import org.apache.hadoop.yarn.api.protocolrecords.impl.pb.SubmitApplicationReque
|
||||||
import org.apache.hadoop.yarn.api.protocolrecords.impl.pb.SubmitApplicationResponsePBImpl;
|
import org.apache.hadoop.yarn.api.protocolrecords.impl.pb.SubmitApplicationResponsePBImpl;
|
||||||
import org.apache.hadoop.yarn.exceptions.YarnRemoteException;
|
import org.apache.hadoop.yarn.exceptions.YarnRemoteException;
|
||||||
import org.apache.hadoop.yarn.exceptions.impl.pb.YarnRemoteExceptionPBImpl;
|
import org.apache.hadoop.yarn.exceptions.impl.pb.YarnRemoteExceptionPBImpl;
|
||||||
import org.apache.hadoop.yarn.proto.YarnServiceProtos.CancelDelegationTokenRequestProto;
|
|
||||||
import org.apache.hadoop.yarn.proto.YarnServiceProtos.GetAllApplicationsRequestProto;
|
import org.apache.hadoop.yarn.proto.YarnServiceProtos.GetAllApplicationsRequestProto;
|
||||||
import org.apache.hadoop.yarn.proto.YarnServiceProtos.GetApplicationReportRequestProto;
|
import org.apache.hadoop.yarn.proto.YarnServiceProtos.GetApplicationReportRequestProto;
|
||||||
import org.apache.hadoop.yarn.proto.YarnServiceProtos.GetClusterMetricsRequestProto;
|
import org.apache.hadoop.yarn.proto.YarnServiceProtos.GetClusterMetricsRequestProto;
|
||||||
import org.apache.hadoop.yarn.proto.YarnServiceProtos.GetClusterNodesRequestProto;
|
import org.apache.hadoop.yarn.proto.YarnServiceProtos.GetClusterNodesRequestProto;
|
||||||
import org.apache.hadoop.yarn.proto.YarnServiceProtos.GetDelegationTokenRequestProto;
|
|
||||||
import org.apache.hadoop.yarn.proto.YarnServiceProtos.GetNewApplicationRequestProto;
|
import org.apache.hadoop.yarn.proto.YarnServiceProtos.GetNewApplicationRequestProto;
|
||||||
import org.apache.hadoop.yarn.proto.YarnServiceProtos.GetQueueInfoRequestProto;
|
import org.apache.hadoop.yarn.proto.YarnServiceProtos.GetQueueInfoRequestProto;
|
||||||
import org.apache.hadoop.yarn.proto.YarnServiceProtos.GetQueueUserAclsInfoRequestProto;
|
import org.apache.hadoop.yarn.proto.YarnServiceProtos.GetQueueUserAclsInfoRequestProto;
|
||||||
import org.apache.hadoop.yarn.proto.YarnServiceProtos.KillApplicationRequestProto;
|
import org.apache.hadoop.yarn.proto.YarnServiceProtos.KillApplicationRequestProto;
|
||||||
import org.apache.hadoop.yarn.proto.YarnServiceProtos.RenewDelegationTokenRequestProto;
|
|
||||||
import org.apache.hadoop.yarn.proto.YarnServiceProtos.SubmitApplicationRequestProto;
|
import org.apache.hadoop.yarn.proto.YarnServiceProtos.SubmitApplicationRequestProto;
|
||||||
|
|
||||||
import com.google.protobuf.ServiceException;
|
import com.google.protobuf.ServiceException;
|
||||||
|
@ -101,9 +101,7 @@ public class ClientRMProtocolPBClientImpl implements ClientRMProtocol,
|
||||||
InetSocketAddress addr, Configuration conf) throws IOException {
|
InetSocketAddress addr, Configuration conf) throws IOException {
|
||||||
RPC.setProtocolEngine(conf, ClientRMProtocolPB.class,
|
RPC.setProtocolEngine(conf, ClientRMProtocolPB.class,
|
||||||
ProtobufRpcEngine.class);
|
ProtobufRpcEngine.class);
|
||||||
proxy =
|
proxy = RPC.getProxy(ClientRMProtocolPB.class, clientVersion, addr, conf);
|
||||||
(ClientRMProtocolPB) RPC.getProxy(ClientRMProtocolPB.class,
|
|
||||||
clientVersion, addr, conf);
|
|
||||||
}
|
}
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
|
|
|
@ -18,6 +18,12 @@
|
||||||
|
|
||||||
package org.apache.hadoop.yarn.api.impl.pb.service;
|
package org.apache.hadoop.yarn.api.impl.pb.service;
|
||||||
|
|
||||||
|
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.api.ClientRMProtocol;
|
import org.apache.hadoop.yarn.api.ClientRMProtocol;
|
||||||
import org.apache.hadoop.yarn.api.ClientRMProtocolPB;
|
import org.apache.hadoop.yarn.api.ClientRMProtocolPB;
|
||||||
import org.apache.hadoop.yarn.api.protocolrecords.CancelDelegationTokenResponse;
|
import org.apache.hadoop.yarn.api.protocolrecords.CancelDelegationTokenResponse;
|
||||||
|
@ -57,8 +63,6 @@ import org.apache.hadoop.yarn.api.protocolrecords.impl.pb.RenewDelegationTokenRe
|
||||||
import org.apache.hadoop.yarn.api.protocolrecords.impl.pb.SubmitApplicationRequestPBImpl;
|
import org.apache.hadoop.yarn.api.protocolrecords.impl.pb.SubmitApplicationRequestPBImpl;
|
||||||
import org.apache.hadoop.yarn.api.protocolrecords.impl.pb.SubmitApplicationResponsePBImpl;
|
import org.apache.hadoop.yarn.api.protocolrecords.impl.pb.SubmitApplicationResponsePBImpl;
|
||||||
import org.apache.hadoop.yarn.exceptions.YarnRemoteException;
|
import org.apache.hadoop.yarn.exceptions.YarnRemoteException;
|
||||||
import org.apache.hadoop.yarn.proto.YarnServiceProtos.CancelDelegationTokenRequestProto;
|
|
||||||
import org.apache.hadoop.yarn.proto.YarnServiceProtos.CancelDelegationTokenResponseProto;
|
|
||||||
import org.apache.hadoop.yarn.proto.YarnServiceProtos.GetAllApplicationsRequestProto;
|
import org.apache.hadoop.yarn.proto.YarnServiceProtos.GetAllApplicationsRequestProto;
|
||||||
import org.apache.hadoop.yarn.proto.YarnServiceProtos.GetAllApplicationsResponseProto;
|
import org.apache.hadoop.yarn.proto.YarnServiceProtos.GetAllApplicationsResponseProto;
|
||||||
import org.apache.hadoop.yarn.proto.YarnServiceProtos.GetApplicationReportRequestProto;
|
import org.apache.hadoop.yarn.proto.YarnServiceProtos.GetApplicationReportRequestProto;
|
||||||
|
@ -67,8 +71,6 @@ import org.apache.hadoop.yarn.proto.YarnServiceProtos.GetClusterMetricsRequestPr
|
||||||
import org.apache.hadoop.yarn.proto.YarnServiceProtos.GetClusterMetricsResponseProto;
|
import org.apache.hadoop.yarn.proto.YarnServiceProtos.GetClusterMetricsResponseProto;
|
||||||
import org.apache.hadoop.yarn.proto.YarnServiceProtos.GetClusterNodesRequestProto;
|
import org.apache.hadoop.yarn.proto.YarnServiceProtos.GetClusterNodesRequestProto;
|
||||||
import org.apache.hadoop.yarn.proto.YarnServiceProtos.GetClusterNodesResponseProto;
|
import org.apache.hadoop.yarn.proto.YarnServiceProtos.GetClusterNodesResponseProto;
|
||||||
import org.apache.hadoop.yarn.proto.YarnServiceProtos.GetDelegationTokenRequestProto;
|
|
||||||
import org.apache.hadoop.yarn.proto.YarnServiceProtos.GetDelegationTokenResponseProto;
|
|
||||||
import org.apache.hadoop.yarn.proto.YarnServiceProtos.GetNewApplicationRequestProto;
|
import org.apache.hadoop.yarn.proto.YarnServiceProtos.GetNewApplicationRequestProto;
|
||||||
import org.apache.hadoop.yarn.proto.YarnServiceProtos.GetNewApplicationResponseProto;
|
import org.apache.hadoop.yarn.proto.YarnServiceProtos.GetNewApplicationResponseProto;
|
||||||
import org.apache.hadoop.yarn.proto.YarnServiceProtos.GetQueueInfoRequestProto;
|
import org.apache.hadoop.yarn.proto.YarnServiceProtos.GetQueueInfoRequestProto;
|
||||||
|
@ -77,8 +79,6 @@ import org.apache.hadoop.yarn.proto.YarnServiceProtos.GetQueueUserAclsInfoReques
|
||||||
import org.apache.hadoop.yarn.proto.YarnServiceProtos.GetQueueUserAclsInfoResponseProto;
|
import org.apache.hadoop.yarn.proto.YarnServiceProtos.GetQueueUserAclsInfoResponseProto;
|
||||||
import org.apache.hadoop.yarn.proto.YarnServiceProtos.KillApplicationRequestProto;
|
import org.apache.hadoop.yarn.proto.YarnServiceProtos.KillApplicationRequestProto;
|
||||||
import org.apache.hadoop.yarn.proto.YarnServiceProtos.KillApplicationResponseProto;
|
import org.apache.hadoop.yarn.proto.YarnServiceProtos.KillApplicationResponseProto;
|
||||||
import org.apache.hadoop.yarn.proto.YarnServiceProtos.RenewDelegationTokenRequestProto;
|
|
||||||
import org.apache.hadoop.yarn.proto.YarnServiceProtos.RenewDelegationTokenResponseProto;
|
|
||||||
import org.apache.hadoop.yarn.proto.YarnServiceProtos.SubmitApplicationRequestProto;
|
import org.apache.hadoop.yarn.proto.YarnServiceProtos.SubmitApplicationRequestProto;
|
||||||
import org.apache.hadoop.yarn.proto.YarnServiceProtos.SubmitApplicationResponseProto;
|
import org.apache.hadoop.yarn.proto.YarnServiceProtos.SubmitApplicationResponseProto;
|
||||||
|
|
||||||
|
|
|
@ -138,7 +138,14 @@ public class TestNodeManagerShutdown {
|
||||||
containerManager.getContainerStatus(request).getStatus();
|
containerManager.getContainerStatus(request).getStatus();
|
||||||
Assert.assertEquals(ContainerState.RUNNING, containerStatus.getState());
|
Assert.assertEquals(ContainerState.RUNNING, containerStatus.getState());
|
||||||
|
|
||||||
try {Thread.sleep(5000);} catch (InterruptedException ex) {ex.printStackTrace();}
|
final int MAX_TRIES=20;
|
||||||
|
int numTries = 0;
|
||||||
|
while (!processStartFile.exists() && numTries < MAX_TRIES) {
|
||||||
|
try {
|
||||||
|
Thread.sleep(500);
|
||||||
|
} catch (InterruptedException ex) {ex.printStackTrace();}
|
||||||
|
numTries++;
|
||||||
|
}
|
||||||
|
|
||||||
nm.stop();
|
nm.stop();
|
||||||
|
|
||||||
|
@ -202,7 +209,7 @@ public class TestNodeManagerShutdown {
|
||||||
fileWriter.write("trap \"echo $hello >> " + processStartFile + "\" SIGTERM\n");
|
fileWriter.write("trap \"echo $hello >> " + processStartFile + "\" SIGTERM\n");
|
||||||
fileWriter.write("echo \"Writing pid to start file\"\n");
|
fileWriter.write("echo \"Writing pid to start file\"\n");
|
||||||
fileWriter.write("echo $$ >> " + processStartFile + "\n");
|
fileWriter.write("echo $$ >> " + processStartFile + "\n");
|
||||||
fileWriter.write("while true; do\nsleep 1s;\ndone\n");
|
fileWriter.write("while true; do\ndate >> /dev/null;\n done\n");
|
||||||
|
|
||||||
fileWriter.close();
|
fileWriter.close();
|
||||||
return scriptFile;
|
return scriptFile;
|
||||||
|
|
Loading…
Reference in New Issue