0
def main(args: Array[String]) {
val conf = new SparkConf().setMaster("local[4]").setAppName("LongPiJob")
val sc = new SparkContext(conf)
val env = new JobEnvironment {
def jobId: String = "abcdef"
//scalastyle:off
def namedObjects: NamedObjects = ???
def contextConfig: Config = ConfigFactory.empty
}
val results = runJob(sc, env, 5)
println("Result is " + results)
}
我從sparkpi的例子中得到了有關新的api的代碼,它是github回購的一部分。我不明白什麼新的JobEnvironment或其中的任何變量。我的IDE抱怨這些默認設置。Spark JobServer JobEnvironment
答案有幫助嗎? – noorul