|
|
@ -8,11 +8,10 @@ import ( |
|
|
|
"io/ioutil" |
|
|
|
"net/http" |
|
|
|
"sort" |
|
|
|
"sync" |
|
|
|
|
|
|
|
"google.golang.org/grpc" |
|
|
|
|
|
|
|
"sync" |
|
|
|
|
|
|
|
"github.com/chrislusf/seaweedfs/weed/glog" |
|
|
|
"github.com/chrislusf/seaweedfs/weed/util" |
|
|
|
) |
|
|
@ -126,6 +125,13 @@ func readChunkNeedle(fileUrl string, w io.Writer, offset int64) (written int64, |
|
|
|
return io.Copy(w, resp.Body) |
|
|
|
} |
|
|
|
|
|
|
|
func NewChunkedFileReader(chunkManifest *ChunkManifest, master string) *ChunkedFileReader { |
|
|
|
return &ChunkedFileReader{ |
|
|
|
Manifest: chunkManifest, |
|
|
|
Master: master, |
|
|
|
} |
|
|
|
} |
|
|
|
|
|
|
|
func (cf *ChunkedFileReader) Seek(offset int64, whence int) (int64, error) { |
|
|
|
var err error |
|
|
|
switch whence { |
|
|
|