Skip to content

Commit

Permalink
See #31 and #362. Add the AWS Region argument flag.
Browse files Browse the repository at this point in the history
  • Loading branch information
j3-signalroom committed Oct 17, 2024
1 parent c472992 commit 4bd67d9
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 2 deletions.
3 changes: 2 additions & 1 deletion java/app/src/main/java/kickstarter/Common.java
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,8 @@

public class Common {
public static final String ARG_SERVICE_ACCOUNT_USER = "--service-account-user";

public static final String ARG_AWS_REGION = "--aws-region";


/**
* @return returns a new instance of the Jackson ObjectMapper with the JavaTimeModule
Expand Down
3 changes: 2 additions & 1 deletion java/app/src/main/java/kickstarter/DataGeneratorApp.java
Original file line number Diff line number Diff line change
Expand Up @@ -54,6 +54,7 @@ public static void main(String[] args) throws Exception {
* Retrieve the value(s) from the command line argument(s)
*/
String serviceAccountUser = Common.getAppArgumentValue(args, Common.ARG_SERVICE_ACCOUNT_USER);
String awsRegion = Common.getAppArgumentValue(args, Common.ARG_AWS_REGION);

// --- Create a blank Flink execution environment (a.k.a. the Flink job graph -- the DAG)
StreamExecutionEnvironment env = StreamExecutionEnvironment.getExecutionEnvironment();
Expand Down Expand Up @@ -208,7 +209,7 @@ public static void main(String[] args) throws Exception {
catalogProperties.put("catalog-impl", catalogImpl);
catalogProperties.put("io-impl", ioImpl);
catalogProperties.put("glue.skip-archive", "true");
catalogProperties.put("glue.region", "us-east-1");
catalogProperties.put("glue.region", awsRegion);

// --- Use the CatalogLoader since an external metastore is used (AWS Glue Catalog)
CatalogLoader catalogLoader = CatalogLoader.custom(catalogName, catalogProperties, new Configuration(false), catalogImpl);
Expand Down

0 comments on commit 4bd67d9

Please sign in to comment.