mirror of
https://gitee.com/milvus-io/milvus.git
synced 2024-12-05 05:18:52 +08:00
b79687687d
Signed-off-by: yun.zhang <yun.zhang@zilliz.com> Signed-off-by: yun.zhang <yun.zhang@zilliz.com>
22 lines
670 B
Go
22 lines
670 B
Go
package metautil
|
|
|
|
import (
|
|
"path"
|
|
|
|
"github.com/milvus-io/milvus/internal/common"
|
|
)
|
|
|
|
func BuildSegmentIndexFilePath(rootPath string, buildID, indexVersion, partID, segID int64, fileKey string) string {
|
|
k := JoinIDPath(buildID, indexVersion, partID, segID)
|
|
return path.Join(rootPath, common.SegmentIndexPath, k, fileKey)
|
|
}
|
|
|
|
func BuildSegmentIndexFilePaths(rootPath string, buildID, indexVersion, partID, segID int64, fileKeys []string) []string {
|
|
paths := make([]string, 0, len(fileKeys))
|
|
for _, fileKey := range fileKeys {
|
|
path := BuildSegmentIndexFilePath(rootPath, buildID, indexVersion, partID, segID, fileKey)
|
|
paths = append(paths, path)
|
|
}
|
|
return paths
|
|
}
|