public static HCatClient create(Configuration conf) throws HCatException {
    HCatClient client = null;
    String className = conf.get(HCAT_CLIENT_IMPL_CLASS,
      HCatClientHMSImpl.class.getName());
    try {
      Class<? extends HCatClient> clientClass = Class.forName(className,
        true, Utilities.getSessionSpecifiedClassLoader()).asSubclass(
          HCatClient.class);
      client = (HCatClient) clientClass.newInstance();
    } catch (ClassNotFoundException e) {
      throw new HCatException(
        "ClassNotFoundException while creating client class.", e);
    } catch (InstantiationException e) {
      throw new HCatException(
        "InstantiationException while creating client class.", e);
    } catch (IllegalAccessException e) {
      throw new HCatException(
        "IllegalAccessException while creating client class.", e);
    }
    if (client != null) {
      client.initialize(conf);
    }
    return client;
  }
Creates an instance of HCatClient.

@param conf An instance of configuration.
@return An instance of HCatClient.
@throws HCatException
hcatalog/webhcat/java-client/src/main/java/org/apache/hive/hcatalog/api/HCatClient.java