Skip to content

Commit

Permalink
Thu Oct 20 14:42:24 PDT 2016
Browse files Browse the repository at this point in the history
  • Loading branch information
ericl committed Oct 20, 2016
2 parents 3b6398b + 57452a9 commit 2ec970f
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 4 deletions.
Expand Up @@ -39,11 +39,12 @@ class TableFileCatalog(
val db: String,
val table: String,
override val partitionSchema: StructType,
override val sizeInBytes: Long,
fileStatusCache: FileStatusCache = NoopCache) extends FileCatalog {
override val sizeInBytes: Long) extends FileCatalog {

protected val hadoopConf = sparkSession.sessionState.newHadoopConf

private val fileStatusCache = FileStatusCache.getOrInitializeShared(new Object(), sparkSession)

private val externalCatalog = sparkSession.sharedState.externalCatalog

private val catalogTable = externalCatalog.getTable(db, table)
Expand Down
Expand Up @@ -230,8 +230,7 @@ private[hive] class HiveMetastoreCatalog(sparkSession: SparkSession) extends Log
val sizeInBytes = metastoreRelation.statistics.sizeInBytes.toLong
val fileCatalog = {
val catalog = new TableFileCatalog(
sparkSession, db, table, partitionSchema, sizeInBytes,
FileStatusCache.getOrInitializeShared(new Object(), sparkSession))
sparkSession, db, table, partitionSchema, sizeInBytes)
if (lazyPruningEnabled) {
catalog
} else {
Expand Down

0 comments on commit 2ec970f

Please sign in to comment.