aboutsummaryrefslogtreecommitdiff
path: root/weed/filer/stream.go
diff options
context:
space:
mode:
authorchrislu <chris.lu@gmail.com>2022-11-15 06:33:36 -0800
committerchrislu <chris.lu@gmail.com>2022-11-15 06:33:36 -0800
commit70a4c98b00d811c01289f26d3602992a0d3f45e1 (patch)
tree8d650eb24623e503ec03ccf45a73f3e61afdbe65 /weed/filer/stream.go
parent371972a1c212205b51391c17c064e9ea452fee17 (diff)
downloadseaweedfs-70a4c98b00d811c01289f26d3602992a0d3f45e1.tar.xz
seaweedfs-70a4c98b00d811c01289f26d3602992a0d3f45e1.zip
refactor filer_pb.Entry and filer.Entry to use GetChunks()
for later locking on reading chunks
Diffstat (limited to 'weed/filer/stream.go')
-rw-r--r--weed/filer/stream.go4
1 files changed, 2 insertions, 2 deletions
diff --git a/weed/filer/stream.go b/weed/filer/stream.go
index fdbcfc4ec..f28341be4 100644
--- a/weed/filer/stream.go
+++ b/weed/filer/stream.go
@@ -30,7 +30,7 @@ func HasData(entry *filer_pb.Entry) bool {
return true
}
- return len(entry.Chunks) > 0
+ return len(entry.GetChunks()) > 0
}
func IsSameData(a, b *filer_pb.Entry) bool {
@@ -64,7 +64,7 @@ func NewFileReader(filerClient filer_pb.FilerClient, entry *filer_pb.Entry) io.R
if len(entry.Content) > 0 {
return bytes.NewReader(entry.Content)
}
- return NewChunkStreamReader(filerClient, entry.Chunks)
+ return NewChunkStreamReader(filerClient, entry.GetChunks())
}
func StreamContent(masterClient wdclient.HasLookupFileIdFunction, writer io.Writer, chunks []*filer_pb.FileChunk, offset int64, size int64) error {