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

Commit 4537281

Browse files
committed
Change systemPath => indexLocationDir
1 parent 4423b3b commit 4537281

File tree

3 files changed

+6
-6
lines changed

3 files changed

+6
-6
lines changed

src/main/scala/com/microsoft/hyperspace/index/IndexCollectionManager.scala

+1-1
Original file line numberDiff line numberDiff line change
@@ -152,7 +152,7 @@ class IndexCollectionManager(
152152

153153
private def indexLogManagers: Seq[IndexLogManager] = {
154154
val hadoopConf = spark.sessionState.newHadoopConf()
155-
val rootPath = PathResolver(conf, hadoopConf).systemPath
155+
val rootPath = PathResolver(conf, hadoopConf).indexLocationDir
156156
val fs = fileSystemFactory.create(rootPath, hadoopConf)
157157
val indexPaths: Seq[Path] = if (fs.exists(rootPath)) {
158158
fs.listStatus(rootPath).map(_.getPath)

src/main/scala/com/microsoft/hyperspace/index/IndexConstants.scala

+1-1
Original file line numberDiff line numberDiff line change
@@ -25,7 +25,7 @@ object IndexConstants {
2525

2626
// Config used for subdirectory name under the system path.
2727
val INDEX_DIR_NAME = "spark.hyperspace.system.indexDirName"
28-
val INDEX_DIR_NAME_DEFAULT = "indexes"
28+
val INDEX_DIR_NAME_DEFAULT = "hyperspace"
2929

3030
// Config used to set the number of buckets for the index.
3131
val INDEX_NUM_BUCKETS_LEGACY = "spark.hyperspace.index.num.buckets"

src/main/scala/com/microsoft/hyperspace/index/PathResolver.scala

+4-4
Original file line numberDiff line numberDiff line change
@@ -37,7 +37,7 @@ private[hyperspace] class PathResolver(conf: SQLConf, hadoopConf: Configuration)
3737
* @return resolved index path
3838
*/
3939
def getIndexPath(name: String): Path = {
40-
val root = systemPath
40+
val root = indexLocationDir
4141
val fs = root.getFileSystem(hadoopConf)
4242
if (fs.exists(root)) {
4343
// Note that fs.exists() is case-sensitive in some platforms and case-insensitive
@@ -58,11 +58,11 @@ private[hyperspace] class PathResolver(conf: SQLConf, hadoopConf: Configuration)
5858
}
5959

6060
/**
61-
* Get the Hyperspace index system path.
61+
* Get the Hyperspace index location dir path.
6262
*
63-
* @return Hyperspace index system path.
63+
* @return Hyperspace index location dir path.
6464
*/
65-
def systemPath: Path = {
65+
def indexLocationDir: Path = {
6666
val indexDirName =
6767
conf.getConfString(IndexConstants.INDEX_DIR_NAME, IndexConstants.INDEX_DIR_NAME_DEFAULT)
6868
val indexSystemPath = conf.getConfString(

0 commit comments

Comments
 (0)