Skip to content
This repository has been archived by the owner on Jun 14, 2024. It is now read-only.

Commit

Permalink
Change systemPath => indexLocationDir
Browse files Browse the repository at this point in the history
  • Loading branch information
sezruby committed Apr 12, 2021
1 parent 4423b3b commit 4537281
Show file tree
Hide file tree
Showing 3 changed files with 6 additions and 6 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -152,7 +152,7 @@ class IndexCollectionManager(

private def indexLogManagers: Seq[IndexLogManager] = {
val hadoopConf = spark.sessionState.newHadoopConf()
val rootPath = PathResolver(conf, hadoopConf).systemPath
val rootPath = PathResolver(conf, hadoopConf).indexLocationDir
val fs = fileSystemFactory.create(rootPath, hadoopConf)
val indexPaths: Seq[Path] = if (fs.exists(rootPath)) {
fs.listStatus(rootPath).map(_.getPath)
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -25,7 +25,7 @@ object IndexConstants {

// Config used for subdirectory name under the system path.
val INDEX_DIR_NAME = "spark.hyperspace.system.indexDirName"
val INDEX_DIR_NAME_DEFAULT = "indexes"
val INDEX_DIR_NAME_DEFAULT = "hyperspace"

// Config used to set the number of buckets for the index.
val INDEX_NUM_BUCKETS_LEGACY = "spark.hyperspace.index.num.buckets"
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -37,7 +37,7 @@ private[hyperspace] class PathResolver(conf: SQLConf, hadoopConf: Configuration)
* @return resolved index path
*/
def getIndexPath(name: String): Path = {
val root = systemPath
val root = indexLocationDir
val fs = root.getFileSystem(hadoopConf)
if (fs.exists(root)) {
// Note that fs.exists() is case-sensitive in some platforms and case-insensitive
Expand All @@ -58,11 +58,11 @@ private[hyperspace] class PathResolver(conf: SQLConf, hadoopConf: Configuration)
}

/**
* Get the Hyperspace index system path.
* Get the Hyperspace index location dir path.
*
* @return Hyperspace index system path.
* @return Hyperspace index location dir path.
*/
def systemPath: Path = {
def indexLocationDir: Path = {
val indexDirName =
conf.getConfString(IndexConstants.INDEX_DIR_NAME, IndexConstants.INDEX_DIR_NAME_DEFAULT)
val indexSystemPath = conf.getConfString(
Expand Down

0 comments on commit 4537281

Please sign in to comment.