File tree Expand file tree Collapse file tree 2 files changed +3
-4
lines changed
main/scala/org/apache/spark/sql/hive
test/scala/org/apache/spark/sql/hive Expand file tree Collapse file tree 2 files changed +3
-4
lines changed Original file line number Diff line number Diff line change @@ -68,8 +68,6 @@ class HadoopTableReader(
6868 math.max(sc.hiveconf.getInt(" mapred.map.tasks" , 1 ), sc.sparkContext.defaultMinPartitions)
6969 }
7070
71- @ transient private lazy val fs = FileSystem .get(sc.hiveconf)
72-
7371 // TODO: set aws s3 credentials.
7472
7573 private val _broadcastedHiveConf =
@@ -220,6 +218,7 @@ class HadoopTableReader(
220218 * returned in a single, comma-separated string.
221219 */
222220 private def applyFilterIfNeeded (path : Path , filterOpt : Option [PathFilter ]): Option [String ] = {
221+ val fs = path.getFileSystem(sc.hiveconf)
223222 if (fs.exists(path)) {
224223 // if the file exists
225224 filterOpt match {
Original file line number Diff line number Diff line change @@ -19,8 +19,8 @@ package org.apache.spark.sql.hive
1919
2020import org .scalatest .BeforeAndAfter
2121
22- import org .apache .spark .sql .hive .test .TestHive ._
2322import org .apache .spark .util .Utils
23+ import org .apache .spark .sql .hive .test .TestHive ._
2424import org .apache .spark .sql .hive .execution .HiveComparisonTest
2525
2626abstract class QueryPartitionSuite extends HiveComparisonTest with BeforeAndAfter {
@@ -78,4 +78,4 @@ class QueryPartitionSuite2 extends QueryPartitionSuite {
7878
7979 createQueryTest(" SPARK-5068 scan table with non-existed path" ,
8080 " select key,value from table_with_partition" , false )
81- }
81+ }
You can’t perform that action at this time.
0 commit comments