Revert "mount: when outside cluster network, use filer as proxy to access volume servers"

This reverts commit 096e088d7b.
This commit is contained in:
Chris Lu
2021-01-24 03:15:19 -08:00
parent 096e088d7b
commit 6ca10725b8
15 changed files with 41 additions and 29 deletions

View File

@@ -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,
}