ApplicationId applicationId = UserGroupInformation.getBestUGI(null,
"yarn").doAs(new PrivilegedExceptionAction<ApplicationId>() {
public ApplicationId run() throws IOException, YarnException {
SliderClient sliderClient = getSliderClient();
ActionFreezeArgs freezeArgs = new ActionFreezeArgs();
sliderClient.actionFreeze(sliderApp.getName(), freezeArgs);
return sliderClient.applicationId;
}
});
logger.debug("Slider app has been frozen - " + applicationId.toString());