public static HiveMetaStoreConf loadAndOverrideWithEnvironmentVariables()

in hms-lambda-handler/src/main/java/com/amazonaws/athena/hms/HiveMetaStoreConf.java [221:258]


  public static HiveMetaStoreConf loadAndOverrideWithEnvironmentVariables()
  {
    HiveMetaStoreConf conf = load();
    // Set to empty string for Hive local client
    conf.setMetastoreUri("");

    String spillLocation = decryptKey(ENV_SPILL_LOCATION);
    if (!Strings.isNullOrEmpty(spillLocation)) {
      conf.setResponseSpillLocation(spillLocation);
    }

    String connectionURL = decryptKey(ENV_CONNECTION_URL);
    if (!Strings.isNullOrEmpty(connectionURL)) {
      conf.setConnectionURL(connectionURL);
    }

    String connectionDriverName = decryptKey(ENV_DRIVER_NAME);
    if (!Strings.isNullOrEmpty(connectionDriverName)) {
      conf.setConnectionDriverName(connectionDriverName);
    }

    String connectionUserName = decryptKey(ENV_USER_NAME);
    if (!Strings.isNullOrEmpty(connectionUserName)) {
      conf.setConnectionUserName(connectionUserName);
    }

    String connectionPassword = decryptKey(ENV_PASSWORD);
    if (!Strings.isNullOrEmpty(connectionPassword)) {
      conf.setConnectionPassword(connectionPassword);
    }

    String metaWarehouse = decryptKey(ENV_WAREHOUSE_LOCATION);
    if (!Strings.isNullOrEmpty(metaWarehouse)) {
      conf.setMetastoreWarehouse(metaWarehouse);
    }

    return conf;
  }