oops my bad. I see it now! sorry. On Wed, Apr 19, 2017 at 1:56 PM, Marcelo Vanzin <van...@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 <kanth...@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 <van...@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 <kanth...@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 >