class HiveCatalog extends AbstractCatalog {

	private static HiveConf createHiveConf(@Nullable String hiveConfDir, @Nullable String hadoopConfDir) {
		LOG.info("Setting hive conf dir as {}", hiveConfDir);

		try {
			HiveConf.setHiveSiteLocation(
				hiveConfDir == null ?
					null : Paths.get(hiveConfDir, "hive-site.xml").toUri().toURL());
		} catch (MalformedURLException e) {
			throw new CatalogException(
				String.format("Failed to get hive-site.xml from %s", hiveConfDir), e);
		}

		// create HiveConf from hadoop configuration with hadoop conf directory configured.
		Configuration hadoopConf = null;
		if (isNullOrWhitespaceOnly(hadoopConfDir)) {
			for (String possibleHadoopConfPath : HadoopUtils.possibleHadoopConfPaths(new org.apache.flink.configuration.Configuration())) {
				hadoopConf = getHadoopConfiguration(possibleHadoopConfPath);
				if (hadoopConf != null) {
					break;
				}
			}
		} else {
			hadoopConf = getHadoopConfiguration(hadoopConfDir);
		}
		return new HiveConf(hadoopConf == null ? new Configuration() : hadoopConf, HiveConf.class);
	}

	public  HiveCatalog(String catalogName, @Nullable String defaultDatabase, @Nullable String hiveConfDir);
	public  HiveCatalog(String catalogName, @Nullable String defaultDatabase, @Nullable String hiveConfDir, String hiveVersion);
	public  HiveCatalog(String catalogName, @Nullable String defaultDatabase, @Nullable String hiveConfDir, @Nullable String hadoopConfDir, @Nullable String hiveVersion);
	public  HiveCatalog(String catalogName, @Nullable String defaultDatabase, @Nullable HiveConf hiveConf, @Nullable String hiveVersion);
	@VisibleForTesting protected  HiveCatalog(String catalogName, String defaultDatabase, @Nullable HiveConf hiveConf, String hiveVersion,
			boolean allowEmbedded);

}