让我们说我有一个看似如下的火花工作:
def loadTable1() {
val table1 = sqlContext.jsonFile(s"s3://textfiledirectory/")
table1.cache().registerTempTable("table1")
}
def loadTable2() {
val table2 = sqlContext.jsonFile(s"s3://testfiledirectory2/")
table2.cache().registerTempTable("table2")
}
def loadAllTables() {
val thread1 = new Thread()
thread1.loadTable1()
val thread2 = new Thread()
thread2.loadTable2()
}
loadAllTables()
当我运行该程序时,我收到错误,如" SparkException:由于阶段失败而导致作业中止:阶段3.0中的任务0"