public void preWarm(PreWarmContext context)
throws IOException, TezException, InterruptedException {
verifySessionStateForSubmission();
try {
DAGClientAMProtocolBlockingPB proxy = waitForProxy();
if (proxy == null) {
throw new SessionNotRunning("Could not connect to Session within client"
+ " timeout interval, timeoutSecs=" + clientTimeout);
}
String classpath = TezClientUtils
.getFrameworkClasspath(sessionConfig.getYarnConfiguration());
Map<String, String> contextEnv = context.getEnvironment();
TezYARNUtils.addToEnvironment(contextEnv,
ApplicationConstants.Environment.CLASSPATH.name(),
classpath, File.pathSeparator);
DAGClientAMProtocolRPC.PreWarmRequestProto.Builder
preWarmReqProtoBuilder =
DAGClientAMProtocolRPC.PreWarmRequestProto.newBuilder();
preWarmReqProtoBuilder.setPreWarmContext(
DagTypeConverters.convertPreWarmContextToProto(context));
proxy.preWarm(null, preWarmReqProtoBuilder.build());
while (true) {
try {
Thread.sleep(1000);
TezSessionStatus status = getSessionStatus();
if (status.equals(TezSessionStatus.READY)) {