You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@bahir.apache.org by lr...@apache.org on 2020/10/19 20:00:51 UTC

[bahir] branch master updated: Properly propagate exceptions in SQSClient (#99)

This is an automated email from the ASF dual-hosted git repository.

lresende pushed a commit to branch master
in repository https://gitbox.apache.org/repos/asf/bahir.git


The following commit(s) were added to refs/heads/master by this push:
     new 56a17f4  Properly propagate exceptions in SQSClient (#99)
56a17f4 is described below

commit 56a17f4b75e881359b848ea28c504fd8b36adfd5
Author: abhishekd0907 <43...@users.noreply.github.com>
AuthorDate: Tue Oct 20 01:28:00 2020 +0530

    Properly propagate exceptions in SQSClient (#99)
---
 .../src/main/scala/org/apache/spark/sql/streaming/sqs/SqsClient.scala  | 3 ++-
 1 file changed, 2 insertions(+), 1 deletion(-)

diff --git a/sql-streaming-sqs/src/main/scala/org/apache/spark/sql/streaming/sqs/SqsClient.scala b/sql-streaming-sqs/src/main/scala/org/apache/spark/sql/streaming/sqs/SqsClient.scala
index 04bfb09..1d9bb97 100644
--- a/sql-streaming-sqs/src/main/scala/org/apache/spark/sql/streaming/sqs/SqsClient.scala
+++ b/sql-streaming-sqs/src/main/scala/org/apache/spark/sql/streaming/sqs/SqsClient.scala
@@ -220,11 +220,12 @@ class SqsClient(sourceOptions: SqsSourceOptions,
           .standard()
           .withClientConfiguration(new ClientConfiguration().withMaxConnections(maxConnections))
           .withCredentials(instanceProfileCredentialsProvider)
+          .withRegion(region)
           .build()
       }
     } catch {
       case e: Exception =>
-        throw new SparkException(s"Error occured while creating Amazon SQS Client ${e.getMessage}")
+        throw new SparkException(s"Error occured while creating Amazon SQS Client", e)
     }
   }