[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 <zsxwing@gmail.com>

Closes #6095 from zsxwing/hotfix and squashes the following commits:

b0c2049 [zsxwing] Use the old Job API to support old Hadoop versions
This commit is contained in:
zsxwing 2015-05-13 08:33:24 +08:00 committed by Cheng Lian
parent 77f64c736d
commit 247b70349c

View file

@ -88,7 +88,7 @@ private[sql] case class InsertIntoFSBasedRelation(
}
if (doInsertion) {
val job = Job.getInstance(hadoopConf)
val job = new Job(hadoopConf)
job.setOutputKeyClass(classOf[Void])
job.setOutputValueClass(classOf[Row])
FileOutputFormat.setOutputPath(job, qualifiedOutputPath)