aboutsummaryrefslogtreecommitdiff
path: root/weed/storage/disk_location.go
diff options
context:
space:
mode:
authorbingoohuang <bingoo.huang@gmail.com>2021-02-07 09:00:03 +0800
committerbingoohuang <bingoo.huang@gmail.com>2021-02-07 09:00:03 +0800
commit94ea3bd3a56dd16583c33a3baec17a952b58c6bb (patch)
tree5b072ae5139f5324f3c8387a11fe27f9da3c5e6b /weed/storage/disk_location.go
parent5138d3954fea88cc2131f0d86b14e3a777de29d7 (diff)
downloadseaweedfs-94ea3bd3a56dd16583c33a3baec17a952b58c6bb.tar.xz
seaweedfs-94ea3bd3a56dd16583c33a3baec17a952b58c6bb.zip
renaming NeedleMapType to NeedleMapKind
Diffstat (limited to 'weed/storage/disk_location.go')
-rw-r--r--weed/storage/disk_location.go8
1 files changed, 4 insertions, 4 deletions
diff --git a/weed/storage/disk_location.go b/weed/storage/disk_location.go
index 9b2ab69fe..76eab64a3 100644
--- a/weed/storage/disk_location.go
+++ b/weed/storage/disk_location.go
@@ -82,7 +82,7 @@ func getValidVolumeName(basename string) string {
return ""
}
-func (l *DiskLocation) loadExistingVolume(fileInfo os.FileInfo, needleMapKind NeedleMapType) bool {
+func (l *DiskLocation) loadExistingVolume(fileInfo os.FileInfo, needleMapKind NeedleMapKind) bool {
basename := fileInfo.Name()
if fileInfo.IsDir() {
return false
@@ -133,7 +133,7 @@ func (l *DiskLocation) loadExistingVolume(fileInfo os.FileInfo, needleMapKind Ne
return true
}
-func (l *DiskLocation) concurrentLoadingVolumes(needleMapKind NeedleMapType, concurrency int) {
+func (l *DiskLocation) concurrentLoadingVolumes(needleMapKind NeedleMapKind, concurrency int) {
task_queue := make(chan os.FileInfo, 10*concurrency)
go func() {
@@ -167,7 +167,7 @@ func (l *DiskLocation) concurrentLoadingVolumes(needleMapKind NeedleMapType, con
}
-func (l *DiskLocation) loadExistingVolumes(needleMapKind NeedleMapType) {
+func (l *DiskLocation) loadExistingVolumes(needleMapKind NeedleMapKind) {
l.concurrentLoadingVolumes(needleMapKind, 10)
glog.V(0).Infof("Store started on dir: %s with %d volumes max %d", l.Directory, len(l.volumes), l.MaxVolumeCount)
@@ -237,7 +237,7 @@ func (l *DiskLocation) deleteVolumeById(vid needle.VolumeId) (found bool, e erro
return
}
-func (l *DiskLocation) LoadVolume(vid needle.VolumeId, needleMapKind NeedleMapType) bool {
+func (l *DiskLocation) LoadVolume(vid needle.VolumeId, needleMapKind NeedleMapKind) bool {
if fileInfo, found := l.LocateVolume(vid); found {
return l.loadExistingVolume(fileInfo, needleMapKind)
}