private void checkEnableLogPrerequisite(boolean enablelog, String statusdir) throws BadParam {
    if (enablelog && !TempletonUtils.isset(statusdir))
      throw new BadParam("enablelog is only applicable when statusdir is set");
    if(enablelog && "0.23".equalsIgnoreCase(ShimLoader.getMajorVersion())) {
      throw new BadParam("enablelog=true is only supported with Hadoop 1.x");
    }
  }
Returns canonical host name from which the request is made; used for doAs validation
hcatalog/webhcat/svr/src/main/java/org/apache/hive/hcatalog/templeton/Server.java