spark-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Marcelo Vanzin <van...@cloudera.com>
Subject Re: Problem with Java and Scala interoperability // streaming
Date Wed, 19 Apr 2017 20:46:06 GMT
Why are you not using JavaStreamingContext if you're writing Java?

On Wed, Apr 19, 2017 at 1:42 PM, kant kodali <kanth909@gmail.com> wrote:
> 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!
>
>



-- 
Marcelo

---------------------------------------------------------------------
To unsubscribe e-mail: user-unsubscribe@spark.apache.org


Mime
View raw message