Comments (4)
I had a few questions:
- How are you running this? Are you using AWS EC2 cluster which uses IAM role?
- if you're using same IAM role for EMR & SQS and want to use credentials from your cluster, you need to add option useInstanceProfileCredentials as true.
The error is getting suppressed here because exception.getMessage returns null for some exceptions. I can fix that code. Meanwhile, let us know if setting useInstanceProfileCredentials to true works for you.
from s3-sqs-connector.
@abhishekd0907
Thanks for helping out. I'm running the spark job in EMR now. After adding useInstanceProfileCredentials to be true, I solve the exception now.
But I got some other errors:
20/06/23 22:27:02 ERROR MicroBatchExecution: Query [id = c78622e1-247d-48f4-9aff-de8da865dbf2, runId = c5bbbc1b-d792-4457-b9ab-7686ecbaf74e] terminated with error
java.lang.NoSuchMethodError: org.apache.spark.sql.Dataset$.ofRows$default$3()Ljava/lang/String;
at org.apache.spark.sql.streaming.sqs.SqsSource.getBatch(SqsSource.scala:80)
at org.apache.spark.sql.execution.streaming.MicroBatchExecution$$anonfun$org$apache$spark$sql$execution$streaming$MicroBatchExecution$$runBatch$3$$anonfun$apply$10.apply(MicroBatchExecution.scala:438)
at org.apache.spark.sql.execution.streaming.MicroBatchExecution$$anonfun$org$apache$spark$sql$execution$streaming$MicroBatchExecution$$runBatch$3$$anonfun$apply$10.apply(MicroBatchExecution.scala:434)
at scala.collection.TraversableLike$$anonfun$flatMap$1.apply(TraversableLike.scala:241)
at scala.collection.TraversableLike$$anonfun$flatMap$1.apply(TraversableLike.scala:241)
at scala.collection.Iterator$class.foreach(Iterator.scala:891)
at scala.collection.AbstractIterator.foreach(Iterator.scala:1334)
at scala.collection.IterableLike$class.foreach(IterableLike.scala:72)
at org.apache.spark.sql.execution.streaming.StreamProgress.foreach(StreamProgress.scala:25)
at scala.collection.TraversableLike$class.flatMap(TraversableLike.scala:241)
at org.apache.spark.sql.execution.streaming.StreamProgress.flatMap(StreamProgress.scala:25)
at org.apache.spark.sql.execution.streaming.MicroBatchExecution$$anonfun$org$apache$spark$sql$execution$streaming$MicroBatchExecution$$runBatch$3.apply(MicroBatchExecution.scala:434)
at org.apache.spark.sql.execution.streaming.MicroBatchExecution$$anonfun$org$apache$spark$sql$execution$streaming$MicroBatchExecution$$runBatch$3.apply(MicroBatchExecution.scala:434)
at org.apache.spark.sql.execution.streaming.ProgressReporter$class.reportTimeTaken(ProgressReporter.scala:351)
at org.apache.spark.sql.execution.streaming.StreamExecution.reportTimeTaken(StreamExecution.scala:58)
at org.apache.spark.sql.execution.streaming.MicroBatchExecution.org$apache$spark$sql$execution$streaming$MicroBatchExecution$$runBatch(MicroBatchExecution.scala:433)
at org.apache.spark.sql.execution.streaming.MicroBatchExecution$$anonfun$runActivatedStream$1$$anonfun$apply$mcZ$sp$1.apply$mcV$sp(MicroBatchExecution.scala:198)
at org.apache.spark.sql.execution.streaming.MicroBatchExecution$$anonfun$runActivatedStream$1$$anonfun$apply$mcZ$sp$1.apply(MicroBatchExecution.scala:166)
at org.apache.spark.sql.execution.streaming.MicroBatchExecution$$anonfun$runActivatedStream$1$$anonfun$apply$mcZ$sp$1.apply(MicroBatchExecution.scala:166)
at org.apache.spark.sql.execution.streaming.ProgressReporter$class.reportTimeTaken(ProgressReporter.scala:351)
at org.apache.spark.sql.execution.streaming.StreamExecution.reportTimeTaken(StreamExecution.scala:58)
at org.apache.spark.sql.execution.streaming.MicroBatchExecution$$anonfun$runActivatedStream$1.apply$mcZ$sp(MicroBatchExecution.scala:166)
at org.apache.spark.sql.execution.streaming.ProcessingTimeExecutor.execute(TriggerExecutor.scala:56)
at org.apache.spark.sql.execution.streaming.MicroBatchExecution.runActivatedStream(MicroBatchExecution.scala:160)
at org.apache.spark.sql.execution.streaming.StreamExecution.org$apache$spark$sql$execution$streaming$StreamExecution$$runStream(StreamExecution.scala:281)
at org.apache.spark.sql.execution.streaming.StreamExecution$$anon$1.run(StreamExecution.scala:193)
Exception in thread "stream execution thread for [id = c78622e1-247d-48f4-9aff-de8da865dbf2, runId = c5bbbc1b-d792-4457-b9ab-7686ecbaf74e]" java.lang.NoSuchMethodError: org.apache.spark.sql.Dataset$.ofRows$default$3()Ljava/lang/String;
I'm running on emr-5.30.0, which use Spark 2.4.5.
from s3-sqs-connector.
@jiweicao-outreach
Can you please take a look at this issue. The same issue was faced by another user while using S3-SQS Connector with Zeppelin on EMR but got resolved when submitting the job via spark-submit.
org.apache.spark.sql.Dataset$.ofRows
is available in open source spark in 2.4.5. Maybe it is not available in the classpath in EMR when job is run via Zeppelin.
from s3-sqs-connector.
I still have the issue using spark-submit. :(
I'm temporarily moving on to use other approaches, but I'll close the issue.
from s3-sqs-connector.
Related Issues (9)
- Not able to access the artifacts HOT 18
- May I know if this repo accepts changes like Spark 3 support and new Trigger functions like Trigger.AvailableNow
- S3-SQS source does not populate partition columns in the dataframne HOT 6
- Error To Read SQS queue HOT 8
- Is it Work with spark 3? HOT 5
- Error running on EMR with Spark version 2.4.0 and Scala version 2.11.12 (OpenJDK 64-Bit Server VM, Java 1.8.0_265) HOT 1
- SqsClient: Unexpected error while parsing SQS message next on empty iterator HOT 1
- Maximum Throughput Limited to 1 Message per Second HOT 1
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from s3-sqs-connector.