amazon emr - Spark streaming 1.6.1 is not working with Kinesis asl 1.6.1 and asl 2.0.0-preview -
i trying run spark streaming job on emr kinesis. spark 1.6.1 kinesis asl 1.6.1. writing plain sample wordcount example.
<dependency> <groupid>org.apache.spark</groupid> <artifactid>spark-streaming-kinesis-asl_2.10</artifactid> <version>1.6.1</version> </dependency> <dependency> <groupid>com.amazonaws</groupid> <artifactid>amazon-kinesis-client</artifactid> <version>1.6.3</version> </dependency> <dependency> <groupid>com.amazonaws</groupid> <artifactid>amazon-kinesis-producer</artifactid> <version>0.10.2</version> </dependency>
this throws following exception
java.lang.runtimeexception: java.util.concurrent.executionexception: java.lang.noclassdeffounderror: com/google/protobuf/protocolstringlist @ com.amazonaws.services.kinesis.clientlibrary.lib.worker.shardconsumer.checkandsubmitnexttask(shardconsumer.java:157) @ com.amazonaws.services.kinesis.clientlibrary.lib.worker.shardconsumer.consumeshard(shardconsumer.java:126)
upgrading 2.0.0-preview
<dependency> <groupid>org.apache.spark</groupid> <artifactid>spark-streaming-kinesis-asl_2.10</artifactid> <version>2.0.0-preview</version> </dependency>
gives following exception
java.lang.noclassdeffounderror: org/apache/spark/internal/logging
at org.apache.spark.streaming.kinesis.kinesisutils$$anonfun$createstream$1.apply(kinesisutils.scala:74)
i have similar problem, mentioned in several places like:
- https://github.com/databricks/spark-corenlp/issues/4
- https://issues.apache.org/jira/browse/eagle-321
when try run spark streaming application on aws emr still results in:
java.lang.nosuchmethoderror: com.google.protobuf.lazystringlist.getunmodifiableview()lcom/google/protobuf/lazystringlist;
the getunmodifiableview()
not available in of versions of protobuf guess still loads wrong version of protobuf. tried several combinations of dependencies versions still same. works fine locally on dev machine, once try submit application on master node error. last tried version of pom file is:
<dependencies> <!-- https://mvnrepository.com/artifact/com.google.protobuf/protobuf-java --> <dependency> <groupid>com.google.protobuf</groupid> <artifactid>protobuf-java</artifactid> <version>2.6.1</version> </dependency> <dependency> <groupid>com.amazonaws</groupid> <artifactid>amazon-kinesis-client</artifactid> <version>1.6.1</version> </dependency> <!-- https://mvnrepository.com/artifact/org.apache.spark/spark-core_2.10 --> <dependency> <groupid>org.apache.spark</groupid> <artifactid>spark-core_2.10</artifactid> <version>2.1.0</version> <scope>provided</scope> </dependency> <!-- https://mvnrepository.com/artifact/com.google.protobuf/protobuf-java --> <!-- https://mvnrepository.com/artifact/org.apache.hadoop/hadoop-client --> <dependency> <groupid>org.apache.hadoop</groupid> <artifactid>hadoop-client</artifactid> <version>2.7.3</version> <scope>provided</scope> </dependency> <!-- https://mvnrepository.com/artifact/org.apache.spark/spark-mllib_2.10 --> <!-- https://mvnrepository.com/artifact/org.apache.spark/spark-mllib_2.10 --> <dependency> <groupid>org.apache.spark</groupid> <artifactid>spark-mllib_2.10</artifactid> <version>2.1.0</version> <scope>provided</scope> </dependency> <dependency> <groupid>org.apache.spark</groupid> <artifactid>spark-sql_2.10</artifactid> <version>2.1.0</version> <scope>provided</scope> </dependency> <!-- https://mvnrepository.com/artifact/org.apache.spark/spark-hive_2.10 --> <dependency> <groupid>org.apache.spark</groupid> <artifactid>spark-hive_2.10</artifactid> <version>2.1.0</version> <scope>provided</scope> </dependency> <!-- https://mvnrepository.com/artifact/org.apache.spark/spark-streaming-kinesis-asl_2.11 --> <dependency> <groupid>org.apache.spark</groupid> <artifactid>spark-streaming-kinesis-asl_2.11</artifactid> <version>2.0.0</version> </dependency> <!-- https://mvnrepository.com/artifact/org.apache.hadoop/hadoop-aws --> <dependency> <groupid>org.apache.hadoop</groupid> <artifactid>hadoop-aws</artifactid> <version>2.7.3</version> <scope>provided</scope> </dependency> <!--https://mvnrepository.com/artifact/com.amazonaws/aws-java-sdk--> <dependency> <groupid>com.amazonaws</groupid> <artifactid>aws-java-sdk</artifactid> <version>1.10.77</version> <exclusions> <exclusion> <artifactid>jackson-core</artifactid> <groupid>com.fasterxml.jackson.core</groupid> </exclusion> <exclusion> <artifactid>jackson-databind</artifactid> <groupid>com.fasterxml.jackson.core</groupid> </exclusion> <exclusion> <artifactid>jackson-annotations</artifactid> <groupid>com.fasterxml.jackson.core</groupid> </exclusion> </exclusions> <scope>provided</scope> </dependency> <!-- https://mvnrepository.com/artifact/com.fasterxml.jackson.core/jackson-annotations --> <dependency> <groupid>com.fasterxml.jackson.core</groupid> <artifactid>jackson-annotations</artifactid> <version>2.6.7</version> </dependency> <!-- https://mvnrepository.com/artifact/com.fasterxml.jackson.core/jackson-core --> <dependency> <groupid>com.fasterxml.jackson.core</groupid> <artifactid>jackson-core</artifactid> <version>2.6.7</version> </dependency> <!-- https://mvnrepository.com/artifact/com.fasterxml.jackson.core/jackson-databind --> <dependency> <groupid>com.fasterxml.jackson.core</groupid> <artifactid>jackson-databind</artifactid> <version>2.6.7</version> </dependency> <!-- https://mvnrepository.com/artifact/net.java.dev.jets3t/jets3t --> <dependency> <groupid>net.java.dev.jets3t</groupid> <artifactid>jets3t</artifactid> <version>0.9.4</version> </dependency> </dependencies>
Comments
Post a Comment