aboutsummaryrefslogtreecommitdiff
path: root/weed/filer/reader_at.go
diff options
context:
space:
mode:
authorChris Lu <chris.lu@gmail.com>2021-01-24 03:15:19 -0800
committerChris Lu <chris.lu@gmail.com>2021-01-24 03:15:19 -0800
commit6ca10725b81fd20d8bce2f582f1b93b047d0a4c3 (patch)
tree21e481993e3188a8a7680caf4cc3fde34e61717b /weed/filer/reader_at.go
parent096e088d7bb2a5dce7573b24c2d3006d1cb6f9ec (diff)
downloadseaweedfs-6ca10725b81fd20d8bce2f582f1b93b047d0a4c3.tar.xz
seaweedfs-6ca10725b81fd20d8bce2f582f1b93b047d0a4c3.zip
Revert "mount: when outside cluster network, use filer as proxy to access volume servers"
This reverts commit 096e088d7bb2a5dce7573b24c2d3006d1cb6f9ec.
Diffstat (limited to 'weed/filer/reader_at.go')
-rw-r--r--weed/filer/reader_at.go6
1 files changed, 3 insertions, 3 deletions
diff --git a/weed/filer/reader_at.go b/weed/filer/reader_at.go
index 41d177210..307224f35 100644
--- a/weed/filer/reader_at.go
+++ b/weed/filer/reader_at.go
@@ -71,7 +71,7 @@ func LookupFn(filerClient filer_pb.FilerClient) wdclient.LookupFileIdFunctionTyp
}
for _, loc := range locations.Locations {
- volumeServerAddress := loc.Url
+ volumeServerAddress := filerClient.AdjustedUrl(loc)
targetUrl := fmt.Sprintf("http://%s/%s", volumeServerAddress, fileId)
targetUrls = append(targetUrls, targetUrl)
}
@@ -85,11 +85,11 @@ func LookupFn(filerClient filer_pb.FilerClient) wdclient.LookupFileIdFunctionTyp
}
}
-func NewChunkReaderAtFromClient(lookupFn wdclient.LookupFileIdFunctionType, chunkViews []*ChunkView, chunkCache chunk_cache.ChunkCache, fileSize int64) *ChunkReadAt {
+func NewChunkReaderAtFromClient(filerClient filer_pb.FilerClient, chunkViews []*ChunkView, chunkCache chunk_cache.ChunkCache, fileSize int64) *ChunkReadAt {
return &ChunkReadAt{
chunkViews: chunkViews,
- lookupFileId: lookupFn,
+ lookupFileId: LookupFn(filerClient),
chunkCache: chunkCache,
fileSize: fileSize,
}