Skip to content

Commit 2cc3301

Browse files
zsxwingliancheng
authored andcommitted
[HOTFIX] Use the old Job API to support old Hadoop versions
#5526 uses `Job.getInstance`, which does not exist in the old Hadoop versions. Just use `new Job` to replace it. cc liancheng Author: zsxwing <[email protected]> Closes #6095 from zsxwing/hotfix and squashes the following commits: b0c2049 [zsxwing] Use the old Job API to support old Hadoop versions (cherry picked from commit 247b703) Signed-off-by: Cheng Lian <[email protected]>
1 parent 08ec1af commit 2cc3301

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

sql/core/src/main/scala/org/apache/spark/sql/sources/commands.scala

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -88,7 +88,7 @@ private[sql] case class InsertIntoFSBasedRelation(
8888
}
8989

9090
if (doInsertion) {
91-
val job = Job.getInstance(hadoopConf)
91+
val job = new Job(hadoopConf)
9292
job.setOutputKeyClass(classOf[Void])
9393
job.setOutputValueClass(classOf[Row])
9494
FileOutputFormat.setOutputPath(job, qualifiedOutputPath)

0 commit comments

Comments
 (0)