Function0<JavaStreamingContext> createContectFunc=new Function0<JavaStreamingContext>() {
@Override
public JavaStreamingContext call() throws Exception {
return createContext(ip,port,checkpointDirectory,outputpath);
}
};
Function0<JavaStreamingContext> createContectFunc=
() -> createContext(ip,port,checkpointDirectory,outputpath);
利用lambada表达式简化了写法