private Configuration buildConfiguration(TableMetaStore metaStore) {
      Configuration configuration = new Configuration();
      if (!ArrayUtils.isEmpty(metaStore.getCoreSite())) {
        configuration.addResource(new ByteArrayInputStream(metaStore.getCoreSite()));
      }
      if (!ArrayUtils.isEmpty(metaStore.getHdfsSite())) {
        configuration.addResource(new ByteArrayInputStream(metaStore.getHdfsSite()));
      }
      if (!ArrayUtils.isEmpty(metaStore.getMetaStoreSite())) {
        configuration.addResource(new ByteArrayInputStream(metaStore.getMetaStoreSite()));
      }
      configuration.set(
          CommonConfigurationKeys.IPC_CLIENT_FALLBACK_TO_SIMPLE_AUTH_ALLOWED_KEY, "true");
      // Enforce configuration resolve resources
      configuration.get(CommonConfigurationKeysPublic.FS_DEFAULT_NAME_KEY);

      // Avoid check hive version
      configuration.set("hive.metastore.schema.verification", "false");

      // It will encounter error(Required table missing : "DBS" in Catalog "" Schema "") when there
      // is not this param
      configuration.set("datanucleus.schema.autoCreateAll", "true");

      return configuration;
    }
Login with configured catalog user and create a proxy user ugi. Then the operations are
performed within the doAs method of this proxy user ugi.
amoro-common/src/main/java/org/apache/amoro/table/TableMetaStore.java