private String getHAStateFromRMResponse(String response) {
    JSONObject jsonObject = (JSONObject) JSONValue.parse(response);
    JSONObject clusterInfo = (JSONObject) jsonObject.get("clusterInfo");
    return (String) clusterInfo.get("haState");
  }
Queries RM API to check the haState.
@param url Resource Manager root url
@return true if haState returned is ACTIVE else false
contrib/views/utils/src/main/java/org/apache/ambari/view/utils/ambari/Services.java