@Consumes({ MediaType.TEXT_PLAIN, MediaType.APPLICATION_JSON })
public Response updateApp(@Context UriInfo uri, String jsonString,
@PathParam("appId") String appId) throws IOException, YarnException,
InterruptedException, URISyntaxException {
if (jsonString != null) {
JsonElement requestContent = new JsonParser().parse(jsonString);
if (requestContent != null && appId != null) {
JsonObject requestJson = requestContent.getAsJsonObject();
if (requestJson.has("state")) {
String newState = requestJson.get("state").getAsString();
if ("FROZEN".equals(newState))