Skip to content

Commit

Permalink
Avoid hard-coded hive.metastore in DeltaLakeGlueQueryRunnerMain
Browse files Browse the repository at this point in the history
This allows accessing product test environment with VM options.
Also, rename to DeltaLakeExternalQueryRunnerMain which is similar
to ElasticsearchExternalQueryRunner.
  • Loading branch information
ebyhr committed Apr 27, 2023
1 parent d2b3a93 commit 881d5b8
Showing 1 changed file with 4 additions and 6 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -263,20 +263,18 @@ public static void main(String[] args)
}
}

public static class DeltaLakeGlueQueryRunnerMain
public static class DeltaLakeExternalQueryRunnerMain
{
public static void main(String[] args)
throws Exception
{
// Requires AWS credentials, which can be provided any way supported by the DefaultProviderChain
// See https://docs.aws.amazon.com/sdk-for-java/v1/developer-guide/credentials.html#credentials-default
DistributedQueryRunner queryRunner = builder(createSession())
// Please set Delta Lake connector properties via VM options. e.g. -Dhive.metastore=glue -D..
DistributedQueryRunner queryRunner = builder()
.setCatalogName(DELTA_CATALOG)
.setExtraProperties(ImmutableMap.of("http-server.http.port", "8080"))
.setDeltaProperties(ImmutableMap.of("hive.metastore", "glue"))
.build();

Logger log = Logger.get(DeltaLakeGlueQueryRunnerMain.class);
Logger log = Logger.get(DeltaLakeExternalQueryRunnerMain.class);
log.info("======== SERVER STARTED ========");
log.info("\n====\n%s\n====", queryRunner.getCoordinator().getBaseUrl());
}
Expand Down

0 comments on commit 881d5b8

Please sign in to comment.