spark-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From kant kodali <kanth...@gmail.com>
Subject Problem with Java and Scala interoperability // streaming
Date Wed, 19 Apr 2017 20:42:46 GMT
Hi All,

I get the following errors whichever way I try either lambda or generics. I
am using
spark 2.1 and scalla 2.11.8


StreamingContext ssc = StreamingContext.getOrCreate(hdfsCheckpointDir,
() -> {return createStreamingContext();}, null, false);

ERROR

StreamingContext ssc = StreamingContext.getOrCreate(hdfsCheckpointDir,
() -> {return createStreamingContext();}, null, false);

*multiple non-overriding abstract methods found in interface Function0*

Note: Some messages have been simplified; recompile with
-Xdiags:verbose to get full output

1 error

:compileJava FAILED


StreamingContext ssc = StreamingContext.getOrCreate(hdfsCheckpointDir,
new Function0<StreamingContext>() {
    @Override
    public StreamingContext apply() {
        return createStreamingContext();
    }
}, null, false);


ERROR

*is not abstract and does not override abstract method apply$mcV$sp()
in Function0*

StreamingContext ssc = StreamingContext.getOrCreate(hdfsCheckpointDir,
new Function0<StreamingContext>() {

^

1 error

:compileJava FAILED


Thanks!

Mime
View raw message