[ 
https://issues.apache.org/jira/browse/SPARK-4021?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=14177725#comment-14177725
 ] 

Sean Owen commented on SPARK-4021:
----------------------------------

This code is just fine though. The error is the kind you get from Java 5 when 
you @Override something that is not a superclass method. Here it's an interface 
method, which is perfectly fine in Java 6+. The other new warnings indicate 
that something turn on -Xlint:all but I don't see that in the build.

It seems like a Jenkins config issue and I don't know that it's anything to do 
with Java 7, from this? 7u71 doesn't seem to have any compiler changes, and 
certainly wouldn't have any breaking like this.

Are we sure Jenkins hasn't somehow located a copy of Java 5 installed somewhere?

> Kinesis code can cause compile failures with newer JDK's
> --------------------------------------------------------
>
>                 Key: SPARK-4021
>                 URL: https://issues.apache.org/jira/browse/SPARK-4021
>             Project: Spark
>          Issue Type: Bug
>          Components: Streaming
>         Environment: JDK 7u71
>            Reporter: Patrick Wendell
>
> When compiled with JDK7u71, the Spark build failed due to these issues:
> {code}
> [error] ----------
> [error] 1. WARNING in 
> /home/jenkins/workspace/Spark-Master-SBT/AMPLAB_JENKINS_BUILD_PROFILE/hadoop1.0/label/centos/extras/kinesis-asl/src/main/java/org/apache/spark/examples/streaming/JavaKinesisWordCountASL.java
>  (at line 83)
> [error]       private static final Logger logger = 
> Logger.getLogger(JavaKinesisWordCountASL.class);
> [error]                                   ^^^^^^
> [error] The field JavaKinesisWordCountASL.logger is never read locally
> [error] ----------
> [error] 2. WARNING in 
> /home/jenkins/workspace/Spark-Master-SBT/AMPLAB_JENKINS_BUILD_PROFILE/hadoop1.0/label/centos/extras/kinesis-asl/src/main/java/org/apache/spark/examples/streaming/JavaKinesisWordCountASL.java
>  (at line 151)
> [error]       JavaDStream<String> words = unionStreams.flatMap(new 
> FlatMapFunction<byte[], String>() {
> [error]                                                            
> ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
> [error] The serializable class  does not declare a static final 
> serialVersionUID field of type long
> [error] ----------
> [error] 3. ERROR in 
> /home/jenkins/workspace/Spark-Master-SBT/AMPLAB_JENKINS_BUILD_PROFILE/hadoop1.0/label/centos/extras/kinesis-asl/src/main/java/org/apache/spark/examples/streaming/JavaKinesisWordCountASL.java
>  (at line 153)
> [error]       public Iterable<String> call(byte[] line) {
> [error]                               ^^^^^^^^^^^^^^^^^
> [error] The method call(byte[]) of type new 
> FlatMapFunction<byte[],String>(){} must override a superclass method
> [error] ----------
> [error] 4. WARNING in 
> /home/jenkins/workspace/Spark-Master-SBT/AMPLAB_JENKINS_BUILD_PROFILE/hadoop1.0/label/centos/extras/kinesis-asl/src/main/java/org/apache/spark/examples/streaming/JavaKinesisWordCountASL.java
>  (at line 160)
> [error]       new PairFunction<String, String, Integer>() {
> [error]           ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
> [error] The serializable class  does not declare a static final 
> serialVersionUID field of type long
> [error] ----------
> [error] 5. ERROR in 
> /home/jenkins/workspace/Spark-Master-SBT/AMPLAB_JENKINS_BUILD_PROFILE/hadoop1.0/label/centos/extras/kinesis-asl/src/main/java/org/apache/spark/examples/streaming/JavaKinesisWordCountASL.java
>  (at line 162)
> [error]       public Tuple2<String, Integer> call(String s) {
> [error]                                      ^^^^^^^^^^^^^^
> [error] The method call(String) of type new 
> PairFunction<String,String,Integer>(){} must override a superclass method
> [error] ----------
> [error] 6. WARNING in 
> /home/jenkins/workspace/Spark-Master-SBT/AMPLAB_JENKINS_BUILD_PROFILE/hadoop1.0/label/centos/extras/kinesis-asl/src/main/java/org/apache/spark/examples/streaming/JavaKinesisWordCountASL.java
>  (at line 165)
> [error]       }).reduceByKey(new Function2<Integer, Integer, Integer>() {
> [error]                          ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
> [error] The serializable class  does not declare a static final 
> serialVersionUID field of type long
> [error] ----------
> [error] 7. ERROR in 
> /home/jenkins/workspace/Spark-Master-SBT/AMPLAB_JENKINS_BUILD_PROFILE/hadoop1.0/label/centos/extras/kinesis-asl/src/main/java/org/apache/spark/examples/streaming/JavaKinesisWordCountASL.java
>  (at line 167)
> [error]       public Integer call(Integer i1, Integer i2) {
> [error]                      ^^^^^^^^^^^^^^^^^^^^^^^^^^^^
> [error] The method call(Integer, Integer) of type new 
> Function2<Integer,Integer,Integer>(){} must override a superclass method
> [error] ----------
> [error] 7 problems (3 errors, 4 warnings)
> {code}



--
This message was sent by Atlassian JIRA
(v6.3.4#6332)

---------------------------------------------------------------------
To unsubscribe, e-mail: issues-unsubscr...@spark.apache.org
For additional commands, e-mail: issues-h...@spark.apache.org

Reply via email to