protected void setResponseHeaders(final HttpServletResponse response) {
    response.setContentType(HttpConstants.CONTENT_TYPE_JSON);
    response.setHeader(HttpConstants.ACCESS_CONTROL_ALLOW_METHODS,
        HttpConstants.METHOD_GET + "," + HttpConstants.METHOD_DELETE);
    response.setHeader(HttpConstants.ACCESS_CONTROL_ALLOW_ORIGIN, HttpConstants.WILDCARD);
  }
Returns "true" if this HS2 instance is leader else "false".
hadoop.security.instrumentation.requires.admin should be set to true and current user has to be in admin ACLS
for accessing this endpoint.
service/src/java/org/apache/hive/service/servlet/HS2LeadershipStatus.java