aboutsummaryrefslogtreecommitdiff
path: root/sql/hive
diff options
context:
space:
mode:
authorJosh Rosen <joshrosen@databricks.com>2015-09-12 16:23:55 -0700
committerJosh Rosen <joshrosen@databricks.com>2015-09-12 16:23:55 -0700
commitb3a7480ab0821ab38f710de96e3ac4a13f62dbca (patch)
tree2a286b61a1a7e22cc0f0306b0c073b0ae3ac9e89 /sql/hive
parentf4a22808e03fa12bfe1bfc82cf713cfda7e063a9 (diff)
downloadspark-b3a7480ab0821ab38f710de96e3ac4a13f62dbca.tar.gz
spark-b3a7480ab0821ab38f710de96e3ac4a13f62dbca.tar.bz2
spark-b3a7480ab0821ab38f710de96e3ac4a13f62dbca.zip
[SPARK-10330] Add Scalastyle rule to require use of SparkHadoopUtil JobContext methods
This is a followup to #8499 which adds a Scalastyle rule to mandate the use of SparkHadoopUtil's JobContext accessor methods and fixes the existing violations. Author: Josh Rosen <joshrosen@databricks.com> Closes #8521 from JoshRosen/SPARK-10330-part2.
Diffstat (limited to 'sql/hive')
-rw-r--r--sql/hive/src/main/scala/org/apache/spark/sql/hive/orc/OrcRelation.scala4
1 files changed, 2 insertions, 2 deletions
diff --git a/sql/hive/src/main/scala/org/apache/spark/sql/hive/orc/OrcRelation.scala b/sql/hive/src/main/scala/org/apache/spark/sql/hive/orc/OrcRelation.scala
index 7e89109259..d1f30e188e 100644
--- a/sql/hive/src/main/scala/org/apache/spark/sql/hive/orc/OrcRelation.scala
+++ b/sql/hive/src/main/scala/org/apache/spark/sql/hive/orc/OrcRelation.scala
@@ -208,7 +208,7 @@ private[sql] class OrcRelation(
}
override def prepareJobForWrite(job: Job): OutputWriterFactory = {
- job.getConfiguration match {
+ SparkHadoopUtil.get.getConfigurationFromJobContext(job) match {
case conf: JobConf =>
conf.setOutputFormat(classOf[OrcOutputFormat])
case conf =>
@@ -289,7 +289,7 @@ private[orc] case class OrcTableScan(
def execute(): RDD[InternalRow] = {
val job = new Job(sqlContext.sparkContext.hadoopConfiguration)
- val conf = job.getConfiguration
+ val conf = SparkHadoopUtil.get.getConfigurationFromJobContext(job)
// Tries to push down filters if ORC filter push-down is enabled
if (sqlContext.conf.orcFilterPushDown) {