aboutsummaryrefslogtreecommitdiff
path: root/weed/storage/erasure_coding/ec_shard.go
diff options
context:
space:
mode:
authorChris Lu <chris.lu@gmail.com>2019-06-16 02:24:15 -0700
committerChris Lu <chris.lu@gmail.com>2019-06-16 02:24:15 -0700
commit289fd7eb39a9150b392a8e29596f9b85ace0534c (patch)
treeaa6d6f725b577174a75538169f4b4dc59ea6c4a1 /weed/storage/erasure_coding/ec_shard.go
parentff6a6dd11e55e89dfeed0eb31da8a20a7e7e6e9f (diff)
downloadseaweedfs-289fd7eb39a9150b392a8e29596f9b85ace0534c.tar.xz
seaweedfs-289fd7eb39a9150b392a8e29596f9b85ace0534c.zip
count number of volumes and ec shards
Diffstat (limited to 'weed/storage/erasure_coding/ec_shard.go')
-rw-r--r--weed/storage/erasure_coding/ec_shard.go4
1 files changed, 4 insertions, 0 deletions
diff --git a/weed/storage/erasure_coding/ec_shard.go b/weed/storage/erasure_coding/ec_shard.go
index 2009beb9c..bcfa2c721 100644
--- a/weed/storage/erasure_coding/ec_shard.go
+++ b/weed/storage/erasure_coding/ec_shard.go
@@ -6,6 +6,7 @@ import (
"path"
"strconv"
+ "github.com/chrislusf/seaweedfs/weed/stats"
"github.com/chrislusf/seaweedfs/weed/storage/needle"
)
@@ -36,6 +37,8 @@ func NewEcVolumeShard(dirname string, collection string, id needle.VolumeId, sha
}
v.ecdFileSize = ecdFi.Size()
+ stats.VolumeServerEcShardCounter.Inc()
+
return
}
@@ -78,6 +81,7 @@ func (shard *EcVolumeShard) Close() {
func (shard *EcVolumeShard) Destroy() {
os.Remove(shard.FileName() + ToExt(int(shard.ShardId)))
+ stats.VolumeServerEcShardCounter.Dec()
}
func (shard *EcVolumeShard) ReadAt(buf []byte, offset int64) (int, error) {