Browse Source

rm func CheckAllChunkViews

pull/2074/head
Konstantin Lebedev 4 years ago
parent
commit
3325b850cc
  1. 15
      weed/filer/stream.go

15
weed/filer/stream.go

@ -3,7 +3,6 @@ package filer
import ( import (
"bytes" "bytes"
"fmt" "fmt"
"golang.org/x/sync/errgroup"
"io" "io"
"math" "math"
"strings" "strings"
@ -59,20 +58,6 @@ func StreamContent(masterClient wdclient.HasLookupFileIdFunction, w io.Writer, c
} }
func CheckAllChunkViews(chunkViews []*ChunkView, fileId2Url *map[string][]string, gErr *errgroup.Group) {
for _, chunkView := range chunkViews {
urlStrings := (*fileId2Url)[chunkView.FileId]
glog.V(9).Infof("Check chunk: %+v\n url: %+v", chunkView, urlStrings)
if !chunkView.IsFullChunk() {
continue
}
gErr.Go(func() error {
_, err := retriedFetchChunkData(urlStrings, chunkView.CipherKey, chunkView.IsGzipped, false, 0, 2)
return err
})
}
}
// ---------------- ReadAllReader ---------------------------------- // ---------------- ReadAllReader ----------------------------------
func ReadAll(masterClient *wdclient.MasterClient, chunks []*filer_pb.FileChunk) ([]byte, error) { func ReadAll(masterClient *wdclient.MasterClient, chunks []*filer_pb.FileChunk) ([]byte, error) {

Loading…
Cancel
Save