/** * Creates secure {@link HiveMetadataService}, which delegates to {@link HiveMetaStoreClient} instantiated with * default {@link HiveConf}, and {@code hivemetastore-site.xml} and {@code hive-site.xml} properties overridden * with the config for the cluster imported in the service pool (either manually or using Ambari) */ public static HiveMetadataService newInstance(EnvironmentService environmentService, Long clusterId, SecurityContext securityContext, Subject subject) throws MetaException, IOException, EntityNotFoundException, PrivilegedActionException { return newInstance(overrideConfig(environmentService, clusterId), securityContext, subject, getHiveMetastoreComponent(environmentService, clusterId), getHiveMetastores(environmentService, clusterId)); }