aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorChris Lu <chris.lu@gmail.com>2021-08-27 22:16:29 -0700
committerChris Lu <chris.lu@gmail.com>2021-08-27 22:18:54 -0700
commitdc481c081cb9e09bb11e3f8108834ca0bc88c4ce (patch)
treecbab7877c38ca9f38b8c749e08f2ec98191eb541
parentca80199ccd97aec58580b35fdfb3cdbcb35c91e9 (diff)
downloadseaweedfs-dc481c081cb9e09bb11e3f8108834ca0bc88c4ce.tar.xz
seaweedfs-dc481c081cb9e09bb11e3f8108834ca0bc88c4ce.zip
remove unused function
-rw-r--r--weed/filer/read_remote.go14
1 files changed, 0 insertions, 14 deletions
diff --git a/weed/filer/read_remote.go b/weed/filer/read_remote.go
index a6ce9fec0..3406246a9 100644
--- a/weed/filer/read_remote.go
+++ b/weed/filer/read_remote.go
@@ -2,7 +2,6 @@ package filer
import (
"context"
- "fmt"
"github.com/chrislusf/seaweedfs/weed/pb/filer_pb"
"github.com/chrislusf/seaweedfs/weed/pb/remote_pb"
"github.com/chrislusf/seaweedfs/weed/util"
@@ -12,19 +11,6 @@ func (entry *Entry) IsInRemoteOnly() bool {
return len(entry.Chunks) == 0 && entry.Remote != nil && entry.Remote.RemoteSize > 0
}
-func (f *Filer) ReadRemote(entry *Entry, offset int64, size int64) (data []byte, err error) {
- client, _, found := f.RemoteStorage.GetRemoteStorageClient(entry.Remote.StorageName)
- if !found {
- return nil, fmt.Errorf("remote storage %v not found", entry.Remote.StorageName)
- }
-
- mountDir, remoteLoation := f.RemoteStorage.FindMountDirectory(entry.FullPath)
-
- sourceLoc := MapFullPathToRemoteStorageLocation(mountDir, remoteLoation, entry.FullPath)
-
- return client.ReadFile(sourceLoc, offset, size)
-}
-
func MapFullPathToRemoteStorageLocation(localMountedDir util.FullPath, remoteMountedLocation *remote_pb.RemoteStorageLocation, fp util.FullPath) *remote_pb.RemoteStorageLocation {
remoteLocation := &remote_pb.RemoteStorageLocation{
Name: remoteMountedLocation.Name,