From 3ca277a115658481883b24b05026057c49cb9cf1 Mon Sep 17 00:00:00 2001 From: dmccoystephenson Date: Tue, 11 Jun 2024 07:17:00 -0600 Subject: [PATCH 1/2] Generalized some log statements in AwsDepositor --- .../java/us/dot/its/jpo/ode/aws/depositor/AwsDepositor.java | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/src/main/java/us/dot/its/jpo/ode/aws/depositor/AwsDepositor.java b/src/main/java/us/dot/its/jpo/ode/aws/depositor/AwsDepositor.java index 98fe5fc..3a39fff 100644 --- a/src/main/java/us/dot/its/jpo/ode/aws/depositor/AwsDepositor.java +++ b/src/main/java/us/dot/its/jpo/ode/aws/depositor/AwsDepositor.java @@ -213,8 +213,8 @@ public void run(String[] args) throws Exception { } } catch (Exception e) { int retryTimeout = 5000; - logger.error("Error depositing to AWS. Retrying in " + retryTimeout / 1000 + " seconds", - e); + String destinationName = depositToS3 ? "S3" : destination; + logger.error("Error depositing to destination '" + destinationName + "'. Retrying in " + retryTimeout / 1000 + " seconds", e); Thread.sleep(retryTimeout); } } @@ -226,7 +226,7 @@ public void run(String[] args) throws Exception { } } } catch (Exception e) { - logger.error("Server Error. reconnecting to AWS ", e); + logger.error("Server Error. reconnecting to destination ", e); } finally { stringConsumer.close(); } From b2083fbc3d7ee94cc9443fb3d71cab47b701aef3 Mon Sep 17 00:00:00 2001 From: dmccoystephenson Date: Tue, 11 Jun 2024 07:19:06 -0600 Subject: [PATCH 2/2] Added comment regarding GOOGLE_APPLICATION_CREDENTIALS env var --- src/main/java/us/dot/its/jpo/ode/aws/depositor/AwsDepositor.java | 1 + 1 file changed, 1 insertion(+) diff --git a/src/main/java/us/dot/its/jpo/ode/aws/depositor/AwsDepositor.java b/src/main/java/us/dot/its/jpo/ode/aws/depositor/AwsDepositor.java index 3a39fff..d85a2d4 100644 --- a/src/main/java/us/dot/its/jpo/ode/aws/depositor/AwsDepositor.java +++ b/src/main/java/us/dot/its/jpo/ode/aws/depositor/AwsDepositor.java @@ -179,6 +179,7 @@ public void run(String[] args) throws Exception { } else if (destination.equals("firehose")) { firehose = buildFirehoseClient(awsRegion); } else if (destination.equals("gcs")) { + // The file path specified by GOOGLE_APPLICATION_CREDENTIALS will be used here. gcsStorage = StorageOptions.getDefaultInstance().getService(); } else { logger.error("Invalid destination: " + destination);