You are viewing a plain text version of this content. The canonical link for it is here.
Posted to user@spark.apache.org by kant kodali <ka...@gmail.com> on 2017/04/19 20:42:46 UTC
Problem with Java and Scala interoperability // streaming
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!
Re: Problem with Java and Scala interoperability // streaming
Posted by kant kodali <ka...@gmail.com>.
works now! thanks much!
On Wed, Apr 19, 2017 at 2:05 PM, kant kodali <ka...@gmail.com> wrote:
> oops my bad. I see it now! sorry.
>
> On Wed, Apr 19, 2017 at 1:56 PM, Marcelo Vanzin <va...@cloudera.com>
> wrote:
>
>> I see a bunch of getOrCreate methods in that class. They were all
>> added in SPARK-6752, a long time ago.
>>
>> On Wed, Apr 19, 2017 at 1:51 PM, kant kodali <ka...@gmail.com> wrote:
>> > There is no getOrCreate for JavaStreamingContext however I do use
>> > JavaStreamingContext inside createStreamingContext() from my code in the
>> > previous email.
>> >
>> > On Wed, Apr 19, 2017 at 1:46 PM, Marcelo Vanzin <va...@cloudera.com>
>> wrote:
>> >>
>> >> Why are you not using JavaStreamingContext if you're writing Java?
>> >>
>> >> On Wed, Apr 19, 2017 at 1:42 PM, kant kodali <ka...@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(h
>> dfsCheckpointDir,
>> >> > () ->
>> >> > {return createStreamingContext();}, null, false);
>> >> >
>> >> > ERROR
>> >> >
>> >> > StreamingContext ssc = StreamingContext.getOrCreate(h
>> dfsCheckpointDir,
>> >> > () ->
>> >> > {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(h
>> dfsCheckpointDir,
>> >> > 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(h
>> dfsCheckpointDir,
>> >> > new
>> >> > Function0<StreamingContext>() {
>> >> > ^
>> >> >
>> >> > 1 error
>> >> >
>> >> > :compileJava FAILED
>> >> >
>> >> >
>> >> > Thanks!
>> >> >
>> >> >
>> >>
>> >>
>> >>
>> >> --
>> >> Marcelo
>> >
>> >
>>
>>
>>
>> --
>> Marcelo
>>
>
>
Re: Problem with Java and Scala interoperability // streaming
Posted by kant kodali <ka...@gmail.com>.
oops my bad. I see it now! sorry.
On Wed, Apr 19, 2017 at 1:56 PM, Marcelo Vanzin <va...@cloudera.com> wrote:
> I see a bunch of getOrCreate methods in that class. They were all
> added in SPARK-6752, a long time ago.
>
> On Wed, Apr 19, 2017 at 1:51 PM, kant kodali <ka...@gmail.com> wrote:
> > There is no getOrCreate for JavaStreamingContext however I do use
> > JavaStreamingContext inside createStreamingContext() from my code in the
> > previous email.
> >
> > On Wed, Apr 19, 2017 at 1:46 PM, Marcelo Vanzin <va...@cloudera.com>
> wrote:
> >>
> >> Why are you not using JavaStreamingContext if you're writing Java?
> >>
> >> On Wed, Apr 19, 2017 at 1:42 PM, kant kodali <ka...@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
> >
> >
>
>
>
> --
> Marcelo
>
Re: Problem with Java and Scala interoperability // streaming
Posted by Marcelo Vanzin <va...@cloudera.com>.
I see a bunch of getOrCreate methods in that class. They were all
added in SPARK-6752, a long time ago.
On Wed, Apr 19, 2017 at 1:51 PM, kant kodali <ka...@gmail.com> wrote:
> There is no getOrCreate for JavaStreamingContext however I do use
> JavaStreamingContext inside createStreamingContext() from my code in the
> previous email.
>
> On Wed, Apr 19, 2017 at 1:46 PM, Marcelo Vanzin <va...@cloudera.com> wrote:
>>
>> Why are you not using JavaStreamingContext if you're writing Java?
>>
>> On Wed, Apr 19, 2017 at 1:42 PM, kant kodali <ka...@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
>
>
--
Marcelo
---------------------------------------------------------------------
To unsubscribe e-mail: user-unsubscribe@spark.apache.org
Re: Problem with Java and Scala interoperability // streaming
Posted by kant kodali <ka...@gmail.com>.
There is no *getOrCreate *for JavaStreamingContext however I do use
JavaStreamingContext inside createStreamingContext() from my code in the
previous email.
On Wed, Apr 19, 2017 at 1:46 PM, Marcelo Vanzin <va...@cloudera.com> wrote:
> Why are you not using JavaStreamingContext if you're writing Java?
>
> On Wed, Apr 19, 2017 at 1:42 PM, kant kodali <ka...@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
>
Re: Problem with Java and Scala interoperability // streaming
Posted by Marcelo Vanzin <va...@cloudera.com>.
Why are you not using JavaStreamingContext if you're writing Java?
On Wed, Apr 19, 2017 at 1:42 PM, kant kodali <ka...@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