aboutsummaryrefslogtreecommitdiff
path: root/weed/storage/erasure_coding/ec_shard.go
diff options
context:
space:
mode:
authorChris Lu <chris.lu@gmail.com>2019-05-27 11:59:03 -0700
committerChris Lu <chris.lu@gmail.com>2019-05-27 11:59:03 -0700
commitb4b407e4038943ca5b7dc440d2848f23c11b73ca (patch)
treef90a49fa2cac3361efa224b13c0ecfaade054b76 /weed/storage/erasure_coding/ec_shard.go
parenta4f3d82c57bca13321dca257891836ff36c7eca5 (diff)
downloadseaweedfs-b4b407e4038943ca5b7dc440d2848f23c11b73ca.tar.xz
seaweedfs-b4b407e4038943ca5b7dc440d2848f23c11b73ca.zip
add grpc ec shard read
Diffstat (limited to 'weed/storage/erasure_coding/ec_shard.go')
-rw-r--r--weed/storage/erasure_coding/ec_shard.go6
1 files changed, 6 insertions, 0 deletions
diff --git a/weed/storage/erasure_coding/ec_shard.go b/weed/storage/erasure_coding/ec_shard.go
index 084d3f03b..fa4bfcecd 100644
--- a/weed/storage/erasure_coding/ec_shard.go
+++ b/weed/storage/erasure_coding/ec_shard.go
@@ -105,3 +105,9 @@ func (shard *EcVolumeShard) findNeedleFromEcx(needleId types.NeedleId) (offset t
err = fmt.Errorf("needle id %d not found", needleId)
return
}
+
+func (shard *EcVolumeShard) ReadAt(buf []byte, offset int64) (int, error) {
+
+ return shard.ecdFile.ReadAt(buf, offset)
+
+}