mirror of
https://github.com/seaweedfs/seaweedfs.git
synced 2026-11-27 14:47:05 +01:00
Compare commits
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
e6ee421d61 | ||
|
|
a631b2a9e9 | ||
|
|
69ffcbdcc0 | ||
|
|
33da30d2b1 | ||
|
|
de3eb7c380 | ||
|
|
357ea4b944 | ||
|
|
deb249736e | ||
|
|
f59119cd1d | ||
|
|
3e0cd122d8 | ||
|
|
05c3b795dc | ||
|
|
987108a2b1 | ||
|
|
bbb6ebc3c0 | ||
|
|
0fa1269bc7 | ||
|
|
d0b423bbc0 | ||
|
|
bf4b13612d | ||
|
|
1f400489c6 | ||
|
|
4cba32d1d0 | ||
|
|
f51a6d8ba5 | ||
|
|
c602073395 | ||
|
|
06ff984786 | ||
|
|
1ddfbff2d3 | ||
|
|
f06b65a6fd | ||
|
|
2449945b83 | ||
|
|
9e45702334 | ||
|
|
40ff4eea14 | ||
|
|
356bd1b629 | ||
|
|
5847c5afff | ||
|
|
3727d2488f | ||
|
|
10bd3c6b4b | ||
|
|
2b8e20f122 | ||
|
|
5eb86aad47 | ||
|
|
e2a8cdfc48 | ||
|
|
0eda75fa2c | ||
|
|
f81d43442b | ||
|
|
f38f90b7ea | ||
|
|
6827cabfbb | ||
|
|
81f424a630 | ||
|
|
916423e96a | ||
|
|
e426bd541e | ||
|
|
7ae8b1cc86 | ||
|
|
1becbce657 | ||
|
|
70648d35ad | ||
|
|
6383b45bd0 | ||
|
|
caae543a9f | ||
|
|
126fb492d2 | ||
|
|
ec8de250e2 | ||
|
|
228231f3d7 | ||
|
|
72482b8e1c | ||
|
|
e83c36e26f | ||
|
|
0da7b894cc | ||
|
|
0e79a44604 | ||
|
|
a9dbd52e06 | ||
|
|
ea9d1ebd2f | ||
|
|
ea9a7e61d0 | ||
|
|
61bc1d6ffd | ||
|
|
09c6d8fa32 | ||
|
|
f60154f330 | ||
|
|
641b92f53c | ||
|
|
ee2072dff9 | ||
|
|
0b822a6fb5 | ||
|
|
13b6f09fea | ||
|
|
0d8a88c9a8 | ||
|
|
586798ecc0 | ||
|
|
46294b42e6 | ||
|
|
1ba3456ac2 | ||
|
|
4c87b222f1 | ||
|
|
0f9ba84274 | ||
|
|
67e5f5b558 | ||
|
|
c260ab457f | ||
|
|
2700ac6d1f | ||
|
|
5f6b360eb7 | ||
|
|
2cbe79acda | ||
|
|
753138a3f7 |
No files matched your search
@@ -1,6 +1,8 @@
|
||||
sudo: false
|
||||
language: go
|
||||
go:
|
||||
- 1.11.x
|
||||
- 1.12.x
|
||||
- 1.13.x
|
||||
|
||||
before_install:
|
||||
|
||||
@@ -87,7 +87,7 @@ There is only 40 bytes of disk storage overhead for each file's metadata. It is
|
||||
|
||||
SeaweedFS started by implementing [Facebook's Haystack design paper](http://www.usenix.org/event/osdi10/tech/full_papers/Beaver.pdf). Also, SeaweedFS implements erasure coding with ideas from [f4: Facebook’s Warm BLOB Storage System](https://www.usenix.org/system/files/conference/osdi14/osdi14-paper-muralidhar.pdf)
|
||||
|
||||
SeaweedFS can work very well with just the object store. [[Filer]] can then be added later to support directories and POSIX attributes. Filer is a separate linearly-scalable stateless server with customizable metadata stores, e.g., MySql/Postgres/Redis/Etcd/Cassandra/LevelDB.
|
||||
SeaweedFS can work very well with just the object store. [[Filer]] can then be added later to support directories and POSIX attributes. Filer is a separate linearly-scalable stateless server with customizable metadata stores, e.g., MySql/Postgres/Redis/Etcd/Cassandra/LevelDB/MemSql/TiDB/CockroachDB.
|
||||
|
||||
[Back to TOC](#table-of-contents)
|
||||
|
||||
@@ -344,7 +344,7 @@ The architectures are mostly the same. SeaweedFS aims to store and read files fa
|
||||
|
||||
* SeaweedFS optimizes for small files, ensuring O(1) disk seek operation, and can also handle large files.
|
||||
* SeaweedFS statically assigns a volume id for a file. Locating file content becomes just a lookup of the volume id, which can be easily cached.
|
||||
* SeaweedFS Filer metadata store can be any well-known and proven data stores, e.g., Cassandra, Redis, Etcd, MySql, Postgres, etc, and is easy to customized.
|
||||
* SeaweedFS Filer metadata store can be any well-known and proven data stores, e.g., Cassandra, Redis, Etcd, MySql, Postgres, MemSql, TiDB, CockroachDB, etc, and is easy to customized.
|
||||
* SeaweedFS Volume server also communicates directly with clients via HTTP, supporting range queries, direct uploads, etc.
|
||||
|
||||
| System | File Meta | File Content Read| POSIX | REST API | Optimized for small files |
|
||||
@@ -376,7 +376,7 @@ Ceph uses CRUSH hashing to automatically manage the data placement. SeaweedFS pl
|
||||
|
||||
SeaweedFS is optimized for small files. Small files are stored as one continuous block of content, with at most 8 unused bytes between files. Small file access is O(1) disk read.
|
||||
|
||||
SeaweedFS Filer uses off-the-shelf stores, such as MySql, Postgres, Redis, Etcd, Cassandra, to manage file directories. There are proven, scalable, and easier to manage.
|
||||
SeaweedFS Filer uses off-the-shelf stores, such as MySql, Postgres, Redis, Etcd, Cassandra, MemSql, TiDB, CockroachCB, to manage file directories. There are proven, scalable, and easier to manage.
|
||||
|
||||
| SeaweedFS | comparable to Ceph | advantage |
|
||||
| ------------- | ------------- | ---------------- |
|
||||
|
||||
@@ -8,7 +8,7 @@ services:
|
||||
ports:
|
||||
- 9333:9333
|
||||
- 19333:19333
|
||||
command: "master"
|
||||
command: "master -ip=master"
|
||||
volume:
|
||||
build:
|
||||
context: .
|
||||
|
||||
@@ -3,7 +3,7 @@
|
||||
case "$1" in
|
||||
|
||||
'master')
|
||||
ARGS="-ip `hostname -i` -mdir /data"
|
||||
ARGS="-mdir /data"
|
||||
# Is this instance linked with an other master? (Docker commandline "--link master1:master")
|
||||
if [ -n "$MASTER_PORT_9333_TCP_ADDR" ] ; then
|
||||
ARGS="$ARGS -peers=$MASTER_PORT_9333_TCP_ADDR:$MASTER_PORT_9333_TCP_PORT"
|
||||
|
||||
@@ -6,7 +6,7 @@ services:
|
||||
ports:
|
||||
- 9333:9333
|
||||
- 19333:19333
|
||||
command: "master"
|
||||
command: "master -ip=master"
|
||||
volume:
|
||||
image: chrislusf/seaweedfs # use a remote image
|
||||
ports:
|
||||
|
||||
@@ -4,55 +4,48 @@ go 1.12
|
||||
|
||||
require (
|
||||
cloud.google.com/go v0.44.3
|
||||
contrib.go.opencensus.io/exporter/aws v0.0.0-20190807220307-c50fb1bd7f21 // indirect
|
||||
contrib.go.opencensus.io/exporter/ocagent v0.6.0 // indirect
|
||||
contrib.go.opencensus.io/exporter/stackdriver v0.12.5 // indirect
|
||||
contrib.go.opencensus.io/resource v0.1.2 // indirect
|
||||
github.com/Azure/azure-amqp-common-go v1.1.4 // indirect
|
||||
github.com/Azure/azure-pipeline-go v0.2.2 // indirect
|
||||
github.com/Azure/azure-storage-blob-go v0.8.0
|
||||
github.com/Azure/go-autorest v13.0.0+incompatible // indirect
|
||||
github.com/Azure/go-autorest/autorest v0.9.2 // indirect
|
||||
github.com/DataDog/zstd v1.4.1 // indirect
|
||||
github.com/GoogleCloudPlatform/cloudsql-proxy v0.0.0-20190828224159-d93c53a4824c // indirect
|
||||
github.com/Shopify/sarama v1.23.1
|
||||
github.com/alecthomas/template v0.0.0-20190718012654-fb15b899a751 // indirect
|
||||
github.com/alecthomas/units v0.0.0-20190717042225-c3de453c63f4 // indirect
|
||||
github.com/aws/aws-sdk-go v1.23.13
|
||||
github.com/chrislusf/raft v0.0.0-20190225081310-10d6e2182d92
|
||||
github.com/coreos/etcd v3.3.15+incompatible // indirect
|
||||
github.com/coreos/go-semver v0.3.0 // indirect
|
||||
github.com/coreos/go-systemd v0.0.0-20190719114852-fd7a80b32e1f // indirect
|
||||
github.com/dgrijalva/jwt-go v3.2.0+incompatible
|
||||
github.com/disintegration/imaging v1.6.1
|
||||
github.com/dustin/go-humanize v1.0.0
|
||||
github.com/eapache/go-resiliency v1.2.0 // indirect
|
||||
github.com/facebookgo/clock v0.0.0-20150410010913-600d898af40a
|
||||
github.com/facebookgo/stats v0.0.0-20151006221625-1b76add642e4
|
||||
github.com/frankban/quicktest v1.7.2 // indirect
|
||||
github.com/gabriel-vasile/mimetype v0.3.17
|
||||
github.com/go-kit/kit v0.9.0 // indirect
|
||||
github.com/go-redis/redis v6.15.2+incompatible
|
||||
github.com/go-sql-driver/mysql v1.4.1
|
||||
github.com/gocql/gocql v0.0.0-20190829130954-e163eff7a8c6
|
||||
github.com/gogo/protobuf v1.2.2-0.20190730201129-28a6bbf47e48 // indirect
|
||||
github.com/golang/protobuf v1.3.2
|
||||
github.com/google/btree v1.0.0
|
||||
github.com/google/pprof v0.0.0-20190723021845-34ac40c74b70 // indirect
|
||||
github.com/google/uuid v1.1.1
|
||||
github.com/gorilla/mux v1.7.3
|
||||
github.com/gorilla/websocket v1.4.1 // indirect
|
||||
github.com/grpc-ecosystem/grpc-gateway v1.11.0 // indirect
|
||||
github.com/hashicorp/golang-lru v0.5.3 // indirect
|
||||
github.com/jacobsa/daemonize v0.0.0-20160101105449-e460293e890f
|
||||
github.com/jcmturner/gofork v1.0.0 // indirect
|
||||
github.com/juju/errors v0.0.0-20190930114154-d42613fe1ab9 // indirect
|
||||
github.com/karlseguin/ccache v2.0.3+incompatible
|
||||
github.com/karlseguin/expect v1.0.1 // indirect
|
||||
github.com/klauspost/cpuid v1.2.1 // indirect
|
||||
github.com/klauspost/crc32 v1.2.0
|
||||
github.com/klauspost/reedsolomon v1.9.3
|
||||
github.com/klauspost/reedsolomon v1.9.2
|
||||
github.com/konsorten/go-windows-terminal-sequences v1.0.2 // indirect
|
||||
github.com/kr/pty v1.1.8 // indirect
|
||||
github.com/kurin/blazer v0.5.4-0.20190613185654-cf2f27cc0be3
|
||||
github.com/kurin/blazer v0.5.3
|
||||
github.com/lib/pq v1.2.0
|
||||
github.com/magiconair/properties v1.8.1 // indirect
|
||||
github.com/mattn/go-ieproxy v0.0.0-20190805055040-f9202b1cfdeb // indirect
|
||||
github.com/mattn/go-isatty v0.0.9 // indirect
|
||||
github.com/minio/minio v0.0.0-20191122214605-0a56e33ce1b5
|
||||
github.com/mwitkow/go-conntrack v0.0.0-20190716064945-2f068394615f // indirect
|
||||
github.com/mattn/go-runewidth v0.0.4 // indirect
|
||||
github.com/nats-io/nats-server/v2 v2.0.4 // indirect
|
||||
github.com/onsi/ginkgo v1.10.1 // indirect
|
||||
github.com/onsi/gomega v1.7.0 // indirect
|
||||
github.com/opentracing/opentracing-go v1.1.0 // indirect
|
||||
@@ -68,11 +61,9 @@ require (
|
||||
github.com/rakyll/statik v0.1.6
|
||||
github.com/rcrowley/go-metrics v0.0.0-20190826022208-cac0b30c2563 // indirect
|
||||
github.com/remyoudompheng/bigfft v0.0.0-20190728182440-6a916e37a237 // indirect
|
||||
github.com/rogpeppe/fastuuid v1.2.0 // indirect
|
||||
github.com/rogpeppe/go-internal v1.3.1 // indirect
|
||||
github.com/rwcarlsen/goexif v0.0.0-20190401172101-9e8deecbddbd
|
||||
github.com/satori/go.uuid v1.2.0
|
||||
github.com/seaweedfs/fuse v0.0.0-20190510212405-310228904eff
|
||||
github.com/sirupsen/logrus v1.4.2 // indirect
|
||||
github.com/spaolacci/murmur3 v1.1.0 // indirect
|
||||
github.com/spf13/afero v1.2.2 // indirect
|
||||
github.com/spf13/jwalterweatherman v1.1.0 // indirect
|
||||
@@ -82,32 +73,27 @@ require (
|
||||
github.com/syndtr/goleveldb v1.0.0
|
||||
github.com/tidwall/gjson v1.3.2
|
||||
github.com/tidwall/match v1.0.1
|
||||
github.com/twinj/uuid v1.0.0 // indirect
|
||||
github.com/uber-go/atomic v1.4.0 // indirect
|
||||
github.com/uber/jaeger-client-go v2.17.0+incompatible // indirect
|
||||
github.com/uber/jaeger-lib v2.0.0+incompatible // indirect
|
||||
github.com/ugorji/go v1.1.7 // indirect
|
||||
github.com/willf/bitset v1.1.10 // indirect
|
||||
github.com/willf/bloom v2.0.3+incompatible
|
||||
github.com/wsxiaoys/terminal v0.0.0-20160513160801-0940f3fc43a0 // indirect
|
||||
go.etcd.io/etcd v3.3.15+incompatible
|
||||
go.mongodb.org/mongo-driver v1.1.0 // indirect
|
||||
gocloud.dev v0.16.0
|
||||
gocloud.dev/pubsub/natspubsub v0.16.0
|
||||
gocloud.dev/pubsub/rabbitpubsub v0.16.0
|
||||
golang.org/x/exp v0.0.0-20190829153037-c13cbed26979 // indirect
|
||||
golang.org/x/image v0.0.0-20190829233526-b3c06291d021 // indirect
|
||||
golang.org/x/mobile v0.0.0-20190830201351-c6da95954960 // indirect
|
||||
golang.org/x/net v0.0.0-20190923162816-aa69164e4478
|
||||
golang.org/x/sys v0.0.0-20190922100055-0a153f010e69
|
||||
golang.org/x/net v0.0.0-20190909003024-a7b16738d86b
|
||||
golang.org/x/sys v0.0.0-20190910064555-bbd175535a8b
|
||||
golang.org/x/tools v0.0.0-20190911022129-16c5e0f7d110
|
||||
google.golang.org/api v0.9.0
|
||||
google.golang.org/appengine v1.6.2 // indirect
|
||||
google.golang.org/grpc v1.23.0
|
||||
gopkg.in/jcmturner/goidentity.v3 v3.0.0 // indirect
|
||||
gopkg.in/jcmturner/gokrb5.v7 v7.3.0 // indirect
|
||||
gopkg.in/karlseguin/expect.v1 v1.0.1 // indirect
|
||||
honnef.co/go/tools v0.0.1-2019.2.2 // indirect
|
||||
pack.ag/amqp v0.12.1 // indirect
|
||||
sigs.k8s.io/yaml v1.1.0 // indirect
|
||||
)
|
||||
|
||||
replace github.com/satori/go.uuid v1.2.0 => github.com/satori/go.uuid v0.0.0-20181028125025-b2ce2384e17b
|
||||
@@ -4,7 +4,7 @@
|
||||
|
||||
<groupId>com.github.chrislusf</groupId>
|
||||
<artifactId>seaweedfs-client</artifactId>
|
||||
<version>1.2.3</version>
|
||||
<version>1.2.4</version>
|
||||
|
||||
<parent>
|
||||
<groupId>org.sonatype.oss</groupId>
|
||||
|
||||
@@ -7,6 +7,7 @@ import java.nio.file.Path;
|
||||
import java.nio.file.Paths;
|
||||
import java.util.ArrayList;
|
||||
import java.util.Arrays;
|
||||
import java.util.Iterator;
|
||||
import java.util.List;
|
||||
|
||||
public class FilerClient {
|
||||
@@ -173,17 +174,18 @@ public class FilerClient {
|
||||
}
|
||||
|
||||
public List<FilerProto.Entry> listEntries(String path, String entryPrefix, String lastEntryName, int limit) {
|
||||
List<FilerProto.Entry> entries = filerGrpcClient.getBlockingStub().listEntries(FilerProto.ListEntriesRequest.newBuilder()
|
||||
Iterator<FilerProto.ListEntriesResponse> iter = filerGrpcClient.getBlockingStub().listEntries(FilerProto.ListEntriesRequest.newBuilder()
|
||||
.setDirectory(path)
|
||||
.setPrefix(entryPrefix)
|
||||
.setStartFromFileName(lastEntryName)
|
||||
.setLimit(limit)
|
||||
.build()).getEntriesList();
|
||||
List<FilerProto.Entry> fixedEntries = new ArrayList<>(entries.size());
|
||||
for (FilerProto.Entry entry : entries) {
|
||||
fixedEntries.add(fixEntryAfterReading(entry));
|
||||
.build());
|
||||
List<FilerProto.Entry> entries = new ArrayList<>();
|
||||
while (iter.hasNext()){
|
||||
FilerProto.ListEntriesResponse resp = iter.next();
|
||||
entries.add(fixEntryAfterReading(resp.getEntry()));
|
||||
}
|
||||
return fixedEntries;
|
||||
return entries;
|
||||
}
|
||||
|
||||
public FilerProto.Entry lookupEntry(String directory, String entryName) {
|
||||
|
||||
@@ -12,7 +12,7 @@ service SeaweedFiler {
|
||||
rpc LookupDirectoryEntry (LookupDirectoryEntryRequest) returns (LookupDirectoryEntryResponse) {
|
||||
}
|
||||
|
||||
rpc ListEntries (ListEntriesRequest) returns (ListEntriesResponse) {
|
||||
rpc ListEntries (ListEntriesRequest) returns (stream ListEntriesResponse) {
|
||||
}
|
||||
|
||||
rpc CreateEntry (CreateEntryRequest) returns (CreateEntryResponse) {
|
||||
@@ -64,7 +64,7 @@ message ListEntriesRequest {
|
||||
}
|
||||
|
||||
message ListEntriesResponse {
|
||||
repeated Entry entries = 1;
|
||||
Entry entry = 1;
|
||||
}
|
||||
|
||||
message Entry {
|
||||
|
||||
@@ -127,7 +127,7 @@
|
||||
</snapshotRepository>
|
||||
</distributionManagement>
|
||||
<properties>
|
||||
<seaweedfs.client.version>1.2.3</seaweedfs.client.version>
|
||||
<seaweedfs.client.version>1.2.4</seaweedfs.client.version>
|
||||
<hadoop.version>2.9.2</hadoop.version>
|
||||
</properties>
|
||||
</project>
|
||||
@@ -5,7 +5,7 @@
|
||||
<modelVersion>4.0.0</modelVersion>
|
||||
|
||||
<properties>
|
||||
<seaweedfs.client.version>1.2.3</seaweedfs.client.version>
|
||||
<seaweedfs.client.version>1.2.4</seaweedfs.client.version>
|
||||
<hadoop.version>2.9.2</hadoop.version>
|
||||
</properties>
|
||||
|
||||
|
||||
@@ -127,7 +127,7 @@
|
||||
</snapshotRepository>
|
||||
</distributionManagement>
|
||||
<properties>
|
||||
<seaweedfs.client.version>1.2.3</seaweedfs.client.version>
|
||||
<seaweedfs.client.version>1.2.4</seaweedfs.client.version>
|
||||
<hadoop.version>3.1.1</hadoop.version>
|
||||
</properties>
|
||||
</project>
|
||||
@@ -5,7 +5,7 @@
|
||||
<modelVersion>4.0.0</modelVersion>
|
||||
|
||||
<properties>
|
||||
<seaweedfs.client.version>1.2.3</seaweedfs.client.version>
|
||||
<seaweedfs.client.version>1.2.4</seaweedfs.client.version>
|
||||
<hadoop.version>3.1.1</hadoop.version>
|
||||
</properties>
|
||||
|
||||
|
||||
@@ -73,7 +73,7 @@ func main() {
|
||||
|
||||
}
|
||||
|
||||
func iterateEntries(datBackend backend.DataStorageBackend, idxFile *os.File, visitNeedle func(n *needle.Needle, offset int64)) {
|
||||
func iterateEntries(datBackend backend.BackendStorageFile, idxFile *os.File, visitNeedle func(n *needle.Needle, offset int64)) {
|
||||
// start to read index file
|
||||
var readerOffset int64
|
||||
bytes := make([]byte, 16)
|
||||
|
||||
@@ -29,7 +29,7 @@ type VolumeFileScanner4SeeDat struct {
|
||||
dir string
|
||||
hashes map[string]bool
|
||||
dat *os.File
|
||||
datBackend backend.DataStorageBackend
|
||||
datBackend backend.BackendStorageFile
|
||||
}
|
||||
|
||||
func (scanner *VolumeFileScanner4SeeDat) VisitSuperBlock(superBlock storage.SuperBlock) error {
|
||||
|
||||
@@ -12,6 +12,7 @@ import (
|
||||
"github.com/chrislusf/seaweedfs/weed/pb/master_pb"
|
||||
"github.com/chrislusf/seaweedfs/weed/security"
|
||||
"github.com/chrislusf/seaweedfs/weed/server"
|
||||
"github.com/chrislusf/seaweedfs/weed/storage/backend"
|
||||
"github.com/chrislusf/seaweedfs/weed/util"
|
||||
"github.com/gorilla/mux"
|
||||
"github.com/spf13/viper"
|
||||
@@ -101,6 +102,8 @@ func runMaster(cmd *Command, args []string) bool {
|
||||
|
||||
func startMaster(masterOption MasterOptions, masterWhiteList []string) {
|
||||
|
||||
backend.LoadConfiguration(viper.GetViper())
|
||||
|
||||
myMasterAddress, peers := checkPeers(*masterOption.ip, *masterOption.port, *masterOption.peers)
|
||||
|
||||
r := mux.NewRouter()
|
||||
|
||||
@@ -10,7 +10,7 @@ type MountOptions struct {
|
||||
filer *string
|
||||
filerMountRootPath *string
|
||||
dir *string
|
||||
dirListingLimit *int
|
||||
dirListCacheLimit *int64
|
||||
collection *string
|
||||
replication *string
|
||||
ttlSec *int
|
||||
@@ -31,7 +31,7 @@ func init() {
|
||||
mountOptions.filer = cmdMount.Flag.String("filer", "localhost:8888", "weed filer location")
|
||||
mountOptions.filerMountRootPath = cmdMount.Flag.String("filer.path", "/", "mount this remote path from filer server")
|
||||
mountOptions.dir = cmdMount.Flag.String("dir", ".", "mount weed filer to this directory")
|
||||
mountOptions.dirListingLimit = cmdMount.Flag.Int("dirListLimit", 100000, "limit directory listing size")
|
||||
mountOptions.dirListCacheLimit = cmdMount.Flag.Int64("dirListCacheLimit", 1000000, "limit cache size to speed up directory long format listing")
|
||||
mountOptions.collection = cmdMount.Flag.String("collection", "", "collection to create the files")
|
||||
mountOptions.replication = cmdMount.Flag.String("replication", "", "replication(e.g. 000, 001) to create to files. If empty, let filer decide.")
|
||||
mountOptions.ttlSec = cmdMount.Flag.Int("ttl", 0, "file ttl in seconds")
|
||||
@@ -64,12 +64,12 @@ var cmdMount = &Command{
|
||||
func parseFilerGrpcAddress(filer string) (filerGrpcAddress string, err error) {
|
||||
hostnameAndPort := strings.Split(filer, ":")
|
||||
if len(hostnameAndPort) != 2 {
|
||||
return "", fmt.Errorf("The filer should have hostname:port format: %v", hostnameAndPort)
|
||||
return "", fmt.Errorf("filer should have hostname:port format: %v", hostnameAndPort)
|
||||
}
|
||||
|
||||
filerPort, parseErr := strconv.ParseUint(hostnameAndPort[1], 10, 64)
|
||||
if parseErr != nil {
|
||||
return "", fmt.Errorf("The filer filer port parse error: %v", parseErr)
|
||||
return "", fmt.Errorf("filer port parse error: %v", parseErr)
|
||||
}
|
||||
|
||||
filerGrpcPort := int(filerPort) + 10000
|
||||
|
||||
@@ -7,3 +7,7 @@ import (
|
||||
func osSpecificMountOptions() []fuse.MountOption {
|
||||
return []fuse.MountOption{}
|
||||
}
|
||||
|
||||
func checkMountPointAvailable(dir string) bool {
|
||||
return true
|
||||
}
|
||||
@@ -7,3 +7,7 @@ import (
|
||||
func osSpecificMountOptions() []fuse.MountOption {
|
||||
return []fuse.MountOption{}
|
||||
}
|
||||
|
||||
func checkMountPointAvailable(dir string) bool {
|
||||
return true
|
||||
}
|
||||
@@ -1,11 +1,157 @@
|
||||
package command
|
||||
|
||||
import (
|
||||
"bufio"
|
||||
"fmt"
|
||||
"io"
|
||||
"os"
|
||||
"strings"
|
||||
|
||||
"github.com/seaweedfs/fuse"
|
||||
)
|
||||
|
||||
const (
|
||||
/* 36 35 98:0 /mnt1 /mnt2 rw,noatime master:1 - ext3 /dev/root rw,errors=continue
|
||||
(1)(2)(3) (4) (5) (6) (7) (8) (9) (10) (11)
|
||||
|
||||
(1) mount ID: unique identifier of the mount (may be reused after umount)
|
||||
(2) parent ID: ID of parent (or of self for the top of the mount tree)
|
||||
(3) major:minor: value of st_dev for files on filesystem
|
||||
(4) root: root of the mount within the filesystem
|
||||
(5) mount point: mount point relative to the process's root
|
||||
(6) mount options: per mount options
|
||||
(7) optional fields: zero or more fields of the form "tag[:value]"
|
||||
(8) separator: marks the end of the optional fields
|
||||
(9) filesystem type: name of filesystem of the form "type[.subtype]"
|
||||
(10) mount source: filesystem specific information or "none"
|
||||
(11) super options: per super block options*/
|
||||
mountinfoFormat = "%d %d %d:%d %s %s %s %s"
|
||||
)
|
||||
|
||||
// Info reveals information about a particular mounted filesystem. This
|
||||
// struct is populated from the content in the /proc/<pid>/mountinfo file.
|
||||
type Info struct {
|
||||
// ID is a unique identifier of the mount (may be reused after umount).
|
||||
ID int
|
||||
|
||||
// Parent indicates the ID of the mount parent (or of self for the top of the
|
||||
// mount tree).
|
||||
Parent int
|
||||
|
||||
// Major indicates one half of the device ID which identifies the device class.
|
||||
Major int
|
||||
|
||||
// Minor indicates one half of the device ID which identifies a specific
|
||||
// instance of device.
|
||||
Minor int
|
||||
|
||||
// Root of the mount within the filesystem.
|
||||
Root string
|
||||
|
||||
// Mountpoint indicates the mount point relative to the process's root.
|
||||
Mountpoint string
|
||||
|
||||
// Opts represents mount-specific options.
|
||||
Opts string
|
||||
|
||||
// Optional represents optional fields.
|
||||
Optional string
|
||||
|
||||
// Fstype indicates the type of filesystem, such as EXT3.
|
||||
Fstype string
|
||||
|
||||
// Source indicates filesystem specific information or "none".
|
||||
Source string
|
||||
|
||||
// VfsOpts represents per super block options.
|
||||
VfsOpts string
|
||||
}
|
||||
|
||||
// Mounted determines if a specified mountpoint has been mounted.
|
||||
// On Linux it looks at /proc/self/mountinfo and on Solaris at mnttab.
|
||||
func mounted(mountPoint string) (bool, error) {
|
||||
entries, err := parseMountTable()
|
||||
if err != nil {
|
||||
return false, err
|
||||
}
|
||||
|
||||
// Search the table for the mountPoint
|
||||
for _, e := range entries {
|
||||
if e.Mountpoint == mountPoint {
|
||||
return true, nil
|
||||
}
|
||||
}
|
||||
return false, nil
|
||||
}
|
||||
|
||||
// Parse /proc/self/mountinfo because comparing Dev and ino does not work from
|
||||
// bind mounts
|
||||
func parseMountTable() ([]*Info, error) {
|
||||
f, err := os.Open("/proc/self/mountinfo")
|
||||
if err != nil {
|
||||
return nil, err
|
||||
}
|
||||
defer f.Close()
|
||||
|
||||
return parseInfoFile(f)
|
||||
}
|
||||
|
||||
func parseInfoFile(r io.Reader) ([]*Info, error) {
|
||||
var (
|
||||
s = bufio.NewScanner(r)
|
||||
out []*Info
|
||||
)
|
||||
|
||||
for s.Scan() {
|
||||
if err := s.Err(); err != nil {
|
||||
return nil, err
|
||||
}
|
||||
|
||||
var (
|
||||
p = &Info{}
|
||||
text = s.Text()
|
||||
optionalFields string
|
||||
)
|
||||
|
||||
if _, err := fmt.Sscanf(text, mountinfoFormat,
|
||||
&p.ID, &p.Parent, &p.Major, &p.Minor,
|
||||
&p.Root, &p.Mountpoint, &p.Opts, &optionalFields); err != nil {
|
||||
return nil, fmt.Errorf("Scanning '%s' failed: %s", text, err)
|
||||
}
|
||||
// Safe as mountinfo encodes mountpoints with spaces as \040.
|
||||
index := strings.Index(text, " - ")
|
||||
postSeparatorFields := strings.Fields(text[index+3:])
|
||||
if len(postSeparatorFields) < 3 {
|
||||
return nil, fmt.Errorf("Error found less than 3 fields post '-' in %q", text)
|
||||
}
|
||||
|
||||
if optionalFields != "-" {
|
||||
p.Optional = optionalFields
|
||||
}
|
||||
|
||||
p.Fstype = postSeparatorFields[0]
|
||||
p.Source = postSeparatorFields[1]
|
||||
p.VfsOpts = strings.Join(postSeparatorFields[2:], " ")
|
||||
out = append(out, p)
|
||||
}
|
||||
return out, nil
|
||||
}
|
||||
|
||||
func osSpecificMountOptions() []fuse.MountOption {
|
||||
return []fuse.MountOption{
|
||||
fuse.AllowNonEmptyMount(),
|
||||
}
|
||||
}
|
||||
|
||||
func checkMountPointAvailable(dir string) bool {
|
||||
mountPoint := dir
|
||||
if mountPoint != "/" && strings.HasSuffix(mountPoint, "/") {
|
||||
mountPoint = mountPoint[0 : len(mountPoint)-1]
|
||||
}
|
||||
|
||||
if mounted, err := mounted(mountPoint); err != nil || mounted {
|
||||
return false
|
||||
}
|
||||
|
||||
return true
|
||||
}
|
||||
+18
-11
@@ -12,12 +12,12 @@ import (
|
||||
"strings"
|
||||
"time"
|
||||
|
||||
"github.com/chrislusf/seaweedfs/weed/security"
|
||||
"github.com/jacobsa/daemonize"
|
||||
"github.com/spf13/viper"
|
||||
|
||||
"github.com/chrislusf/seaweedfs/weed/filesys"
|
||||
"github.com/chrislusf/seaweedfs/weed/glog"
|
||||
"github.com/chrislusf/seaweedfs/weed/security"
|
||||
"github.com/chrislusf/seaweedfs/weed/util"
|
||||
"github.com/seaweedfs/fuse"
|
||||
"github.com/seaweedfs/fuse/fs"
|
||||
@@ -43,13 +43,13 @@ func runMount(cmd *Command, args []string) bool {
|
||||
*mountOptions.chunkSizeLimitMB,
|
||||
*mountOptions.allowOthers,
|
||||
*mountOptions.ttlSec,
|
||||
*mountOptions.dirListingLimit,
|
||||
*mountOptions.dirListCacheLimit,
|
||||
os.FileMode(umask),
|
||||
)
|
||||
}
|
||||
|
||||
func RunMount(filer, filerMountRootPath, dir, collection, replication, dataCenter string, chunkSizeLimitMB int,
|
||||
allowOthers bool, ttlSec int, dirListingLimit int, umask os.FileMode) bool {
|
||||
allowOthers bool, ttlSec int, dirListCacheLimit int64, umask os.FileMode) bool {
|
||||
|
||||
util.LoadConfiguration("security", false)
|
||||
|
||||
@@ -88,12 +88,18 @@ func RunMount(filer, filerMountRootPath, dir, collection, replication, dataCente
|
||||
}
|
||||
}
|
||||
|
||||
// Ensure target mount point availability
|
||||
if isValid := checkMountPointAvailable(dir); !isValid {
|
||||
glog.Fatalf("Expected mount to still be active, target mount point: %s, please check!", dir)
|
||||
return false
|
||||
}
|
||||
|
||||
mountName := path.Base(dir)
|
||||
|
||||
options := []fuse.MountOption{
|
||||
fuse.VolumeName(mountName),
|
||||
fuse.FSName("SeaweedFS"),
|
||||
fuse.Subtype("SeaweedFS"),
|
||||
fuse.FSName(filer + ":" + filerMountRootPath),
|
||||
fuse.Subtype("seaweedfs"),
|
||||
fuse.NoAppleDouble(),
|
||||
fuse.NoAppleXattr(),
|
||||
fuse.NoBrowse(),
|
||||
@@ -116,9 +122,9 @@ func RunMount(filer, filerMountRootPath, dir, collection, replication, dataCente
|
||||
|
||||
c, err := fuse.Mount(dir, options...)
|
||||
if err != nil {
|
||||
glog.Fatal(err)
|
||||
glog.V(0).Infof("mount: %v", err)
|
||||
daemonize.SignalOutcome(err)
|
||||
return false
|
||||
return true
|
||||
}
|
||||
|
||||
util.OnInterrupt(func() {
|
||||
@@ -128,9 +134,9 @@ func RunMount(filer, filerMountRootPath, dir, collection, replication, dataCente
|
||||
|
||||
filerGrpcAddress, err := parseFilerGrpcAddress(filer)
|
||||
if err != nil {
|
||||
glog.Fatal(err)
|
||||
glog.V(0).Infof("parseFilerGrpcAddress: %v", err)
|
||||
daemonize.SignalOutcome(err)
|
||||
return false
|
||||
return true
|
||||
}
|
||||
|
||||
mountRoot := filerMountRootPath
|
||||
@@ -149,7 +155,7 @@ func RunMount(filer, filerMountRootPath, dir, collection, replication, dataCente
|
||||
TtlSec: int32(ttlSec),
|
||||
ChunkSizeLimit: int64(chunkSizeLimitMB) * 1024 * 1024,
|
||||
DataCenter: dataCenter,
|
||||
DirListingLimit: dirListingLimit,
|
||||
DirListCacheLimit: dirListCacheLimit,
|
||||
EntryCacheTtl: 3 * time.Second,
|
||||
MountUid: uid,
|
||||
MountGid: gid,
|
||||
@@ -165,8 +171,9 @@ func RunMount(filer, filerMountRootPath, dir, collection, replication, dataCente
|
||||
// check if the mount process has an error to report
|
||||
<-c.Ready
|
||||
if err := c.MountError; err != nil {
|
||||
glog.Fatal(err)
|
||||
glog.V(0).Infof("mount process: %v", err)
|
||||
daemonize.SignalOutcome(err)
|
||||
return true
|
||||
}
|
||||
|
||||
return true
|
||||
|
||||
+10
-18
@@ -59,15 +59,6 @@ const (
|
||||
# $HOME/.seaweedfs/filer.toml
|
||||
# /etc/seaweedfs/filer.toml
|
||||
|
||||
[memory]
|
||||
# local in memory, mostly for testing purpose
|
||||
enabled = false
|
||||
|
||||
[leveldb]
|
||||
# local on disk, mostly for simple single-machine setup, fairly scalable
|
||||
enabled = false
|
||||
dir = "." # directory to store level db files
|
||||
|
||||
[leveldb2]
|
||||
# local on disk, mostly for simple single-machine setup, fairly scalable
|
||||
# faster than previous leveldb, recommended.
|
||||
@@ -95,6 +86,7 @@ password = ""
|
||||
database = "" # create or use an existing database
|
||||
connection_max_idle = 2
|
||||
connection_max_open = 100
|
||||
interpolateParams = false
|
||||
|
||||
[postgres] # or cockroachdb
|
||||
# CREATE TABLE IF NOT EXISTS filemeta (
|
||||
@@ -350,19 +342,19 @@ sleep_minutes = 17 # sleep minutes between each script execution
|
||||
default_filer_url = "http://localhost:8888/"
|
||||
|
||||
[master.sequencer]
|
||||
type = memory # Choose [memory|etcd] type for storing the file id sequence
|
||||
type = "memory" # Choose [memory|etcd] type for storing the file id sequence
|
||||
# when sequencer.type = etcd, set listen client urls of etcd cluster that store file id sequence
|
||||
# example : http://127.0.0.1:2379,http://127.0.0.1:2389
|
||||
sequencer_etcd_urls = http://127.0.0.1:2379
|
||||
sequencer_etcd_urls = "http://127.0.0.1:2379"
|
||||
|
||||
|
||||
[storage.backend.s3]
|
||||
enabled = true
|
||||
aws_access_key_id = "" # if empty, loads from the shared credentials file (~/.aws/credentials).
|
||||
aws_secret_access_key = "" # if empty, loads from the shared credentials file (~/.aws/credentials).
|
||||
region = "us-east-2"
|
||||
bucket = "your_bucket_name" # an existing bucket
|
||||
directory = "/" # destination directory
|
||||
[storage.backend]
|
||||
[storage.backend.s3.default]
|
||||
enabled = false
|
||||
aws_access_key_id = "" # if empty, loads from the shared credentials file (~/.aws/credentials).
|
||||
aws_secret_access_key = "" # if empty, loads from the shared credentials file (~/.aws/credentials).
|
||||
region = "us-east-2"
|
||||
bucket = "your_bucket_name" # an existing bucket
|
||||
|
||||
`
|
||||
)
|
||||
@@ -0,0 +1,44 @@
|
||||
package command
|
||||
|
||||
import (
|
||||
"bytes"
|
||||
"fmt"
|
||||
"testing"
|
||||
|
||||
"github.com/spf13/viper"
|
||||
)
|
||||
|
||||
func TestReadingTomlConfiguration(t *testing.T) {
|
||||
|
||||
viper.SetConfigType("toml")
|
||||
|
||||
// any approach to require this configuration into your program.
|
||||
var tomlExample = []byte(`
|
||||
[database]
|
||||
server = "192.168.1.1"
|
||||
ports = [ 8001, 8001, 8002 ]
|
||||
connection_max = 5000
|
||||
enabled = true
|
||||
|
||||
[servers]
|
||||
|
||||
# You can indent as you please. Tabs or spaces. TOML don't care.
|
||||
[servers.alpha]
|
||||
ip = "10.0.0.1"
|
||||
dc = "eqdc10"
|
||||
|
||||
[servers.beta]
|
||||
ip = "10.0.0.2"
|
||||
dc = "eqdc10"
|
||||
|
||||
`)
|
||||
|
||||
viper.ReadConfig(bytes.NewBuffer(tomlExample))
|
||||
|
||||
fmt.Printf("database is %v\n", viper.Get("database"))
|
||||
fmt.Printf("servers is %v\n", viper.GetStringMap("servers"))
|
||||
|
||||
alpha := viper.Sub("servers.alpha")
|
||||
|
||||
fmt.Printf("alpha ip is %v\n", alpha.GetString("ip"))
|
||||
}
|
||||
+115
-33
@@ -1,6 +1,7 @@
|
||||
package command
|
||||
|
||||
import (
|
||||
"fmt"
|
||||
"net/http"
|
||||
"os"
|
||||
"runtime"
|
||||
@@ -10,7 +11,9 @@ import (
|
||||
"time"
|
||||
|
||||
"github.com/chrislusf/seaweedfs/weed/security"
|
||||
"github.com/chrislusf/seaweedfs/weed/util/httpdown"
|
||||
"github.com/spf13/viper"
|
||||
"google.golang.org/grpc"
|
||||
|
||||
"github.com/chrislusf/seaweedfs/weed/glog"
|
||||
"github.com/chrislusf/seaweedfs/weed/pb/volume_server_pb"
|
||||
@@ -94,7 +97,7 @@ func runVolume(cmd *Command, args []string) bool {
|
||||
|
||||
func (v VolumeServerOptions) startVolumeServer(volumeFolders, maxVolumeCounts, volumeWhiteListOption string) {
|
||||
|
||||
//Set multiple folders and each folder's max volume count limit'
|
||||
// Set multiple folders and each folder's max volume count limit'
|
||||
v.folders = strings.Split(volumeFolders, ",")
|
||||
maxCountStrings := strings.Split(maxVolumeCounts, ",")
|
||||
for _, maxString := range maxCountStrings {
|
||||
@@ -113,7 +116,7 @@ func (v VolumeServerOptions) startVolumeServer(volumeFolders, maxVolumeCounts, v
|
||||
}
|
||||
}
|
||||
|
||||
//security related white list configuration
|
||||
// security related white list configuration
|
||||
if volumeWhiteListOption != "" {
|
||||
v.whiteList = strings.Split(volumeWhiteListOption, ",")
|
||||
}
|
||||
@@ -128,11 +131,10 @@ func (v VolumeServerOptions) startVolumeServer(volumeFolders, maxVolumeCounts, v
|
||||
if *v.publicUrl == "" {
|
||||
*v.publicUrl = *v.ip + ":" + strconv.Itoa(*v.publicPort)
|
||||
}
|
||||
isSeperatedPublicPort := *v.publicPort != *v.port
|
||||
|
||||
volumeMux := http.NewServeMux()
|
||||
publicVolumeMux := volumeMux
|
||||
if isSeperatedPublicPort {
|
||||
if v.isSeparatedPublicPort() {
|
||||
publicVolumeMux = http.NewServeMux()
|
||||
}
|
||||
|
||||
@@ -158,51 +160,131 @@ func (v VolumeServerOptions) startVolumeServer(volumeFolders, maxVolumeCounts, v
|
||||
*v.compactionMBPerSecond,
|
||||
)
|
||||
|
||||
listeningAddress := *v.bindIp + ":" + strconv.Itoa(*v.port)
|
||||
glog.V(0).Infof("Start Seaweed volume server %s at %s", util.VERSION, listeningAddress)
|
||||
listener, e := util.NewListener(listeningAddress, time.Duration(*v.idleConnectionTimeout)*time.Second)
|
||||
if e != nil {
|
||||
glog.Fatalf("Volume server listener error:%v", e)
|
||||
}
|
||||
if isSeperatedPublicPort {
|
||||
publicListeningAddress := *v.bindIp + ":" + strconv.Itoa(*v.publicPort)
|
||||
glog.V(0).Infoln("Start Seaweed volume server", util.VERSION, "public at", publicListeningAddress)
|
||||
publicListener, e := util.NewListener(publicListeningAddress, time.Duration(*v.idleConnectionTimeout)*time.Second)
|
||||
if e != nil {
|
||||
glog.Fatalf("Volume server listener error:%v", e)
|
||||
// starting grpc server
|
||||
grpcS := v.startGrpcService(volumeServer)
|
||||
|
||||
// starting public http server
|
||||
var publicHttpDown httpdown.Server
|
||||
if v.isSeparatedPublicPort() {
|
||||
publicHttpDown = v.startPublicHttpService(publicVolumeMux)
|
||||
if nil == publicHttpDown {
|
||||
glog.Fatalf("start public http service failed")
|
||||
}
|
||||
go func() {
|
||||
if e := http.Serve(publicListener, publicVolumeMux); e != nil {
|
||||
glog.Fatalf("Volume server fail to serve public: %v", e)
|
||||
}
|
||||
}()
|
||||
}
|
||||
|
||||
// starting the cluster http server
|
||||
clusterHttpServer := v.startClusterHttpService(volumeMux)
|
||||
|
||||
stopChain := make(chan struct{})
|
||||
util.OnInterrupt(func() {
|
||||
fmt.Println("volume server has be killed")
|
||||
var startTime time.Time
|
||||
|
||||
// firstly, stop the public http service to prevent from receiving new user request
|
||||
if nil != publicHttpDown {
|
||||
startTime = time.Now()
|
||||
if err := publicHttpDown.Stop(); err != nil {
|
||||
glog.Warningf("stop the public http server failed, %v", err)
|
||||
}
|
||||
delta := time.Now().Sub(startTime).Nanoseconds() / 1e6
|
||||
glog.V(0).Infof("stop public http server, elapsed %dms", delta)
|
||||
}
|
||||
|
||||
startTime = time.Now()
|
||||
if err := clusterHttpServer.Stop(); err != nil {
|
||||
glog.Warningf("stop the cluster http server failed, %v", err)
|
||||
}
|
||||
delta := time.Now().Sub(startTime).Nanoseconds() / 1e6
|
||||
glog.V(0).Infof("graceful stop cluster http server, elapsed [%d]", delta)
|
||||
|
||||
startTime = time.Now()
|
||||
grpcS.GracefulStop()
|
||||
delta = time.Now().Sub(startTime).Nanoseconds() / 1e6
|
||||
glog.V(0).Infof("graceful stop gRPC, elapsed [%d]", delta)
|
||||
|
||||
startTime = time.Now()
|
||||
volumeServer.Shutdown()
|
||||
delta = time.Now().Sub(startTime).Nanoseconds() / 1e6
|
||||
glog.V(0).Infof("stop volume server, elapsed [%d]", delta)
|
||||
|
||||
pprof.StopCPUProfile()
|
||||
|
||||
close(stopChain) // notify exit
|
||||
})
|
||||
|
||||
// starting grpc server
|
||||
select {
|
||||
case <-stopChain:
|
||||
}
|
||||
glog.Warningf("the volume server exit.")
|
||||
}
|
||||
|
||||
// check whether configure the public port
|
||||
func (v VolumeServerOptions) isSeparatedPublicPort() bool {
|
||||
return *v.publicPort != *v.port
|
||||
}
|
||||
|
||||
func (v VolumeServerOptions) startGrpcService(vs volume_server_pb.VolumeServerServer) *grpc.Server {
|
||||
grpcPort := *v.port + 10000
|
||||
grpcL, err := util.NewListener(*v.bindIp+":"+strconv.Itoa(grpcPort), 0)
|
||||
if err != nil {
|
||||
glog.Fatalf("failed to listen on grpc port %d: %v", grpcPort, err)
|
||||
}
|
||||
grpcS := util.NewGrpcServer(security.LoadServerTLS(viper.Sub("grpc"), "volume"))
|
||||
volume_server_pb.RegisterVolumeServerServer(grpcS, volumeServer)
|
||||
volume_server_pb.RegisterVolumeServerServer(grpcS, vs)
|
||||
reflection.Register(grpcS)
|
||||
go grpcS.Serve(grpcL)
|
||||
go func() {
|
||||
if err := grpcS.Serve(grpcL); err != nil {
|
||||
glog.Fatalf("start gRPC service failed, %s", err)
|
||||
}
|
||||
}()
|
||||
return grpcS
|
||||
}
|
||||
|
||||
if viper.GetString("https.volume.key") != "" {
|
||||
if e := http.ServeTLS(listener, volumeMux,
|
||||
viper.GetString("https.volume.cert"), viper.GetString("https.volume.key")); e != nil {
|
||||
glog.Fatalf("Volume server fail to serve: %v", e)
|
||||
}
|
||||
} else {
|
||||
if e := http.Serve(listener, volumeMux); e != nil {
|
||||
glog.Fatalf("Volume server fail to serve: %v", e)
|
||||
}
|
||||
func (v VolumeServerOptions) startPublicHttpService(handler http.Handler) httpdown.Server {
|
||||
publicListeningAddress := *v.bindIp + ":" + strconv.Itoa(*v.publicPort)
|
||||
glog.V(0).Infoln("Start Seaweed volume server", util.VERSION, "public at", publicListeningAddress)
|
||||
publicListener, e := util.NewListener(publicListeningAddress, time.Duration(*v.idleConnectionTimeout)*time.Second)
|
||||
if e != nil {
|
||||
glog.Fatalf("Volume server listener error:%v", e)
|
||||
}
|
||||
|
||||
pubHttp := httpdown.HTTP{StopTimeout: 5 * time.Minute, KillTimeout: 5 * time.Minute}
|
||||
publicHttpDown := pubHttp.Serve(&http.Server{Handler: handler}, publicListener)
|
||||
go func() {
|
||||
if err := publicHttpDown.Wait(); err != nil {
|
||||
glog.Errorf("public http down wait failed, %v", err)
|
||||
}
|
||||
}()
|
||||
|
||||
return publicHttpDown
|
||||
}
|
||||
|
||||
func (v VolumeServerOptions) startClusterHttpService(handler http.Handler) httpdown.Server {
|
||||
var (
|
||||
certFile, keyFile string
|
||||
)
|
||||
if viper.GetString("https.volume.key") != "" {
|
||||
certFile = viper.GetString("https.volume.cert")
|
||||
keyFile = viper.GetString("https.volume.key")
|
||||
}
|
||||
|
||||
listeningAddress := *v.bindIp + ":" + strconv.Itoa(*v.port)
|
||||
glog.V(0).Infof("Start Seaweed volume server %s at %s", util.VERSION, listeningAddress)
|
||||
listener, e := util.NewListener(listeningAddress, time.Duration(*v.idleConnectionTimeout)*time.Second)
|
||||
if e != nil {
|
||||
glog.Fatalf("Volume server listener error:%v", e)
|
||||
}
|
||||
|
||||
httpDown := httpdown.HTTP{
|
||||
KillTimeout: 5 * time.Minute,
|
||||
StopTimeout: 5 * time.Minute,
|
||||
CertFile: certFile,
|
||||
KeyFile: keyFile}
|
||||
clusterHttpServer := httpDown.Serve(&http.Server{Handler: handler}, listener)
|
||||
go func() {
|
||||
if e := clusterHttpServer.Wait(); e != nil {
|
||||
glog.Fatalf("Volume server fail to serve: %v", e)
|
||||
}
|
||||
}()
|
||||
return clusterHttpServer
|
||||
}
|
||||
@@ -10,13 +10,14 @@ import (
|
||||
)
|
||||
|
||||
type AbstractSqlStore struct {
|
||||
DB *sql.DB
|
||||
SqlInsert string
|
||||
SqlUpdate string
|
||||
SqlFind string
|
||||
SqlDelete string
|
||||
SqlListExclusive string
|
||||
SqlListInclusive string
|
||||
DB *sql.DB
|
||||
SqlInsert string
|
||||
SqlUpdate string
|
||||
SqlFind string
|
||||
SqlDelete string
|
||||
SqlDeleteFolderChildren string
|
||||
SqlListExclusive string
|
||||
SqlListInclusive string
|
||||
}
|
||||
|
||||
type TxOrDB interface {
|
||||
@@ -132,6 +133,21 @@ func (store *AbstractSqlStore) DeleteEntry(ctx context.Context, fullpath filer2.
|
||||
return nil
|
||||
}
|
||||
|
||||
func (store *AbstractSqlStore) DeleteFolderChildren(ctx context.Context, fullpath filer2.FullPath) error {
|
||||
|
||||
res, err := store.getTxOrDB(ctx).ExecContext(ctx, store.SqlDeleteFolderChildren, hashToLong(string(fullpath)), fullpath)
|
||||
if err != nil {
|
||||
return fmt.Errorf("deleteFolderChildren %s: %s", fullpath, err)
|
||||
}
|
||||
|
||||
_, err = res.RowsAffected()
|
||||
if err != nil {
|
||||
return fmt.Errorf("deleteFolderChildren %s but no rows affected: %s", fullpath, err)
|
||||
}
|
||||
|
||||
return nil
|
||||
}
|
||||
|
||||
func (store *AbstractSqlStore) ListDirectoryEntries(ctx context.Context, fullpath filer2.FullPath, startFileName string, inclusive bool, limit int) (entries []*filer2.Entry, err error) {
|
||||
|
||||
sqlText := store.SqlListExclusive
|
||||
|
||||
@@ -112,6 +112,17 @@ func (store *CassandraStore) DeleteEntry(ctx context.Context, fullpath filer2.Fu
|
||||
return nil
|
||||
}
|
||||
|
||||
func (store *CassandraStore) DeleteFolderChildren(ctx context.Context, fullpath filer2.FullPath) error {
|
||||
|
||||
if err := store.session.Query(
|
||||
"DELETE FROM filemeta WHERE directory=?",
|
||||
fullpath).Exec(); err != nil {
|
||||
return fmt.Errorf("delete %s : %v", fullpath, err)
|
||||
}
|
||||
|
||||
return nil
|
||||
}
|
||||
|
||||
func (store *CassandraStore) ListDirectoryEntries(ctx context.Context, fullpath filer2.FullPath, startFileName string, inclusive bool,
|
||||
limit int) (entries []*filer2.Entry, err error) {
|
||||
|
||||
|
||||
@@ -123,6 +123,16 @@ func (store *EtcdStore) DeleteEntry(ctx context.Context, fullpath filer2.FullPat
|
||||
return nil
|
||||
}
|
||||
|
||||
func (store *EtcdStore) DeleteFolderChildren(ctx context.Context, fullpath filer2.FullPath) (err error) {
|
||||
directoryPrefix := genDirectoryKeyPrefix(fullpath, "")
|
||||
|
||||
if _, err := store.client.Delete(ctx, string(directoryPrefix), clientv3.WithPrefix()); err != nil {
|
||||
return fmt.Errorf("deleteFolderChildren %s : %v", fullpath, err)
|
||||
}
|
||||
|
||||
return nil
|
||||
}
|
||||
|
||||
func (store *EtcdStore) ListDirectoryEntries(
|
||||
ctx context.Context, fullpath filer2.FullPath, startFileName string, inclusive bool, limit int,
|
||||
) (entries []*filer2.Entry, err error) {
|
||||
|
||||
+7
-65
@@ -3,18 +3,21 @@ package filer2
|
||||
import (
|
||||
"context"
|
||||
"fmt"
|
||||
"google.golang.org/grpc"
|
||||
"math"
|
||||
"os"
|
||||
"path/filepath"
|
||||
"strings"
|
||||
"time"
|
||||
|
||||
"google.golang.org/grpc"
|
||||
|
||||
"github.com/karlseguin/ccache"
|
||||
|
||||
"github.com/chrislusf/seaweedfs/weed/glog"
|
||||
"github.com/chrislusf/seaweedfs/weed/wdclient"
|
||||
"github.com/karlseguin/ccache"
|
||||
)
|
||||
|
||||
const PaginationSize = 1024 * 256
|
||||
|
||||
var (
|
||||
OS_UID = uint32(os.Getuid())
|
||||
OS_GID = uint32(os.Getgid())
|
||||
@@ -32,7 +35,7 @@ func NewFiler(masters []string, grpcDialOption grpc.DialOption) *Filer {
|
||||
f := &Filer{
|
||||
directoryCache: ccache.New(ccache.Configure().MaxSize(1000).ItemsToPrune(100)),
|
||||
MasterClient: wdclient.NewMasterClient(context.Background(), grpcDialOption, "filer", masters),
|
||||
fileIdDeletionChan: make(chan string, 4096),
|
||||
fileIdDeletionChan: make(chan string, PaginationSize),
|
||||
GrpcDialOption: grpcDialOption,
|
||||
}
|
||||
|
||||
@@ -203,67 +206,6 @@ func (f *Filer) FindEntry(ctx context.Context, p FullPath) (entry *Entry, err er
|
||||
return f.store.FindEntry(ctx, p)
|
||||
}
|
||||
|
||||
func (f *Filer) DeleteEntryMetaAndData(ctx context.Context, p FullPath, isRecursive bool, ignoreRecursiveError, shouldDeleteChunks bool) (err error) {
|
||||
entry, err := f.FindEntry(ctx, p)
|
||||
if err != nil {
|
||||
return err
|
||||
}
|
||||
|
||||
if entry.IsDirectory() {
|
||||
limit := int(1)
|
||||
if isRecursive {
|
||||
limit = math.MaxInt32
|
||||
}
|
||||
lastFileName := ""
|
||||
includeLastFile := false
|
||||
for limit > 0 {
|
||||
entries, err := f.ListDirectoryEntries(ctx, p, lastFileName, includeLastFile, 1024)
|
||||
if err != nil {
|
||||
glog.Errorf("list folder %s: %v", p, err)
|
||||
return fmt.Errorf("list folder %s: %v", p, err)
|
||||
}
|
||||
|
||||
if len(entries) == 0 {
|
||||
break
|
||||
}
|
||||
|
||||
if isRecursive {
|
||||
for _, sub := range entries {
|
||||
lastFileName = sub.Name()
|
||||
err = f.DeleteEntryMetaAndData(ctx, sub.FullPath, isRecursive, ignoreRecursiveError, shouldDeleteChunks)
|
||||
if err != nil && !ignoreRecursiveError {
|
||||
return err
|
||||
}
|
||||
limit--
|
||||
if limit <= 0 {
|
||||
break
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
if len(entries) < 1024 {
|
||||
break
|
||||
}
|
||||
}
|
||||
|
||||
f.cacheDelDirectory(string(p))
|
||||
|
||||
}
|
||||
|
||||
if shouldDeleteChunks {
|
||||
f.DeleteChunks(p, entry.Chunks)
|
||||
}
|
||||
|
||||
if p == "/" {
|
||||
return nil
|
||||
}
|
||||
glog.V(3).Infof("deleting entry %v", p)
|
||||
|
||||
f.NotifyUpdateEvent(entry, nil, shouldDeleteChunks)
|
||||
|
||||
return f.store.DeleteEntry(ctx, p)
|
||||
}
|
||||
|
||||
func (f *Filer) ListDirectoryEntries(ctx context.Context, p FullPath, startFileName string, inclusive bool, limit int) ([]*Entry, error) {
|
||||
if strings.HasSuffix(string(p), "/") && len(p) > 1 {
|
||||
p = p[0 : len(p)-1]
|
||||
|
||||
@@ -3,6 +3,8 @@ package filer2
|
||||
import (
|
||||
"context"
|
||||
"fmt"
|
||||
"io"
|
||||
"math"
|
||||
"strings"
|
||||
"sync"
|
||||
|
||||
@@ -112,47 +114,54 @@ func GetEntry(ctx context.Context, filerClient FilerClient, fullFilePath string)
|
||||
return err
|
||||
}
|
||||
|
||||
if resp.Entry != nil {
|
||||
entry = resp.Entry
|
||||
if resp.Entry == nil {
|
||||
glog.V(3).Infof("read %s entry: %v", fullFilePath, entry)
|
||||
return nil
|
||||
}
|
||||
|
||||
entry = resp.Entry
|
||||
return nil
|
||||
})
|
||||
|
||||
return
|
||||
}
|
||||
|
||||
func ReadDirAllEntries(ctx context.Context, filerClient FilerClient, fullDirPath string, fn func(entry *filer_pb.Entry)) (err error) {
|
||||
func ReadDirAllEntries(ctx context.Context, filerClient FilerClient, fullDirPath, prefix string, fn func(entry *filer_pb.Entry, isLast bool)) (err error) {
|
||||
|
||||
err = filerClient.WithFilerClient(ctx, func(client filer_pb.SeaweedFilerClient) error {
|
||||
|
||||
paginationLimit := 1024
|
||||
|
||||
lastEntryName := ""
|
||||
|
||||
request := &filer_pb.ListEntriesRequest{
|
||||
Directory: fullDirPath,
|
||||
Prefix: prefix,
|
||||
StartFromFileName: lastEntryName,
|
||||
Limit: math.MaxUint32,
|
||||
}
|
||||
|
||||
glog.V(3).Infof("read directory: %v", request)
|
||||
stream, err := client.ListEntries(ctx, request)
|
||||
if err != nil {
|
||||
return fmt.Errorf("list %s: %v", fullDirPath, err)
|
||||
}
|
||||
|
||||
var prevEntry *filer_pb.Entry
|
||||
for {
|
||||
|
||||
request := &filer_pb.ListEntriesRequest{
|
||||
Directory: fullDirPath,
|
||||
StartFromFileName: lastEntryName,
|
||||
Limit: uint32(paginationLimit),
|
||||
resp, recvErr := stream.Recv()
|
||||
if recvErr != nil {
|
||||
if recvErr == io.EOF {
|
||||
if prevEntry != nil {
|
||||
fn(prevEntry, true)
|
||||
}
|
||||
break
|
||||
} else {
|
||||
return recvErr
|
||||
}
|
||||
}
|
||||
|
||||
glog.V(3).Infof("read directory: %v", request)
|
||||
resp, err := client.ListEntries(ctx, request)
|
||||
if err != nil {
|
||||
return fmt.Errorf("list %s: %v", fullDirPath, err)
|
||||
if prevEntry != nil {
|
||||
fn(prevEntry, false)
|
||||
}
|
||||
|
||||
for _, entry := range resp.Entries {
|
||||
fn(entry)
|
||||
lastEntryName = entry.Name
|
||||
}
|
||||
|
||||
if len(resp.Entries) < paginationLimit {
|
||||
break
|
||||
}
|
||||
|
||||
prevEntry = resp.Entry
|
||||
}
|
||||
|
||||
return nil
|
||||
|
||||
@@ -0,0 +1,102 @@
|
||||
package filer2
|
||||
|
||||
import (
|
||||
"context"
|
||||
"fmt"
|
||||
|
||||
"github.com/chrislusf/seaweedfs/weed/glog"
|
||||
"github.com/chrislusf/seaweedfs/weed/pb/filer_pb"
|
||||
)
|
||||
|
||||
func (f *Filer) DeleteEntryMetaAndData(ctx context.Context, p FullPath, isRecursive bool, ignoreRecursiveError, shouldDeleteChunks bool) (err error) {
|
||||
if p == "/" {
|
||||
return nil
|
||||
}
|
||||
|
||||
entry, findErr := f.FindEntry(ctx, p)
|
||||
if findErr != nil {
|
||||
return findErr
|
||||
}
|
||||
|
||||
var chunks []*filer_pb.FileChunk
|
||||
chunks = append(chunks, entry.Chunks...)
|
||||
if entry.IsDirectory() {
|
||||
// delete the folder children, not including the folder itself
|
||||
var dirChunks []*filer_pb.FileChunk
|
||||
dirChunks, err = f.doBatchDeleteFolderMetaAndData(ctx, entry, isRecursive, ignoreRecursiveError, shouldDeleteChunks)
|
||||
if err != nil {
|
||||
return fmt.Errorf("delete directory %s: %v", p, err)
|
||||
}
|
||||
chunks = append(chunks, dirChunks...)
|
||||
f.cacheDelDirectory(string(p))
|
||||
}
|
||||
// delete the file or folder
|
||||
err = f.doDeleteEntryMetaAndData(ctx, entry, shouldDeleteChunks)
|
||||
if err != nil {
|
||||
return fmt.Errorf("delete file %s: %v", p, err)
|
||||
}
|
||||
|
||||
if shouldDeleteChunks {
|
||||
go f.DeleteChunks(chunks)
|
||||
}
|
||||
|
||||
return nil
|
||||
}
|
||||
|
||||
func (f *Filer) doBatchDeleteFolderMetaAndData(ctx context.Context, entry *Entry, isRecursive bool, ignoreRecursiveError, shouldDeleteChunks bool) (chunks []*filer_pb.FileChunk, err error) {
|
||||
|
||||
lastFileName := ""
|
||||
includeLastFile := false
|
||||
for {
|
||||
entries, err := f.ListDirectoryEntries(ctx, entry.FullPath, lastFileName, includeLastFile, PaginationSize)
|
||||
if err != nil {
|
||||
glog.Errorf("list folder %s: %v", entry.FullPath, err)
|
||||
return nil, fmt.Errorf("list folder %s: %v", entry.FullPath, err)
|
||||
}
|
||||
if lastFileName == "" && !isRecursive && len(entries) > 0 {
|
||||
// only for first iteration in the loop
|
||||
return nil, fmt.Errorf("fail to delete non-empty folder: %s", entry.FullPath)
|
||||
}
|
||||
|
||||
for _, sub := range entries {
|
||||
lastFileName = sub.Name()
|
||||
var dirChunks []*filer_pb.FileChunk
|
||||
if sub.IsDirectory() {
|
||||
dirChunks, err = f.doBatchDeleteFolderMetaAndData(ctx, sub, isRecursive, ignoreRecursiveError, shouldDeleteChunks)
|
||||
}
|
||||
if err != nil && !ignoreRecursiveError {
|
||||
return nil, err
|
||||
}
|
||||
if shouldDeleteChunks {
|
||||
chunks = append(chunks, dirChunks...)
|
||||
}
|
||||
}
|
||||
|
||||
if len(entries) < PaginationSize {
|
||||
break
|
||||
}
|
||||
}
|
||||
|
||||
f.cacheDelDirectory(string(entry.FullPath))
|
||||
|
||||
glog.V(3).Infof("deleting directory %v", entry.FullPath)
|
||||
|
||||
if storeDeletionErr := f.store.DeleteFolderChildren(ctx, entry.FullPath); storeDeletionErr != nil {
|
||||
return nil, fmt.Errorf("filer store delete: %v", storeDeletionErr)
|
||||
}
|
||||
f.NotifyUpdateEvent(entry, nil, shouldDeleteChunks)
|
||||
|
||||
return chunks, nil
|
||||
}
|
||||
|
||||
func (f *Filer) doDeleteEntryMetaAndData(ctx context.Context, entry *Entry, shouldDeleteChunks bool) (err error) {
|
||||
|
||||
glog.V(3).Infof("deleting entry %v", entry.FullPath)
|
||||
|
||||
if storeDeletionErr := f.store.DeleteEntry(ctx, entry.FullPath); storeDeletionErr != nil {
|
||||
return fmt.Errorf("filer store delete: %v", storeDeletionErr)
|
||||
}
|
||||
f.NotifyUpdateEvent(entry, nil, shouldDeleteChunks)
|
||||
|
||||
return nil
|
||||
}
|
||||
@@ -51,9 +51,8 @@ func (f *Filer) loopProcessingDeletion() {
|
||||
}
|
||||
}
|
||||
|
||||
func (f *Filer) DeleteChunks(fullpath FullPath, chunks []*filer_pb.FileChunk) {
|
||||
func (f *Filer) DeleteChunks(chunks []*filer_pb.FileChunk) {
|
||||
for _, chunk := range chunks {
|
||||
glog.V(3).Infof("deleting %s chunk %s", fullpath, chunk.String())
|
||||
f.fileIdDeletionChan <- chunk.GetFileIdString()
|
||||
}
|
||||
}
|
||||
@@ -70,7 +69,7 @@ func (f *Filer) deleteChunksIfNotNew(oldEntry, newEntry *Entry) {
|
||||
return
|
||||
}
|
||||
if newEntry == nil {
|
||||
f.DeleteChunks(oldEntry.FullPath, oldEntry.Chunks)
|
||||
f.DeleteChunks(oldEntry.Chunks)
|
||||
}
|
||||
|
||||
var toDelete []*filer_pb.FileChunk
|
||||
@@ -84,5 +83,5 @@ func (f *Filer) deleteChunksIfNotNew(oldEntry, newEntry *Entry) {
|
||||
toDelete = append(toDelete, oldChunk)
|
||||
}
|
||||
}
|
||||
f.DeleteChunks(oldEntry.FullPath, toDelete)
|
||||
f.DeleteChunks(toDelete)
|
||||
}
|
||||
@@ -20,6 +20,7 @@ type FilerStore interface {
|
||||
// err == filer2.ErrNotFound if not found
|
||||
FindEntry(context.Context, FullPath) (entry *Entry, err error)
|
||||
DeleteEntry(context.Context, FullPath) (err error)
|
||||
DeleteFolderChildren(context.Context, FullPath) (err error)
|
||||
ListDirectoryEntries(ctx context.Context, dirPath FullPath, startFileName string, includeStartFile bool, limit int) ([]*Entry, error)
|
||||
|
||||
BeginTransaction(ctx context.Context) (context.Context, error)
|
||||
@@ -97,6 +98,16 @@ func (fsw *FilerStoreWrapper) DeleteEntry(ctx context.Context, fp FullPath) (err
|
||||
return fsw.actualStore.DeleteEntry(ctx, fp)
|
||||
}
|
||||
|
||||
func (fsw *FilerStoreWrapper) DeleteFolderChildren(ctx context.Context, fp FullPath) (err error) {
|
||||
stats.FilerStoreCounter.WithLabelValues(fsw.actualStore.GetName(), "deleteFolderChildren").Inc()
|
||||
start := time.Now()
|
||||
defer func() {
|
||||
stats.FilerStoreHistogram.WithLabelValues(fsw.actualStore.GetName(), "deleteFolderChildren").Observe(time.Since(start).Seconds())
|
||||
}()
|
||||
|
||||
return fsw.actualStore.DeleteFolderChildren(ctx, fp)
|
||||
}
|
||||
|
||||
func (fsw *FilerStoreWrapper) ListDirectoryEntries(ctx context.Context, dirPath FullPath, startFileName string, includeStartFile bool, limit int) ([]*Entry, error) {
|
||||
stats.FilerStoreCounter.WithLabelValues(fsw.actualStore.GetName(), "list").Inc()
|
||||
start := time.Now()
|
||||
|
||||
@@ -5,12 +5,13 @@ import (
|
||||
"context"
|
||||
"fmt"
|
||||
|
||||
"github.com/chrislusf/seaweedfs/weed/filer2"
|
||||
"github.com/chrislusf/seaweedfs/weed/glog"
|
||||
weed_util "github.com/chrislusf/seaweedfs/weed/util"
|
||||
"github.com/syndtr/goleveldb/leveldb"
|
||||
"github.com/syndtr/goleveldb/leveldb/opt"
|
||||
leveldb_util "github.com/syndtr/goleveldb/leveldb/util"
|
||||
|
||||
"github.com/chrislusf/seaweedfs/weed/filer2"
|
||||
"github.com/chrislusf/seaweedfs/weed/glog"
|
||||
weed_util "github.com/chrislusf/seaweedfs/weed/util"
|
||||
)
|
||||
|
||||
const (
|
||||
@@ -123,6 +124,34 @@ func (store *LevelDBStore) DeleteEntry(ctx context.Context, fullpath filer2.Full
|
||||
return nil
|
||||
}
|
||||
|
||||
func (store *LevelDBStore) DeleteFolderChildren(ctx context.Context, fullpath filer2.FullPath) (err error) {
|
||||
|
||||
batch := new(leveldb.Batch)
|
||||
|
||||
directoryPrefix := genDirectoryKeyPrefix(fullpath, "")
|
||||
iter := store.db.NewIterator(&leveldb_util.Range{Start: directoryPrefix}, nil)
|
||||
for iter.Next() {
|
||||
key := iter.Key()
|
||||
if !bytes.HasPrefix(key, directoryPrefix) {
|
||||
break
|
||||
}
|
||||
fileName := getNameFromKey(key)
|
||||
if fileName == "" {
|
||||
continue
|
||||
}
|
||||
batch.Delete([]byte(genKey(string(fullpath), fileName)))
|
||||
}
|
||||
iter.Release()
|
||||
|
||||
err = store.db.Write(batch, nil)
|
||||
|
||||
if err != nil {
|
||||
return fmt.Errorf("delete %s : %v", fullpath, err)
|
||||
}
|
||||
|
||||
return nil
|
||||
}
|
||||
|
||||
func (store *LevelDBStore) ListDirectoryEntries(ctx context.Context, fullpath filer2.FullPath, startFileName string, inclusive bool,
|
||||
limit int) (entries []*filer2.Entry, err error) {
|
||||
|
||||
|
||||
@@ -8,12 +8,13 @@ import (
|
||||
"io"
|
||||
"os"
|
||||
|
||||
"github.com/chrislusf/seaweedfs/weed/filer2"
|
||||
"github.com/chrislusf/seaweedfs/weed/glog"
|
||||
weed_util "github.com/chrislusf/seaweedfs/weed/util"
|
||||
"github.com/syndtr/goleveldb/leveldb"
|
||||
"github.com/syndtr/goleveldb/leveldb/opt"
|
||||
leveldb_util "github.com/syndtr/goleveldb/leveldb/util"
|
||||
|
||||
"github.com/chrislusf/seaweedfs/weed/filer2"
|
||||
"github.com/chrislusf/seaweedfs/weed/glog"
|
||||
weed_util "github.com/chrislusf/seaweedfs/weed/util"
|
||||
)
|
||||
|
||||
func init() {
|
||||
@@ -134,6 +135,34 @@ func (store *LevelDB2Store) DeleteEntry(ctx context.Context, fullpath filer2.Ful
|
||||
return nil
|
||||
}
|
||||
|
||||
func (store *LevelDB2Store) DeleteFolderChildren(ctx context.Context, fullpath filer2.FullPath) (err error) {
|
||||
directoryPrefix, partitionId := genDirectoryKeyPrefix(fullpath, "", store.dbCount)
|
||||
|
||||
batch := new(leveldb.Batch)
|
||||
|
||||
iter := store.dbs[partitionId].NewIterator(&leveldb_util.Range{Start: directoryPrefix}, nil)
|
||||
for iter.Next() {
|
||||
key := iter.Key()
|
||||
if !bytes.HasPrefix(key, directoryPrefix) {
|
||||
break
|
||||
}
|
||||
fileName := getNameFromKey(key)
|
||||
if fileName == "" {
|
||||
continue
|
||||
}
|
||||
batch.Delete(append(directoryPrefix, []byte(fileName)...))
|
||||
}
|
||||
iter.Release()
|
||||
|
||||
err = store.dbs[partitionId].Write(batch, nil)
|
||||
|
||||
if err != nil {
|
||||
return fmt.Errorf("delete %s : %v", fullpath, err)
|
||||
}
|
||||
|
||||
return nil
|
||||
}
|
||||
|
||||
func (store *LevelDB2Store) ListDirectoryEntries(ctx context.Context, fullpath filer2.FullPath, startFileName string, inclusive bool,
|
||||
limit int) (entries []*filer2.Entry, err error) {
|
||||
|
||||
|
||||
@@ -1,132 +0,0 @@
|
||||
package memdb
|
||||
|
||||
import (
|
||||
"context"
|
||||
"fmt"
|
||||
"github.com/chrislusf/seaweedfs/weed/filer2"
|
||||
"github.com/chrislusf/seaweedfs/weed/util"
|
||||
"github.com/google/btree"
|
||||
"strings"
|
||||
"sync"
|
||||
)
|
||||
|
||||
func init() {
|
||||
filer2.Stores = append(filer2.Stores, &MemDbStore{})
|
||||
}
|
||||
|
||||
type MemDbStore struct {
|
||||
tree *btree.BTree
|
||||
treeLock sync.Mutex
|
||||
}
|
||||
|
||||
type entryItem struct {
|
||||
*filer2.Entry
|
||||
}
|
||||
|
||||
func (a entryItem) Less(b btree.Item) bool {
|
||||
return strings.Compare(string(a.FullPath), string(b.(entryItem).FullPath)) < 0
|
||||
}
|
||||
|
||||
func (store *MemDbStore) GetName() string {
|
||||
return "memory"
|
||||
}
|
||||
|
||||
func (store *MemDbStore) Initialize(configuration util.Configuration) (err error) {
|
||||
store.tree = btree.New(8)
|
||||
return nil
|
||||
}
|
||||
|
||||
func (store *MemDbStore) BeginTransaction(ctx context.Context) (context.Context, error) {
|
||||
return ctx, nil
|
||||
}
|
||||
func (store *MemDbStore) CommitTransaction(ctx context.Context) error {
|
||||
return nil
|
||||
}
|
||||
func (store *MemDbStore) RollbackTransaction(ctx context.Context) error {
|
||||
return nil
|
||||
}
|
||||
|
||||
func (store *MemDbStore) InsertEntry(ctx context.Context, entry *filer2.Entry) (err error) {
|
||||
// println("inserting", entry.FullPath)
|
||||
store.treeLock.Lock()
|
||||
store.tree.ReplaceOrInsert(entryItem{entry})
|
||||
store.treeLock.Unlock()
|
||||
return nil
|
||||
}
|
||||
|
||||
func (store *MemDbStore) UpdateEntry(ctx context.Context, entry *filer2.Entry) (err error) {
|
||||
if _, err = store.FindEntry(ctx, entry.FullPath); err != nil {
|
||||
return fmt.Errorf("no such file %s : %v", entry.FullPath, err)
|
||||
}
|
||||
store.treeLock.Lock()
|
||||
store.tree.ReplaceOrInsert(entryItem{entry})
|
||||
store.treeLock.Unlock()
|
||||
return nil
|
||||
}
|
||||
|
||||
func (store *MemDbStore) FindEntry(ctx context.Context, fullpath filer2.FullPath) (entry *filer2.Entry, err error) {
|
||||
item := store.tree.Get(entryItem{&filer2.Entry{FullPath: fullpath}})
|
||||
if item == nil {
|
||||
return nil, filer2.ErrNotFound
|
||||
}
|
||||
entry = item.(entryItem).Entry
|
||||
return entry, nil
|
||||
}
|
||||
|
||||
func (store *MemDbStore) DeleteEntry(ctx context.Context, fullpath filer2.FullPath) (err error) {
|
||||
store.treeLock.Lock()
|
||||
store.tree.Delete(entryItem{&filer2.Entry{FullPath: fullpath}})
|
||||
store.treeLock.Unlock()
|
||||
return nil
|
||||
}
|
||||
|
||||
func (store *MemDbStore) ListDirectoryEntries(ctx context.Context, fullpath filer2.FullPath, startFileName string, inclusive bool, limit int) (entries []*filer2.Entry, err error) {
|
||||
|
||||
startFrom := string(fullpath)
|
||||
if startFileName != "" {
|
||||
startFrom = startFrom + "/" + startFileName
|
||||
}
|
||||
|
||||
store.tree.AscendGreaterOrEqual(entryItem{&filer2.Entry{FullPath: filer2.FullPath(startFrom)}},
|
||||
func(item btree.Item) bool {
|
||||
if limit <= 0 {
|
||||
return false
|
||||
}
|
||||
entry := item.(entryItem).Entry
|
||||
// println("checking", entry.FullPath)
|
||||
|
||||
if entry.FullPath == fullpath {
|
||||
// skipping the current directory
|
||||
// println("skipping the folder", entry.FullPath)
|
||||
return true
|
||||
}
|
||||
|
||||
dir, name := entry.FullPath.DirAndName()
|
||||
if name == startFileName {
|
||||
if inclusive {
|
||||
limit--
|
||||
entries = append(entries, entry)
|
||||
}
|
||||
return true
|
||||
}
|
||||
|
||||
// only iterate the same prefix
|
||||
if !strings.HasPrefix(string(entry.FullPath), string(fullpath)) {
|
||||
// println("breaking from", entry.FullPath)
|
||||
return false
|
||||
}
|
||||
|
||||
if dir != string(fullpath) {
|
||||
// this could be items in deeper directories
|
||||
// println("skipping deeper folder", entry.FullPath)
|
||||
return true
|
||||
}
|
||||
// now process the directory items
|
||||
// println("adding entry", entry.FullPath)
|
||||
limit--
|
||||
entries = append(entries, entry)
|
||||
return true
|
||||
},
|
||||
)
|
||||
return entries, nil
|
||||
}
|
||||
@@ -1,149 +0,0 @@
|
||||
package memdb
|
||||
|
||||
import (
|
||||
"context"
|
||||
"github.com/chrislusf/seaweedfs/weed/filer2"
|
||||
"testing"
|
||||
)
|
||||
|
||||
func TestCreateAndFind(t *testing.T) {
|
||||
filer := filer2.NewFiler(nil, nil)
|
||||
store := &MemDbStore{}
|
||||
store.Initialize(nil)
|
||||
filer.SetStore(store)
|
||||
filer.DisableDirectoryCache()
|
||||
|
||||
ctx := context.Background()
|
||||
|
||||
fullpath := filer2.FullPath("/home/chris/this/is/one/file1.jpg")
|
||||
|
||||
entry1 := &filer2.Entry{
|
||||
FullPath: fullpath,
|
||||
Attr: filer2.Attr{
|
||||
Mode: 0440,
|
||||
Uid: 1234,
|
||||
Gid: 5678,
|
||||
},
|
||||
}
|
||||
|
||||
if err := filer.CreateEntry(ctx, entry1); err != nil {
|
||||
t.Errorf("create entry %v: %v", entry1.FullPath, err)
|
||||
return
|
||||
}
|
||||
|
||||
entry, err := filer.FindEntry(ctx, fullpath)
|
||||
|
||||
if err != nil {
|
||||
t.Errorf("find entry: %v", err)
|
||||
return
|
||||
}
|
||||
|
||||
if entry.FullPath != entry1.FullPath {
|
||||
t.Errorf("find wrong entry: %v", entry.FullPath)
|
||||
return
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
func TestCreateFileAndList(t *testing.T) {
|
||||
filer := filer2.NewFiler(nil, nil)
|
||||
store := &MemDbStore{}
|
||||
store.Initialize(nil)
|
||||
filer.SetStore(store)
|
||||
filer.DisableDirectoryCache()
|
||||
|
||||
ctx := context.Background()
|
||||
|
||||
entry1 := &filer2.Entry{
|
||||
FullPath: filer2.FullPath("/home/chris/this/is/one/file1.jpg"),
|
||||
Attr: filer2.Attr{
|
||||
Mode: 0440,
|
||||
Uid: 1234,
|
||||
Gid: 5678,
|
||||
},
|
||||
}
|
||||
|
||||
entry2 := &filer2.Entry{
|
||||
FullPath: filer2.FullPath("/home/chris/this/is/one/file2.jpg"),
|
||||
Attr: filer2.Attr{
|
||||
Mode: 0440,
|
||||
Uid: 1234,
|
||||
Gid: 5678,
|
||||
},
|
||||
}
|
||||
|
||||
filer.CreateEntry(ctx, entry1)
|
||||
filer.CreateEntry(ctx, entry2)
|
||||
|
||||
// checking the 2 files
|
||||
entries, err := filer.ListDirectoryEntries(ctx, filer2.FullPath("/home/chris/this/is/one/"), "", false, 100)
|
||||
|
||||
if err != nil {
|
||||
t.Errorf("list entries: %v", err)
|
||||
return
|
||||
}
|
||||
|
||||
if len(entries) != 2 {
|
||||
t.Errorf("list entries count: %v", len(entries))
|
||||
return
|
||||
}
|
||||
|
||||
if entries[0].FullPath != entry1.FullPath {
|
||||
t.Errorf("find wrong entry 1: %v", entries[0].FullPath)
|
||||
return
|
||||
}
|
||||
|
||||
if entries[1].FullPath != entry2.FullPath {
|
||||
t.Errorf("find wrong entry 2: %v", entries[1].FullPath)
|
||||
return
|
||||
}
|
||||
|
||||
// checking the offset
|
||||
entries, err = filer.ListDirectoryEntries(ctx, filer2.FullPath("/home/chris/this/is/one/"), "file1.jpg", false, 100)
|
||||
if len(entries) != 1 {
|
||||
t.Errorf("list entries count: %v", len(entries))
|
||||
return
|
||||
}
|
||||
|
||||
// checking one upper directory
|
||||
entries, _ = filer.ListDirectoryEntries(ctx, filer2.FullPath("/home/chris/this/is"), "", false, 100)
|
||||
if len(entries) != 1 {
|
||||
t.Errorf("list entries count: %v", len(entries))
|
||||
return
|
||||
}
|
||||
|
||||
// checking root directory
|
||||
entries, _ = filer.ListDirectoryEntries(ctx, filer2.FullPath("/"), "", false, 100)
|
||||
if len(entries) != 1 {
|
||||
t.Errorf("list entries count: %v", len(entries))
|
||||
return
|
||||
}
|
||||
|
||||
// add file3
|
||||
file3Path := filer2.FullPath("/home/chris/this/is/file3.jpg")
|
||||
entry3 := &filer2.Entry{
|
||||
FullPath: file3Path,
|
||||
Attr: filer2.Attr{
|
||||
Mode: 0440,
|
||||
Uid: 1234,
|
||||
Gid: 5678,
|
||||
},
|
||||
}
|
||||
filer.CreateEntry(ctx, entry3)
|
||||
|
||||
// checking one upper directory
|
||||
entries, _ = filer.ListDirectoryEntries(ctx, filer2.FullPath("/home/chris/this/is"), "", false, 100)
|
||||
if len(entries) != 2 {
|
||||
t.Errorf("list entries count: %v", len(entries))
|
||||
return
|
||||
}
|
||||
|
||||
// delete file and count
|
||||
filer.DeleteEntryMetaAndData(ctx, file3Path, false, false, false)
|
||||
entries, _ = filer.ListDirectoryEntries(ctx, filer2.FullPath("/home/chris/this/is"), "", false, 100)
|
||||
if len(entries) != 1 {
|
||||
t.Errorf("list entries count: %v", len(entries))
|
||||
return
|
||||
}
|
||||
|
||||
}
|
||||
@@ -35,19 +35,26 @@ func (store *MysqlStore) Initialize(configuration util.Configuration) (err error
|
||||
configuration.GetString("database"),
|
||||
configuration.GetInt("connection_max_idle"),
|
||||
configuration.GetInt("connection_max_open"),
|
||||
configuration.GetBool("interpolateParams"),
|
||||
)
|
||||
}
|
||||
|
||||
func (store *MysqlStore) initialize(user, password, hostname string, port int, database string, maxIdle, maxOpen int) (err error) {
|
||||
func (store *MysqlStore) initialize(user, password, hostname string, port int, database string, maxIdle, maxOpen int,
|
||||
interpolateParams bool) (err error) {
|
||||
|
||||
store.SqlInsert = "INSERT INTO filemeta (dirhash,name,directory,meta) VALUES(?,?,?,?)"
|
||||
store.SqlUpdate = "UPDATE filemeta SET meta=? WHERE dirhash=? AND name=? AND directory=?"
|
||||
store.SqlFind = "SELECT meta FROM filemeta WHERE dirhash=? AND name=? AND directory=?"
|
||||
store.SqlDelete = "DELETE FROM filemeta WHERE dirhash=? AND name=? AND directory=?"
|
||||
store.SqlDeleteFolderChildren = "DELETE FROM filemeta WHERE dirhash=? AND directory=?"
|
||||
store.SqlListExclusive = "SELECT NAME, meta FROM filemeta WHERE dirhash=? AND name>? AND directory=? ORDER BY NAME ASC LIMIT ?"
|
||||
store.SqlListInclusive = "SELECT NAME, meta FROM filemeta WHERE dirhash=? AND name>=? AND directory=? ORDER BY NAME ASC LIMIT ?"
|
||||
|
||||
sqlUrl := fmt.Sprintf(CONNECTION_URL_PATTERN, user, password, hostname, port, database)
|
||||
if interpolateParams {
|
||||
sqlUrl += "&interpolateParams=true"
|
||||
}
|
||||
|
||||
var dbErr error
|
||||
store.DB, dbErr = sql.Open("mysql", sqlUrl)
|
||||
if dbErr != nil {
|
||||
|
||||
@@ -45,6 +45,7 @@ func (store *PostgresStore) initialize(user, password, hostname string, port int
|
||||
store.SqlUpdate = "UPDATE filemeta SET meta=$1 WHERE dirhash=$2 AND name=$3 AND directory=$4"
|
||||
store.SqlFind = "SELECT meta FROM filemeta WHERE dirhash=$1 AND name=$2 AND directory=$3"
|
||||
store.SqlDelete = "DELETE FROM filemeta WHERE dirhash=$1 AND name=$2 AND directory=$3"
|
||||
store.SqlDeleteFolderChildren = "DELETE FROM filemeta WHERE dirhash=$1 AND directory=$2"
|
||||
store.SqlListExclusive = "SELECT NAME, meta FROM filemeta WHERE dirhash=$1 AND name>$2 AND directory=$3 ORDER BY NAME ASC LIMIT $4"
|
||||
store.SqlListInclusive = "SELECT NAME, meta FROM filemeta WHERE dirhash=$1 AND name>=$2 AND directory=$3 ORDER BY NAME ASC LIMIT $4"
|
||||
|
||||
|
||||
@@ -99,6 +99,24 @@ func (store *UniversalRedisStore) DeleteEntry(ctx context.Context, fullpath file
|
||||
return nil
|
||||
}
|
||||
|
||||
func (store *UniversalRedisStore) DeleteFolderChildren(ctx context.Context, fullpath filer2.FullPath) (err error) {
|
||||
|
||||
members, err := store.Client.SMembers(genDirectoryListKey(string(fullpath))).Result()
|
||||
if err != nil {
|
||||
return fmt.Errorf("delete folder %s : %v", fullpath, err)
|
||||
}
|
||||
|
||||
for _, fileName := range members {
|
||||
path := filer2.NewFullPath(string(fullpath), fileName)
|
||||
_, err = store.Client.Del(string(path)).Result()
|
||||
if err != nil {
|
||||
return fmt.Errorf("delete %s in parent dir: %v", fullpath, err)
|
||||
}
|
||||
}
|
||||
|
||||
return nil
|
||||
}
|
||||
|
||||
func (store *UniversalRedisStore) ListDirectoryEntries(ctx context.Context, fullpath filer2.FullPath, startFileName string, inclusive bool,
|
||||
limit int) (entries []*filer2.Entry, err error) {
|
||||
|
||||
|
||||
@@ -141,6 +141,38 @@ func (store *TikvStore) DeleteEntry(ctx context.Context, fullpath filer2.FullPat
|
||||
return nil
|
||||
}
|
||||
|
||||
func (store *TikvStore) DeleteFolderChildren(ctx context.Context, fullpath filer2.FullPath) (err error) {
|
||||
|
||||
directoryPrefix := genDirectoryKeyPrefix(fullpath, "")
|
||||
|
||||
tx := store.getTx(ctx)
|
||||
|
||||
iter, err := tx.Iter(directoryPrefix, nil)
|
||||
if err != nil {
|
||||
return fmt.Errorf("deleteFolderChildren %s: %v", fullpath, err)
|
||||
}
|
||||
defer iter.Close()
|
||||
for iter.Valid() {
|
||||
key := iter.Key()
|
||||
if !bytes.HasPrefix(key, directoryPrefix) {
|
||||
break
|
||||
}
|
||||
fileName := getNameFromKey(key)
|
||||
if fileName == "" {
|
||||
iter.Next()
|
||||
continue
|
||||
}
|
||||
|
||||
if err = tx.Delete(genKey(string(fullpath), fileName)); err != nil {
|
||||
return fmt.Errorf("delete %s : %v", fullpath, err)
|
||||
}
|
||||
|
||||
iter.Next()
|
||||
}
|
||||
|
||||
return nil
|
||||
}
|
||||
|
||||
func (store *TikvStore) ListDirectoryEntries(ctx context.Context, fullpath filer2.FullPath, startFileName string, inclusive bool,
|
||||
limit int) (entries []*filer2.Entry, err error) {
|
||||
|
||||
|
||||
@@ -55,6 +55,10 @@ func (store *TikvStore) DeleteEntry(ctx context.Context, fullpath filer2.FullPat
|
||||
return fmt.Errorf("not implemented for 32 bit computers")
|
||||
}
|
||||
|
||||
func (store *TikvStore) DeleteFolderChildren(ctx context.Context, fullpath filer2.FullPath) (err error) {
|
||||
return fmt.Errorf("not implemented for 32 bit computers")
|
||||
}
|
||||
|
||||
func (store *TikvStore) ListDirectoryEntries(ctx context.Context, fullpath filer2.FullPath, startFileName string, inclusive bool,
|
||||
limit int) (entries []*filer2.Entry, err error) {
|
||||
return nil, fmt.Errorf("not implemented for 32 bit computers")
|
||||
|
||||
+38
-66
@@ -30,6 +30,8 @@ var _ = fs.NodeSetattrer(&Dir{})
|
||||
|
||||
func (dir *Dir) Attr(ctx context.Context, attr *fuse.Attr) error {
|
||||
|
||||
glog.V(3).Infof("dir Attr %s", dir.Path)
|
||||
|
||||
// https://github.com/bazil/fuse/issues/196
|
||||
attr.Valid = time.Second
|
||||
|
||||
@@ -39,7 +41,12 @@ func (dir *Dir) Attr(ctx context.Context, attr *fuse.Attr) error {
|
||||
}
|
||||
|
||||
item := dir.wfs.listDirectoryEntriesCache.Get(dir.Path)
|
||||
var entry *filer_pb.Entry
|
||||
if item != nil && !item.Expired() {
|
||||
entry = item.Value().(*filer_pb.Entry)
|
||||
}
|
||||
|
||||
if entry != nil {
|
||||
entry := item.Value().(*filer_pb.Entry)
|
||||
|
||||
attr.Mtime = time.Unix(entry.Attributes.Mtime, 0)
|
||||
@@ -51,11 +58,16 @@ func (dir *Dir) Attr(ctx context.Context, attr *fuse.Attr) error {
|
||||
return nil
|
||||
}
|
||||
|
||||
glog.V(3).Infof("dir Attr cache miss %s", dir.Path)
|
||||
|
||||
entry, err := filer2.GetEntry(ctx, dir.wfs, dir.Path)
|
||||
if err != nil {
|
||||
glog.V(2).Infof("read dir %s attr: %v, error: %v", dir.Path, dir.attributes, err)
|
||||
return err
|
||||
}
|
||||
if entry == nil {
|
||||
return fuse.ENOENT
|
||||
}
|
||||
dir.attributes = entry.Attributes
|
||||
|
||||
glog.V(2).Infof("dir %s: %v perm: %v", dir.Path, dir.attributes, os.FileMode(dir.attributes.FileMode))
|
||||
@@ -172,6 +184,8 @@ func (dir *Dir) Mkdir(ctx context.Context, req *fuse.MkdirRequest) (fs.Node, err
|
||||
|
||||
func (dir *Dir) Lookup(ctx context.Context, req *fuse.LookupRequest, resp *fuse.LookupResponse) (node fs.Node, err error) {
|
||||
|
||||
glog.V(4).Infof("dir Lookup %s: %s", dir.Path, req.Name)
|
||||
|
||||
var entry *filer_pb.Entry
|
||||
fullFilePath := path.Join(dir.Path, req.Name)
|
||||
|
||||
@@ -181,10 +195,14 @@ func (dir *Dir) Lookup(ctx context.Context, req *fuse.LookupRequest, resp *fuse.
|
||||
}
|
||||
|
||||
if entry == nil {
|
||||
glog.V(3).Infof("dir Lookup cache miss %s", fullFilePath)
|
||||
entry, err = filer2.GetEntry(ctx, dir.wfs, fullFilePath)
|
||||
if err != nil {
|
||||
return nil, err
|
||||
}
|
||||
dir.wfs.listDirectoryEntriesCache.Set(fullFilePath, entry, 5*time.Minute)
|
||||
} else {
|
||||
glog.V(4).Infof("dir Lookup cache hit %s", fullFilePath)
|
||||
}
|
||||
|
||||
if entry != nil {
|
||||
@@ -209,52 +227,24 @@ func (dir *Dir) Lookup(ctx context.Context, req *fuse.LookupRequest, resp *fuse.
|
||||
|
||||
func (dir *Dir) ReadDirAll(ctx context.Context) (ret []fuse.Dirent, err error) {
|
||||
|
||||
err = dir.wfs.WithFilerClient(ctx, func(client filer_pb.SeaweedFilerClient) error {
|
||||
glog.V(3).Infof("dir ReadDirAll %s", dir.Path)
|
||||
|
||||
paginationLimit := 1024
|
||||
remaining := dir.wfs.option.DirListingLimit
|
||||
|
||||
lastEntryName := ""
|
||||
|
||||
for remaining >= 0 {
|
||||
|
||||
request := &filer_pb.ListEntriesRequest{
|
||||
Directory: dir.Path,
|
||||
StartFromFileName: lastEntryName,
|
||||
Limit: uint32(paginationLimit),
|
||||
}
|
||||
|
||||
glog.V(4).Infof("read directory: %v", request)
|
||||
resp, err := client.ListEntries(ctx, request)
|
||||
if err != nil {
|
||||
glog.V(0).Infof("list %s: %v", dir.Path, err)
|
||||
return fuse.EIO
|
||||
}
|
||||
|
||||
cacheTtl := estimatedCacheTtl(len(resp.Entries))
|
||||
|
||||
for _, entry := range resp.Entries {
|
||||
if entry.IsDirectory {
|
||||
dirent := fuse.Dirent{Name: entry.Name, Type: fuse.DT_Dir}
|
||||
ret = append(ret, dirent)
|
||||
} else {
|
||||
dirent := fuse.Dirent{Name: entry.Name, Type: fuse.DT_File}
|
||||
ret = append(ret, dirent)
|
||||
}
|
||||
dir.wfs.listDirectoryEntriesCache.Set(path.Join(dir.Path, entry.Name), entry, cacheTtl)
|
||||
lastEntryName = entry.Name
|
||||
}
|
||||
|
||||
remaining -= len(resp.Entries)
|
||||
|
||||
if len(resp.Entries) < paginationLimit {
|
||||
break
|
||||
}
|
||||
cacheTtl := 5 * time.Minute
|
||||
|
||||
readErr := filer2.ReadDirAllEntries(ctx, dir.wfs, dir.Path, "", func(entry *filer_pb.Entry, isLast bool) {
|
||||
if entry.IsDirectory {
|
||||
dirent := fuse.Dirent{Name: entry.Name, Type: fuse.DT_Dir}
|
||||
ret = append(ret, dirent)
|
||||
} else {
|
||||
dirent := fuse.Dirent{Name: entry.Name, Type: fuse.DT_File}
|
||||
ret = append(ret, dirent)
|
||||
}
|
||||
|
||||
return nil
|
||||
dir.wfs.listDirectoryEntriesCache.Set(path.Join(dir.Path, entry.Name), entry, cacheTtl)
|
||||
})
|
||||
if readErr != nil {
|
||||
glog.V(0).Infof("list %s: %v", dir.Path, err)
|
||||
return ret, fuse.EIO
|
||||
}
|
||||
|
||||
return ret, err
|
||||
}
|
||||
@@ -278,6 +268,8 @@ func (dir *Dir) removeOneFile(ctx context.Context, req *fuse.RemoveRequest) erro
|
||||
|
||||
dir.wfs.deleteFileChunks(ctx, entry.Chunks)
|
||||
|
||||
dir.wfs.listDirectoryEntriesCache.Delete(path.Join(dir.Path, req.Name))
|
||||
|
||||
return dir.wfs.WithFilerClient(ctx, func(client filer_pb.SeaweedFilerClient) error {
|
||||
|
||||
request := &filer_pb.DeleteEntryRequest{
|
||||
@@ -293,8 +285,6 @@ func (dir *Dir) removeOneFile(ctx context.Context, req *fuse.RemoveRequest) erro
|
||||
return fuse.ENOENT
|
||||
}
|
||||
|
||||
dir.wfs.listDirectoryEntriesCache.Delete(path.Join(dir.Path, req.Name))
|
||||
|
||||
return nil
|
||||
})
|
||||
|
||||
@@ -302,6 +292,8 @@ func (dir *Dir) removeOneFile(ctx context.Context, req *fuse.RemoveRequest) erro
|
||||
|
||||
func (dir *Dir) removeFolder(ctx context.Context, req *fuse.RemoveRequest) error {
|
||||
|
||||
dir.wfs.listDirectoryEntriesCache.Delete(path.Join(dir.Path, req.Name))
|
||||
|
||||
return dir.wfs.WithFilerClient(ctx, func(client filer_pb.SeaweedFilerClient) error {
|
||||
|
||||
request := &filer_pb.DeleteEntryRequest{
|
||||
@@ -317,8 +309,6 @@ func (dir *Dir) removeFolder(ctx context.Context, req *fuse.RemoveRequest) error
|
||||
return fuse.ENOENT
|
||||
}
|
||||
|
||||
dir.wfs.listDirectoryEntriesCache.Delete(path.Join(dir.Path, req.Name))
|
||||
|
||||
return nil
|
||||
})
|
||||
|
||||
@@ -347,6 +337,8 @@ func (dir *Dir) Setattr(ctx context.Context, req *fuse.SetattrRequest, resp *fus
|
||||
dir.attributes.Mtime = req.Mtime.Unix()
|
||||
}
|
||||
|
||||
dir.wfs.listDirectoryEntriesCache.Delete(dir.Path)
|
||||
|
||||
parentDir, name := filer2.FullPath(dir.Path).DirAndName()
|
||||
return dir.wfs.WithFilerClient(ctx, func(client filer_pb.SeaweedFilerClient) error {
|
||||
|
||||
@@ -365,27 +357,7 @@ func (dir *Dir) Setattr(ctx context.Context, req *fuse.SetattrRequest, resp *fus
|
||||
return fuse.EIO
|
||||
}
|
||||
|
||||
dir.wfs.listDirectoryEntriesCache.Delete(dir.Path)
|
||||
|
||||
return nil
|
||||
})
|
||||
|
||||
}
|
||||
|
||||
func estimatedCacheTtl(numEntries int) time.Duration {
|
||||
if numEntries < 100 {
|
||||
// 30 ms per entry
|
||||
return 3 * time.Second
|
||||
}
|
||||
if numEntries < 1000 {
|
||||
// 10 ms per entry
|
||||
return 10 * time.Second
|
||||
}
|
||||
if numEntries < 10000 {
|
||||
// 10 ms per entry
|
||||
return 100 * time.Second
|
||||
}
|
||||
|
||||
// 2 ms per entry
|
||||
return time.Duration(numEntries*2) * time.Millisecond
|
||||
}
|
||||
+15
-2
@@ -36,6 +36,8 @@ func (file *File) fullpath() string {
|
||||
|
||||
func (file *File) Attr(ctx context.Context, attr *fuse.Attr) error {
|
||||
|
||||
glog.V(4).Infof("file Attr %s", file.fullpath())
|
||||
|
||||
if err := file.maybeLoadAttributes(ctx); err != nil {
|
||||
return err
|
||||
}
|
||||
@@ -54,7 +56,7 @@ func (file *File) Attr(ctx context.Context, attr *fuse.Attr) error {
|
||||
|
||||
func (file *File) Open(ctx context.Context, req *fuse.OpenRequest, resp *fuse.OpenResponse) (fs.Handle, error) {
|
||||
|
||||
glog.V(3).Infof("%v file open %+v", file.fullpath(), req)
|
||||
glog.V(4).Infof("file %v open %+v", file.fullpath(), req)
|
||||
|
||||
file.isOpen = true
|
||||
|
||||
@@ -109,6 +111,8 @@ func (file *File) Setattr(ctx context.Context, req *fuse.SetattrRequest, resp *f
|
||||
return nil
|
||||
}
|
||||
|
||||
file.wfs.listDirectoryEntriesCache.Delete(file.fullpath())
|
||||
|
||||
return file.wfs.WithFilerClient(ctx, func(client filer_pb.SeaweedFilerClient) error {
|
||||
|
||||
request := &filer_pb.UpdateEntryRequest{
|
||||
@@ -139,11 +143,20 @@ func (file *File) Fsync(ctx context.Context, req *fuse.FsyncRequest) error {
|
||||
func (file *File) maybeLoadAttributes(ctx context.Context) error {
|
||||
if file.entry == nil || !file.isOpen {
|
||||
item := file.wfs.listDirectoryEntriesCache.Get(file.fullpath())
|
||||
var entry *filer_pb.Entry
|
||||
if item != nil && !item.Expired() {
|
||||
entry := item.Value().(*filer_pb.Entry)
|
||||
entry = item.Value().(*filer_pb.Entry)
|
||||
}
|
||||
if entry != nil {
|
||||
|
||||
glog.V(4).Infof("file read attr cache hit %s", file.fullpath())
|
||||
|
||||
file.setEntry(entry)
|
||||
// glog.V(1).Infof("file attr read cached %v attributes", file.Name)
|
||||
} else {
|
||||
|
||||
glog.V(3).Infof("file read attr cache miss %s", file.fullpath())
|
||||
|
||||
err := file.wfs.WithFilerClient(ctx, func(client filer_pb.SeaweedFilerClient) error {
|
||||
|
||||
request := &filer_pb.LookupDirectoryEntryRequest{
|
||||
|
||||
@@ -101,9 +101,10 @@ func (fh *FileHandle) Write(ctx context.Context, req *fuse.WriteRequest, resp *f
|
||||
fh.dirtyMetadata = true
|
||||
}
|
||||
|
||||
fh.f.addChunks(chunks)
|
||||
|
||||
if len(chunks) > 0 {
|
||||
|
||||
fh.f.addChunks(chunks)
|
||||
|
||||
fh.dirtyMetadata = true
|
||||
}
|
||||
|
||||
|
||||
+5
-4
@@ -8,13 +8,14 @@ import (
|
||||
"sync"
|
||||
"time"
|
||||
|
||||
"github.com/karlseguin/ccache"
|
||||
"google.golang.org/grpc"
|
||||
|
||||
"github.com/chrislusf/seaweedfs/weed/glog"
|
||||
"github.com/chrislusf/seaweedfs/weed/pb/filer_pb"
|
||||
"github.com/chrislusf/seaweedfs/weed/util"
|
||||
"github.com/karlseguin/ccache"
|
||||
"github.com/seaweedfs/fuse"
|
||||
"github.com/seaweedfs/fuse/fs"
|
||||
"google.golang.org/grpc"
|
||||
)
|
||||
|
||||
type Option struct {
|
||||
@@ -26,7 +27,7 @@ type Option struct {
|
||||
TtlSec int32
|
||||
ChunkSizeLimit int64
|
||||
DataCenter string
|
||||
DirListingLimit int
|
||||
DirListCacheLimit int64
|
||||
EntryCacheTtl time.Duration
|
||||
Umask os.FileMode
|
||||
|
||||
@@ -60,7 +61,7 @@ type statsCache struct {
|
||||
func NewSeaweedFileSystem(option *Option) *WFS {
|
||||
wfs := &WFS{
|
||||
option: option,
|
||||
listDirectoryEntriesCache: ccache.New(ccache.Configure().MaxSize(1024 * 8).ItemsToPrune(100)),
|
||||
listDirectoryEntriesCache: ccache.New(ccache.Configure().MaxSize(option.DirListCacheLimit * 3).ItemsToPrune(100)),
|
||||
pathToHandleIndex: make(map[string]int),
|
||||
bufPool: sync.Pool{
|
||||
New: func() interface{} {
|
||||
|
||||
@@ -76,7 +76,7 @@ func (k *KafkaQueue) handleError() {
|
||||
for {
|
||||
err := <-k.producer.Errors()
|
||||
if err != nil {
|
||||
glog.Errorf("producer message error, partition:%d offset:%d key:%v valus:%s error(%v) topic:%s", err.Msg.Partition, err.Msg.Offset, err.Msg.Key, err.Msg.Value, err.Err, k.topic)
|
||||
glog.Errorf("producer message error, partition:%d offset:%d key:%v value:%s error(%v) topic:%s", err.Msg.Partition, err.Msg.Offset, err.Msg.Key, err.Msg.Value, err.Err, k.topic)
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -107,7 +107,7 @@ func DeleteFilesWithLookupVolumeId(grpcDialOption grpc.DialOption, fileIds []str
|
||||
ret = append(ret, result...)
|
||||
}
|
||||
|
||||
glog.V(0).Infof("deleted %d items", len(ret))
|
||||
glog.V(1).Infof("deleted %d items", len(ret))
|
||||
|
||||
return ret, err
|
||||
}
|
||||
|
||||
+2
-2
@@ -12,7 +12,7 @@ service SeaweedFiler {
|
||||
rpc LookupDirectoryEntry (LookupDirectoryEntryRequest) returns (LookupDirectoryEntryResponse) {
|
||||
}
|
||||
|
||||
rpc ListEntries (ListEntriesRequest) returns (ListEntriesResponse) {
|
||||
rpc ListEntries (ListEntriesRequest) returns (stream ListEntriesResponse) {
|
||||
}
|
||||
|
||||
rpc CreateEntry (CreateEntryRequest) returns (CreateEntryResponse) {
|
||||
@@ -64,7 +64,7 @@ message ListEntriesRequest {
|
||||
}
|
||||
|
||||
message ListEntriesResponse {
|
||||
repeated Entry entries = 1;
|
||||
Entry entry = 1;
|
||||
}
|
||||
|
||||
message Entry {
|
||||
|
||||
+159
-131
@@ -151,7 +151,7 @@ func (m *ListEntriesRequest) GetLimit() uint32 {
|
||||
}
|
||||
|
||||
type ListEntriesResponse struct {
|
||||
Entries []*Entry `protobuf:"bytes,1,rep,name=entries" json:"entries,omitempty"`
|
||||
Entry *Entry `protobuf:"bytes,1,opt,name=entry" json:"entry,omitempty"`
|
||||
}
|
||||
|
||||
func (m *ListEntriesResponse) Reset() { *m = ListEntriesResponse{} }
|
||||
@@ -159,9 +159,9 @@ func (m *ListEntriesResponse) String() string { return proto.CompactT
|
||||
func (*ListEntriesResponse) ProtoMessage() {}
|
||||
func (*ListEntriesResponse) Descriptor() ([]byte, []int) { return fileDescriptor0, []int{3} }
|
||||
|
||||
func (m *ListEntriesResponse) GetEntries() []*Entry {
|
||||
func (m *ListEntriesResponse) GetEntry() *Entry {
|
||||
if m != nil {
|
||||
return m.Entries
|
||||
return m.Entry
|
||||
}
|
||||
return nil
|
||||
}
|
||||
@@ -1036,7 +1036,7 @@ const _ = grpc.SupportPackageIsVersion4
|
||||
|
||||
type SeaweedFilerClient interface {
|
||||
LookupDirectoryEntry(ctx context.Context, in *LookupDirectoryEntryRequest, opts ...grpc.CallOption) (*LookupDirectoryEntryResponse, error)
|
||||
ListEntries(ctx context.Context, in *ListEntriesRequest, opts ...grpc.CallOption) (*ListEntriesResponse, error)
|
||||
ListEntries(ctx context.Context, in *ListEntriesRequest, opts ...grpc.CallOption) (SeaweedFiler_ListEntriesClient, error)
|
||||
CreateEntry(ctx context.Context, in *CreateEntryRequest, opts ...grpc.CallOption) (*CreateEntryResponse, error)
|
||||
UpdateEntry(ctx context.Context, in *UpdateEntryRequest, opts ...grpc.CallOption) (*UpdateEntryResponse, error)
|
||||
DeleteEntry(ctx context.Context, in *DeleteEntryRequest, opts ...grpc.CallOption) (*DeleteEntryResponse, error)
|
||||
@@ -1065,13 +1065,36 @@ func (c *seaweedFilerClient) LookupDirectoryEntry(ctx context.Context, in *Looku
|
||||
return out, nil
|
||||
}
|
||||
|
||||
func (c *seaweedFilerClient) ListEntries(ctx context.Context, in *ListEntriesRequest, opts ...grpc.CallOption) (*ListEntriesResponse, error) {
|
||||
out := new(ListEntriesResponse)
|
||||
err := grpc.Invoke(ctx, "/filer_pb.SeaweedFiler/ListEntries", in, out, c.cc, opts...)
|
||||
func (c *seaweedFilerClient) ListEntries(ctx context.Context, in *ListEntriesRequest, opts ...grpc.CallOption) (SeaweedFiler_ListEntriesClient, error) {
|
||||
stream, err := grpc.NewClientStream(ctx, &_SeaweedFiler_serviceDesc.Streams[0], c.cc, "/filer_pb.SeaweedFiler/ListEntries", opts...)
|
||||
if err != nil {
|
||||
return nil, err
|
||||
}
|
||||
return out, nil
|
||||
x := &seaweedFilerListEntriesClient{stream}
|
||||
if err := x.ClientStream.SendMsg(in); err != nil {
|
||||
return nil, err
|
||||
}
|
||||
if err := x.ClientStream.CloseSend(); err != nil {
|
||||
return nil, err
|
||||
}
|
||||
return x, nil
|
||||
}
|
||||
|
||||
type SeaweedFiler_ListEntriesClient interface {
|
||||
Recv() (*ListEntriesResponse, error)
|
||||
grpc.ClientStream
|
||||
}
|
||||
|
||||
type seaweedFilerListEntriesClient struct {
|
||||
grpc.ClientStream
|
||||
}
|
||||
|
||||
func (x *seaweedFilerListEntriesClient) Recv() (*ListEntriesResponse, error) {
|
||||
m := new(ListEntriesResponse)
|
||||
if err := x.ClientStream.RecvMsg(m); err != nil {
|
||||
return nil, err
|
||||
}
|
||||
return m, nil
|
||||
}
|
||||
|
||||
func (c *seaweedFilerClient) CreateEntry(ctx context.Context, in *CreateEntryRequest, opts ...grpc.CallOption) (*CreateEntryResponse, error) {
|
||||
@@ -1159,7 +1182,7 @@ func (c *seaweedFilerClient) GetFilerConfiguration(ctx context.Context, in *GetF
|
||||
|
||||
type SeaweedFilerServer interface {
|
||||
LookupDirectoryEntry(context.Context, *LookupDirectoryEntryRequest) (*LookupDirectoryEntryResponse, error)
|
||||
ListEntries(context.Context, *ListEntriesRequest) (*ListEntriesResponse, error)
|
||||
ListEntries(*ListEntriesRequest, SeaweedFiler_ListEntriesServer) error
|
||||
CreateEntry(context.Context, *CreateEntryRequest) (*CreateEntryResponse, error)
|
||||
UpdateEntry(context.Context, *UpdateEntryRequest) (*UpdateEntryResponse, error)
|
||||
DeleteEntry(context.Context, *DeleteEntryRequest) (*DeleteEntryResponse, error)
|
||||
@@ -1193,22 +1216,25 @@ func _SeaweedFiler_LookupDirectoryEntry_Handler(srv interface{}, ctx context.Con
|
||||
return interceptor(ctx, in, info, handler)
|
||||
}
|
||||
|
||||
func _SeaweedFiler_ListEntries_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) {
|
||||
in := new(ListEntriesRequest)
|
||||
if err := dec(in); err != nil {
|
||||
return nil, err
|
||||
func _SeaweedFiler_ListEntries_Handler(srv interface{}, stream grpc.ServerStream) error {
|
||||
m := new(ListEntriesRequest)
|
||||
if err := stream.RecvMsg(m); err != nil {
|
||||
return err
|
||||
}
|
||||
if interceptor == nil {
|
||||
return srv.(SeaweedFilerServer).ListEntries(ctx, in)
|
||||
}
|
||||
info := &grpc.UnaryServerInfo{
|
||||
Server: srv,
|
||||
FullMethod: "/filer_pb.SeaweedFiler/ListEntries",
|
||||
}
|
||||
handler := func(ctx context.Context, req interface{}) (interface{}, error) {
|
||||
return srv.(SeaweedFilerServer).ListEntries(ctx, req.(*ListEntriesRequest))
|
||||
}
|
||||
return interceptor(ctx, in, info, handler)
|
||||
return srv.(SeaweedFilerServer).ListEntries(m, &seaweedFilerListEntriesServer{stream})
|
||||
}
|
||||
|
||||
type SeaweedFiler_ListEntriesServer interface {
|
||||
Send(*ListEntriesResponse) error
|
||||
grpc.ServerStream
|
||||
}
|
||||
|
||||
type seaweedFilerListEntriesServer struct {
|
||||
grpc.ServerStream
|
||||
}
|
||||
|
||||
func (x *seaweedFilerListEntriesServer) Send(m *ListEntriesResponse) error {
|
||||
return x.ServerStream.SendMsg(m)
|
||||
}
|
||||
|
||||
func _SeaweedFiler_CreateEntry_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) {
|
||||
@@ -1381,10 +1407,6 @@ var _SeaweedFiler_serviceDesc = grpc.ServiceDesc{
|
||||
MethodName: "LookupDirectoryEntry",
|
||||
Handler: _SeaweedFiler_LookupDirectoryEntry_Handler,
|
||||
},
|
||||
{
|
||||
MethodName: "ListEntries",
|
||||
Handler: _SeaweedFiler_ListEntries_Handler,
|
||||
},
|
||||
{
|
||||
MethodName: "CreateEntry",
|
||||
Handler: _SeaweedFiler_CreateEntry_Handler,
|
||||
@@ -1422,113 +1444,119 @@ var _SeaweedFiler_serviceDesc = grpc.ServiceDesc{
|
||||
Handler: _SeaweedFiler_GetFilerConfiguration_Handler,
|
||||
},
|
||||
},
|
||||
Streams: []grpc.StreamDesc{},
|
||||
Streams: []grpc.StreamDesc{
|
||||
{
|
||||
StreamName: "ListEntries",
|
||||
Handler: _SeaweedFiler_ListEntries_Handler,
|
||||
ServerStreams: true,
|
||||
},
|
||||
},
|
||||
Metadata: "filer.proto",
|
||||
}
|
||||
|
||||
func init() { proto.RegisterFile("filer.proto", fileDescriptor0) }
|
||||
|
||||
var fileDescriptor0 = []byte{
|
||||
// 1608 bytes of a gzipped FileDescriptorProto
|
||||
0x1f, 0x8b, 0x08, 0x00, 0x00, 0x09, 0x6e, 0x88, 0x02, 0xff, 0xb4, 0x58, 0x49, 0x6f, 0xdc, 0x46,
|
||||
0x16, 0x36, 0x7b, 0xe7, 0xeb, 0x6e, 0x5b, 0x2a, 0xc9, 0x36, 0xdd, 0x5a, 0x46, 0xa6, 0xc6, 0x1e,
|
||||
0x19, 0x63, 0x68, 0x0c, 0x8f, 0x0f, 0xf6, 0x18, 0x03, 0xc4, 0xd6, 0x12, 0x08, 0x91, 0x17, 0x50,
|
||||
0x76, 0x90, 0x20, 0x40, 0x08, 0x8a, 0xac, 0x6e, 0x55, 0x44, 0xb2, 0x3a, 0xc5, 0xa2, 0x24, 0xe7,
|
||||
0x27, 0xe4, 0x98, 0x63, 0x80, 0x9c, 0xf3, 0x27, 0x82, 0x5c, 0x02, 0xff, 0x9d, 0x1c, 0x73, 0x0e,
|
||||
0xaa, 0x8a, 0x64, 0x17, 0x9b, 0x2d, 0xc9, 0x41, 0xe0, 0x1b, 0xeb, 0x2d, 0xdf, 0x5b, 0xea, 0x2d,
|
||||
0xd5, 0x0d, 0xdd, 0x21, 0x09, 0x31, 0xdb, 0x1c, 0x33, 0xca, 0x29, 0xea, 0xc8, 0x83, 0x3b, 0x3e,
|
||||
0xb4, 0x5f, 0xc1, 0xd2, 0x3e, 0xa5, 0xc7, 0xe9, 0x78, 0x9b, 0x30, 0xec, 0x73, 0xca, 0xde, 0xed,
|
||||
0xc4, 0x9c, 0xbd, 0x73, 0xf0, 0xb7, 0x29, 0x4e, 0x38, 0x5a, 0x06, 0x33, 0xc8, 0x19, 0x96, 0xb1,
|
||||
0x66, 0x6c, 0x98, 0xce, 0x84, 0x80, 0x10, 0x34, 0x62, 0x2f, 0xc2, 0x56, 0x4d, 0x32, 0xe4, 0xb7,
|
||||
0xbd, 0x03, 0x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|
||||
0x01, 0x66, 0x71, 0x99, 0xe8, 0x26, 0xb4, 0x85, 0x59, 0x97, 0x04, 0x59, 0x26, 0x5a, 0xe2, 0xb8,
|
||||
0x17, 0x88, 0xce, 0xa0, 0xc3, 0x61, 0x82, 0xb9, 0x74, 0xaf, 0xee, 0x64, 0x27, 0x51, 0x59, 0x09,
|
||||
0xf9, 0x4e, 0x35, 0x43, 0xc3, 0x91, 0xdf, 0x22, 0xe3, 0x11, 0x27, 0x11, 0x96, 0x06, 0xeb, 0x8e,
|
||||
0x3a, 0xa0, 0x05, 0x68, 0x62, 0x97, 0x7b, 0x23, 0x59, 0xe5, 0xa6, 0xd3, 0xc0, 0x6f, 0xbc, 0x11,
|
||||
0xfa, 0x27, 0x5c, 0x4d, 0x68, 0xca, 0x7c, 0xec, 0xe6, 0x66, 0x5b, 0x92, 0xdb, 0x53, 0xd4, 0x5d,
|
||||
0x65, 0xdc, 0x86, 0xfa, 0x90, 0x04, 0x56, 0x5b, 0x26, 0x66, 0xae, 0x5c, 0x84, 0x7b, 0x81, 0x23,
|
||||
0x98, 0xe8, 0x3f, 0x00, 0x05, 0x52, 0x60, 0x75, 0xce, 0x11, 0x35, 0x73, 0xdc, 0xc0, 0xfe, 0x02,
|
||||
0x5a, 0x19, 0xfc, 0x12, 0x98, 0x27, 0x34, 0x4c, 0xa3, 0x22, 0xec, 0xbe, 0xd3, 0x51, 0x84, 0xbd,
|
||||
0x00, 0xdd, 0x02, 0x39, 0xeb, 0x5c, 0x51, 0x55, 0x35, 0x19, 0xa4, 0xcc, 0xd0, 0x67, 0x58, 0x4e,
|
||||
0x0b, 0x9f, 0xd2, 0x63, 0xa2, 0xa2, 0x6f, 0x3b, 0xd9, 0xc9, 0xfe, 0xbd, 0x06, 0x57, 0xcb, 0xe5,
|
||||
0x2e, 0x4c, 0x48, 0x14, 0x99, 0x2b, 0x43, 0xc2, 0x48, 0xd8, 0x83, 0x52, 0xbe, 0x6a, 0x7a, 0xbe,
|
||||
0x72, 0x95, 0x88, 0x06, 0xca, 0x40, 0x5f, 0xa9, 0xbc, 0xa0, 0x01, 0x16, 0xd5, 0x9a, 0x92, 0x40,
|
||||
0x26, 0xb8, 0xef, 0x88, 0x4f, 0x41, 0x19, 0x91, 0x20, 0x1b, 0x21, 0xe2, 0x53, 0xba, 0xc7, 0x24,
|
||||
0x6e, 0x4b, 0x5d, 0x99, 0x3a, 0x89, 0x2b, 0x8b, 0x04, 0xb5, 0xad, 0xee, 0x41, 0x7c, 0xa3, 0x35,
|
||||
0xe8, 0x32, 0x3c, 0x0e, 0xb3, 0xea, 0x95, 0xe9, 0x33, 0x1d, 0x9d, 0x84, 0x56, 0x01, 0x7c, 0x1a,
|
||||
0x86, 0xd8, 0x97, 0x02, 0xa6, 0x14, 0xd0, 0x28, 0xa2, 0x72, 0x38, 0x0f, 0xdd, 0x04, 0xfb, 0x16,
|
||||
0xac, 0x19, 0x1b, 0x4d, 0xa7, 0xc5, 0x79, 0x78, 0x80, 0x7d, 0x11, 0x47, 0x9a, 0x60, 0xe6, 0xca,
|
||||
0x01, 0xd4, 0x95, 0x7a, 0x1d, 0x41, 0x90, 0xa3, 0x72, 0x05, 0x60, 0xc4, 0x68, 0x3a, 0x56, 0xdc,
|
||||
0xde, 0x5a, 0x5d, 0xcc, 0x63, 0x49, 0x91, 0xec, 0x3b, 0x70, 0x35, 0x79, 0x17, 0x85, 0x24, 0x3e,
|
||||
0x76, 0xb9, 0xc7, 0x46, 0x98, 0x5b, 0x7d, 0x55, 0xc3, 0x19, 0xf5, 0x8d, 0x24, 0xda, 0x5f, 0x02,
|
||||
0xda, 0x62, 0xd8, 0xe3, 0xf8, 0x2f, 0xac, 0x9e, 0x0f, 0xec, 0xee, 0xeb, 0xb0, 0x50, 0x82, 0x56,
|
||||
0x53, 0x58, 0x58, 0x7c, 0x3b, 0x0e, 0x3e, 0x96, 0xc5, 0x12, 0x74, 0x66, 0xf1, 0xbd, 0x01, 0x68,
|
||||
0x5b, 0x36, 0xf8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||
0x1a, 0xa5, 0x46, 0xfb, 0x07, 0x74, 0xc5, 0x75, 0xba, 0x3e, 0x8e, 0x39, 0x66, 0xd9, 0x98, 0x05,
|
||||
0x41, 0xda, 0x92, 0x14, 0xfb, 0x7b, 0x03, 0x16, 0xcb, 0x9e, 0x66, 0x6f, 0x8a, 0x73, 0xa7, 0xbe,
|
||||
0x18, 0x33, 0x2c, 0xcc, 0xdc, 0x14, 0x9f, 0xa2, 0x61, 0xc7, 0xe9, 0x61, 0x48, 0x7c, 0x57, 0x30,
|
||||
0x94, 0x7b, 0xa6, 0xa2, 0xbc, 0x65, 0xe1, 0x24, 0xe8, 0x86, 0x1e, 0x34, 0x82, 0x86, 0x97, 0xf2,
|
||||
0xa3, 0x7c, 0xf2, 0x8b, 0x6f, 0xfb, 0x11, 0x2c, 0xa8, 0x67, 0x5e, 0x39, 0x6b, 0x2b, 0x00, 0xc5,
|
||||
0x2c, 0x56, 0x2f, 0x1c, 0xd3, 0x31, 0xf3, 0x61, 0x9c, 0xd8, 0xff, 0x07, 0x73, 0x9f, 0xaa, 0x44,
|
||||
0x24, 0xe8, 0x01, 0x98, 0x61, 0x7e, 0xc8, 0x1e, 0x43, 0x68, 0xd2, 0x54, 0xb9, 0x9c, 0x33, 0x11,
|
||||
0xb2, 0x9f, 0x42, 0x27, 0x27, 0xe7, 0xb1, 0x19, 0xe7, 0xc5, 0x56, 0x9b, 0x8a, 0xcd, 0xfe, 0xcd,
|
||||
0x80, 0xc5, 0xb2, 0xcb, 0x59, 0xfa, 0xde, 0x42, 0xbf, 0x30, 0xe1, 0x46, 0xde, 0x38, 0xf3, 0xe5,
|
||||
0x81, 0xee, 0x4b, 0x55, 0xad, 0x70, 0x30, 0x79, 0xe1, 0x8d, 0x55, 0x49, 0xf5, 0x42, 0x8d, 0x34,
|
||||
0x78, 0x03, 0xf3, 0x15, 0x91, 0x19, 0xef, 0x9b, 0x7b, 0xfa, 0xfb, 0xa6, 0xf4, 0x46, 0x2b, 0xb4,
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, 0x72, 0xb9, 0xad,
|
||||
0xe7, 0xab, 0x30, 0x97, 0xa8, 0x36, 0x1e, 0x26, 0x9b, 0x7e, 0x48, 0x70, 0xcc, 0x9f, 0x83, 0xd4,
|
||||
0x78, 0xcd, 0x28, 0xa7, 0x87, 0x2d, 0xf9, 0x1f, 0xcf, 0x7f, 0xff, 0x0c, 0x00, 0x00, 0xff, 0xff,
|
||||
0x0e, 0xa9, 0xb5, 0x68, 0xf2, 0x11, 0x00, 0x00,
|
||||
// 1603 bytes of a gzipped FileDescriptorProto
|
||||
0x1f, 0x8b, 0x08, 0x00, 0x00, 0x09, 0x6e, 0x88, 0x02, 0xff, 0xb4, 0x58, 0xcd, 0x6f, 0xdc, 0x44,
|
||||
0x14, 0x8f, 0xf7, 0xdb, 0x6f, 0x77, 0xdb, 0x64, 0x92, 0xb6, 0xdb, 0xcd, 0x07, 0xa9, 0x43, 0x4b,
|
||||
0x10, 0x55, 0xa8, 0x42, 0x0f, 0x2d, 0x85, 0x43, 0x9b, 0x0f, 0x14, 0x91, 0x7e, 0xc8, 0x69, 0x11,
|
||||
0x08, 0x09, 0xcb, 0xb1, 0x67, 0x37, 0x43, 0x6c, 0xcf, 0x32, 0x1e, 0x27, 0x29, 0x7f, 0x02, 0x47,
|
||||
0x8e, 0x48, 0x9c, 0xf9, 0x27, 0x10, 0x17, 0x84, 0xf8, 0x6f, 0x38, 0x72, 0x46, 0x33, 0x63, 0x7b,
|
||||
0xc7, 0xeb, 0x4d, 0xd2, 0x0a, 0xf5, 0xe6, 0x79, 0xdf, 0xef, 0xcd, 0x7b, 0xbf, 0x37, 0xbb, 0xd0,
|
||||
0x1e, 0x90, 0x00, 0xb3, 0x8d, 0x11, 0xa3, 0x9c, 0xa2, 0x96, 0x3c, 0x38, 0xa3, 0x43, 0xeb, 0x39,
|
||||
0x2c, 0xee, 0x53, 0x7a, 0x9c, 0x8c, 0xb6, 0x09, 0xc3, 0x1e, 0xa7, 0xec, 0xf5, 0x4e, 0xc4, 0xd9,
|
||||
0x6b, 0x1b, 0xff, 0x90, 0xe0, 0x98, 0xa3, 0x25, 0x30, 0xfd, 0x8c, 0xd1, 0x33, 0x56, 0x8d, 0x75,
|
||||
0xd3, 0x1e, 0x13, 0x10, 0x82, 0x5a, 0xe4, 0x86, 0xb8, 0x57, 0x91, 0x0c, 0xf9, 0x6d, 0xed, 0xc0,
|
||||
0xd2, 0x74, 0x83, 0xf1, 0x88, 0x46, 0x31, 0x46, 0xb7, 0xa1, 0x8e, 0x05, 0x41, 0x5a, 0x6b, 0x6f,
|
||||
0x5e, 0xdd, 0xc8, 0x42, 0xd9, 0x50, 0x72, 0x8a, 0x6b, 0xfd, 0x61, 0x00, 0xda, 0x27, 0x31, 0x17,
|
||||
0x44, 0x82, 0xe3, 0x37, 0x8b, 0xe7, 0x3a, 0x34, 0x46, 0x0c, 0x0f, 0xc8, 0x59, 0x1a, 0x51, 0x7a,
|
||||
0x42, 0x77, 0x61, 0x2e, 0xe6, 0x2e, 0xe3, 0xbb, 0x8c, 0x86, 0xbb, 0x24, 0xc0, 0xcf, 0x44, 0xd0,
|
||||
0x55, 0x29, 0x52, 0x66, 0xa0, 0x0d, 0x40, 0x24, 0xf2, 0x82, 0x24, 0x26, 0x27, 0xf8, 0x20, 0xe3,
|
||||
0xf6, 0x6a, 0xab, 0xc6, 0x7a, 0xcb, 0x9e, 0xc2, 0x41, 0x0b, 0x50, 0x0f, 0x48, 0x48, 0x78, 0xaf,
|
||||
0xbe, 0x6a, 0xac, 0x77, 0x6d, 0x75, 0xb0, 0x3e, 0x83, 0xf9, 0x42, 0xfc, 0x6f, 0x97, 0xfe, 0xaf,
|
||||
0x15, 0xa8, 0x4b, 0x42, 0x5e, 0x63, 0x63, 0x5c, 0x63, 0x74, 0x0b, 0x3a, 0x24, 0x76, 0xc6, 0x85,
|
||||
0xa8, 0xc8, 0xd8, 0xda, 0x24, 0xce, 0x6b, 0x8e, 0x3e, 0x82, 0x86, 0x77, 0x94, 0x44, 0xc7, 0x71,
|
||||
0xaf, 0xba, 0x5a, 0x5d, 0x6f, 0x6f, 0xce, 0x8f, 0x1d, 0x89, 0x44, 0xb7, 0x04, 0xcf, 0x4e, 0x45,
|
||||
0xd0, 0x03, 0x00, 0x97, 0x73, 0x46, 0x0e, 0x13, 0x8e, 0x63, 0x99, 0x69, 0x7b, 0xb3, 0xa7, 0x29,
|
||||
0x24, 0x31, 0x7e, 0x9c, 0xf3, 0x6d, 0x4d, 0x16, 0x3d, 0x84, 0x16, 0x3e, 0xe3, 0x38, 0xf2, 0xb1,
|
||||
0xdf, 0xab, 0x4b, 0x47, 0xcb, 0x13, 0x19, 0x6d, 0xec, 0xa4, 0x7c, 0x95, 0x5f, 0x2e, 0xde, 0x7f,
|
||||
0x04, 0xdd, 0x02, 0x0b, 0xcd, 0x42, 0xf5, 0x18, 0x67, 0xb7, 0x2a, 0x3e, 0x45, 0x65, 0x4f, 0xdc,
|
||||
0x20, 0x51, 0x0d, 0xd6, 0xb1, 0xd5, 0xe1, 0xd3, 0xca, 0x03, 0xc3, 0xda, 0x06, 0x73, 0x37, 0x09,
|
||||
0x82, 0x5c, 0xd1, 0x27, 0x2c, 0x53, 0xf4, 0x09, 0x1b, 0x57, 0xb9, 0x72, 0x61, 0x95, 0x7f, 0x37,
|
||||
0x60, 0x6e, 0xe7, 0x04, 0x47, 0xfc, 0x19, 0xe5, 0x64, 0x40, 0x3c, 0x97, 0x13, 0x1a, 0xa1, 0xbb,
|
||||
0x60, 0xd2, 0xc0, 0x77, 0x2e, 0xbc, 0xa6, 0x16, 0x0d, 0xd2, 0xa8, 0xef, 0x82, 0x19, 0xe1, 0x53,
|
||||
0xe7, 0x42, 0x77, 0xad, 0x08, 0x9f, 0x2a, 0xe9, 0x35, 0xe8, 0xfa, 0x38, 0xc0, 0x1c, 0x3b, 0xf9,
|
||||
0xed, 0x88, 0xab, 0xeb, 0x28, 0xe2, 0x96, 0xba, 0x8e, 0x3b, 0x70, 0x55, 0x98, 0x1c, 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 0xe9, 0xc9, 0xfa,
|
||||
0xa7, 0x02, 0x57, 0x8a, 0xed, 0x2e, 0x5c, 0x48, 0x2b, 0xb2, 0x56, 0x86, 0x34, 0x23, 0xcd, 0x1e,
|
||||
0x14, 0xea, 0x55, 0xd1, 0xeb, 0x95, 0xa9, 0x84, 0xd4, 0x57, 0x0e, 0xba, 0x4a, 0xe5, 0x29, 0xf5,
|
||||
0xb1, 0xe8, 0xd6, 0x84, 0xf8, 0xb2, 0xc0, 0x5d, 0x5b, 0x7c, 0x0a, 0xca, 0x90, 0xf8, 0x29, 0x7c,
|
||||
0x88, 0x4f, 0x19, 0x1e, 0x93, 0x76, 0x1b, 0xea, 0xca, 0xd4, 0x49, 0x5c, 0x59, 0x28, 0xa8, 0x4d,
|
||||
0x75, 0x0f, 0xe2, 0x1b, 0xad, 0x42, 0x9b, 0xe1, 0x51, 0x90, 0x76, 0xaf, 0x2c, 0x9f, 0x69, 0xeb,
|
||||
0x24, 0xb4, 0x02, 0xe0, 0xd1, 0x20, 0xc0, 0x9e, 0x14, 0x30, 0xa5, 0x80, 0x46, 0x11, 0x9d, 0xc3,
|
||||
0x79, 0xe0, 0xc4, 0xd8, 0xeb, 0xc1, 0xaa, 0xb1, 0x5e, 0xb7, 0x1b, 0x9c, 0x07, 0x07, 0xd8, 0x13,
|
||||
0x79, 0x24, 0x31, 0x66, 0x8e, 0x04, 0xa0, 0xb6, 0xd4, 0x6b, 0x09, 0x82, 0x84, 0xc9, 0x65, 0x80,
|
||||
0x21, 0xa3, 0xc9, 0x48, 0x71, 0x3b, 0xab, 0x55, 0x81, 0xc5, 0x92, 0x22, 0xd9, 0xb7, 0xe1, 0x4a,
|
||||
0xfc, 0x3a, 0x0c, 0x48, 0x74, 0xec, 0x70, 0x97, 0x0d, 0x31, 0xef, 0x75, 0x55, 0x0f, 0xa7, 0xd4,
|
||||
0x97, 0x92, 0x68, 0x7d, 0x03, 0x68, 0x8b, 0x61, 0x97, 0xe3, 0xb7, 0x58, 0x3b, 0x6f, 0x38, 0xdd,
|
||||
0xd7, 0x60, 0xbe, 0x60, 0x5a, 0x21, 0xb0, 0xf0, 0xf8, 0x6a, 0xe4, 0xbf, 0x2b, 0x8f, 0x05, 0xd3,
|
||||
0xa9, 0xc7, 0xbf, 0x0c, 0x40, 0xdb, 0x72, 0xc0, 0xff, 0xdf, 0x6e, 0x15, 0x23, 0x27, 0x70, 0x5f,
|
||||
0x01, 0x88, 0xef, 0x72, 0x37, 0xdd, 0x4a, 0x1d, 0x12, 0x2b, 0xfb, 0xdb, 0x2e, 0x77, 0xd3, 0xed,
|
||||
0xc0, 0xb0, 0x97, 0x30, 0xb1, 0xa8, 0x64, 0x5f, 0xc9, 0xed, 0x60, 0x67, 0x24, 0x74, 0x1f, 0xae,
|
||||
0x93, 0x61, 0x44, 0x19, 0x1e, 0x8b, 0x39, 0x98, 0x31, 0xca, 0x64, 0xbf, 0xb5, 0xec, 0x05, 0xc5,
|
||||
0xcd, 0x15, 0x76, 0x04, 0x4f, 0xa4, 0x57, 0x48, 0x23, 0x4d, 0xef, 0x17, 0x03, 0x7a, 0x8f, 0x39,
|
||||
0x0d, 0x89, 0x67, 0x63, 0x11, 0x66, 0x21, 0xc9, 0x35, 0xe8, 0x0a, 0x30, 0x9d, 0x4c, 0xb4, 0x43,
|
||||
0x03, 0x7f, 0xbc, 0xac, 0x6e, 0x82, 0xc0, 0x53, 0x47, 0xcb, 0xb7, 0x49, 0x03, 0x5f, 0xb6, 0xd1,
|
||||
0x1a, 0x08, 0xd0, 0xd3, 0xf4, 0xd5, 0xda, 0xee, 0x44, 0xf8, 0xb4, 0xa0, 0x2f, 0x84, 0xa4, 0xbe,
|
||||
0x42, 0xca, 0x66, 0x84, 0x4f, 0x85, 0xbe, 0xb5, 0x08, 0x37, 0xa7, 0xc4, 0x96, 0x46, 0xfe, 0x9b,
|
||||
0x01, 0xf3, 0x8f, 0xe3, 0x98, 0x0c, 0xa3, 0xaf, 0x24, 0x66, 0x64, 0x41, 0x2f, 0x40, 0xdd, 0xa3,
|
||||
0x49, 0xc4, 0x65, 0xb0, 0x75, 0x5b, 0x1d, 0x26, 0xc6, 0xa8, 0x52, 0x1a, 0xa3, 0x89, 0x41, 0xac,
|
||||
0x96, 0x07, 0x51, 0x1b, 0xb4, 0x5a, 0x61, 0xd0, 0xde, 0x83, 0xb6, 0xb8, 0x4e, 0xc7, 0xc3, 0x11,
|
||||
0xc7, 0x2c, 0x85, 0x59, 0x10, 0xa4, 0x2d, 0x49, 0xb1, 0x7e, 0x32, 0x60, 0xa1, 0x18, 0x69, 0xfa,
|
||||
0x9e, 0x38, 0x17, 0xf5, 0x05, 0xcc, 0xb0, 0x20, 0x0d, 0x53, 0x7c, 0x8a, 0x81, 0x1d, 0x25, 0x87,
|
||||
0x01, 0xf1, 0x1c, 0xc1, 0x50, 0xe1, 0x99, 0x8a, 0xf2, 0x8a, 0x05, 0xe3, 0xa4, 0x6b, 0x7a, 0xd2,
|
||||
0x08, 0x6a, 0x6e, 0xc2, 0x8f, 0x32, 0xe4, 0x17, 0xdf, 0xd6, 0x7d, 0x98, 0x57, 0x4f, 0xbc, 0x62,
|
||||
0xd5, 0x96, 0x01, 0x72, 0x2c, 0x8e, 0x7b, 0x86, 0x02, 0x84, 0x0c, 0x8c, 0x63, 0xeb, 0x73, 0x30,
|
||||
0xf7, 0xa9, 0x2a, 0x44, 0x8c, 0xee, 0x81, 0x19, 0x64, 0x07, 0x29, 0xda, 0xde, 0x44, 0xe3, 0xa1,
|
||||
0xca, 0xe4, 0xec, 0xb1, 0x90, 0xf5, 0x08, 0x5a, 0x19, 0x39, 0xcb, 0xcd, 0x38, 0x2f, 0xb7, 0xca,
|
||||
0x44, 0x6e, 0xd6, 0x9f, 0x06, 0x2c, 0x14, 0x43, 0x4e, 0xcb, 0xf7, 0x0a, 0xba, 0xb9, 0x0b, 0x27,
|
||||
0x74, 0x47, 0x69, 0x2c, 0xf7, 0xf4, 0x58, 0xca, 0x6a, 0x79, 0x80, 0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 0x22, 0x91, 0xdc, 0xf8, 0x1e, 0xc0, 0x18, 0x8c, 0xd0, 0xe2,
|
||||
0x58, 0xa7, 0x04, 0x86, 0xfd, 0xa5, 0xe9, 0xcc, 0xdc, 0xd4, 0xf7, 0x70, 0x6d, 0xea, 0xc4, 0x23,
|
||||
0x6d, 0x4c, 0x2e, 0xc2, 0x8c, 0xfe, 0x07, 0x97, 0xca, 0x65, 0xbe, 0x9e, 0xac, 0xc0, 0x6c, 0xac,
|
||||
0x06, 0x79, 0x10, 0x6f, 0x78, 0x01, 0xc1, 0x11, 0x7f, 0x02, 0x52, 0xe3, 0x05, 0xa3, 0x9c, 0x1e,
|
||||
0x36, 0xe4, 0x3f, 0x3c, 0x9f, 0xfc, 0x17, 0x00, 0x00, 0xff, 0xff, 0x14, 0x43, 0x9d, 0xb9, 0xf0,
|
||||
0x11, 0x00, 0x00,
|
||||
}
|
||||
@@ -58,6 +58,7 @@ message HeartbeatResponse {
|
||||
string leader = 2;
|
||||
string metrics_address = 3;
|
||||
uint32 metrics_interval_seconds = 4;
|
||||
repeated StorageBackend storage_backends = 5;
|
||||
}
|
||||
|
||||
message VolumeInformationMessage {
|
||||
@@ -73,6 +74,8 @@ message VolumeInformationMessage {
|
||||
uint32 ttl = 10;
|
||||
uint32 compact_revision = 11;
|
||||
int64 modified_at_second = 12;
|
||||
string remote_storage_name = 13;
|
||||
string remote_storage_key = 14;
|
||||
}
|
||||
|
||||
message VolumeShortInformationMessage {
|
||||
@@ -89,6 +92,12 @@ message VolumeEcShardInformationMessage {
|
||||
uint32 ec_index_bits = 3;
|
||||
}
|
||||
|
||||
message StorageBackend {
|
||||
string type = 1;
|
||||
string id = 2;
|
||||
map<string, string> properties = 3;
|
||||
}
|
||||
|
||||
message Empty {
|
||||
}
|
||||
|
||||
@@ -201,6 +210,7 @@ message DataNodeInfo {
|
||||
uint64 active_volume_count = 5;
|
||||
repeated VolumeInformationMessage volume_infos = 6;
|
||||
repeated VolumeEcShardInformationMessage ec_shard_infos = 7;
|
||||
uint64 remote_volume_count = 8;
|
||||
}
|
||||
message RackInfo {
|
||||
string id = 1;
|
||||
@@ -209,6 +219,7 @@ message RackInfo {
|
||||
uint64 free_volume_count = 4;
|
||||
uint64 active_volume_count = 5;
|
||||
repeated DataNodeInfo data_node_infos = 6;
|
||||
uint64 remote_volume_count = 7;
|
||||
}
|
||||
message DataCenterInfo {
|
||||
string id = 1;
|
||||
@@ -217,6 +228,7 @@ message DataCenterInfo {
|
||||
uint64 free_volume_count = 4;
|
||||
uint64 active_volume_count = 5;
|
||||
repeated RackInfo rack_infos = 6;
|
||||
uint64 remote_volume_count = 7;
|
||||
}
|
||||
message TopologyInfo {
|
||||
string id = 1;
|
||||
@@ -225,6 +237,7 @@ message TopologyInfo {
|
||||
uint64 free_volume_count = 4;
|
||||
uint64 active_volume_count = 5;
|
||||
repeated DataCenterInfo data_center_infos = 6;
|
||||
uint64 remote_volume_count = 7;
|
||||
}
|
||||
message VolumeListRequest {
|
||||
}
|
||||
|
||||
+269
-169
@@ -14,6 +14,7 @@ It has these top-level messages:
|
||||
VolumeInformationMessage
|
||||
VolumeShortInformationMessage
|
||||
VolumeEcShardInformationMessage
|
||||
StorageBackend
|
||||
Empty
|
||||
SuperBlockExtra
|
||||
KeepConnectedRequest
|
||||
@@ -204,10 +205,11 @@ func (m *Heartbeat) GetHasNoEcShards() bool {
|
||||
}
|
||||
|
||||
type HeartbeatResponse struct {
|
||||
VolumeSizeLimit uint64 `protobuf:"varint,1,opt,name=volume_size_limit,json=volumeSizeLimit" json:"volume_size_limit,omitempty"`
|
||||
Leader string `protobuf:"bytes,2,opt,name=leader" json:"leader,omitempty"`
|
||||
MetricsAddress string `protobuf:"bytes,3,opt,name=metrics_address,json=metricsAddress" json:"metrics_address,omitempty"`
|
||||
MetricsIntervalSeconds uint32 `protobuf:"varint,4,opt,name=metrics_interval_seconds,json=metricsIntervalSeconds" json:"metrics_interval_seconds,omitempty"`
|
||||
VolumeSizeLimit uint64 `protobuf:"varint,1,opt,name=volume_size_limit,json=volumeSizeLimit" json:"volume_size_limit,omitempty"`
|
||||
Leader string `protobuf:"bytes,2,opt,name=leader" json:"leader,omitempty"`
|
||||
MetricsAddress string `protobuf:"bytes,3,opt,name=metrics_address,json=metricsAddress" json:"metrics_address,omitempty"`
|
||||
MetricsIntervalSeconds uint32 `protobuf:"varint,4,opt,name=metrics_interval_seconds,json=metricsIntervalSeconds" json:"metrics_interval_seconds,omitempty"`
|
||||
StorageBackends []*StorageBackend `protobuf:"bytes,5,rep,name=storage_backends,json=storageBackends" json:"storage_backends,omitempty"`
|
||||
}
|
||||
|
||||
func (m *HeartbeatResponse) Reset() { *m = HeartbeatResponse{} }
|
||||
@@ -243,19 +245,28 @@ func (m *HeartbeatResponse) GetMetricsIntervalSeconds() uint32 {
|
||||
return 0
|
||||
}
|
||||
|
||||
func (m *HeartbeatResponse) GetStorageBackends() []*StorageBackend {
|
||||
if m != nil {
|
||||
return m.StorageBackends
|
||||
}
|
||||
return nil
|
||||
}
|
||||
|
||||
type VolumeInformationMessage struct {
|
||||
Id uint32 `protobuf:"varint,1,opt,name=id" json:"id,omitempty"`
|
||||
Size uint64 `protobuf:"varint,2,opt,name=size" json:"size,omitempty"`
|
||||
Collection string `protobuf:"bytes,3,opt,name=collection" json:"collection,omitempty"`
|
||||
FileCount uint64 `protobuf:"varint,4,opt,name=file_count,json=fileCount" json:"file_count,omitempty"`
|
||||
DeleteCount uint64 `protobuf:"varint,5,opt,name=delete_count,json=deleteCount" json:"delete_count,omitempty"`
|
||||
DeletedByteCount uint64 `protobuf:"varint,6,opt,name=deleted_byte_count,json=deletedByteCount" json:"deleted_byte_count,omitempty"`
|
||||
ReadOnly bool `protobuf:"varint,7,opt,name=read_only,json=readOnly" json:"read_only,omitempty"`
|
||||
ReplicaPlacement uint32 `protobuf:"varint,8,opt,name=replica_placement,json=replicaPlacement" json:"replica_placement,omitempty"`
|
||||
Version uint32 `protobuf:"varint,9,opt,name=version" json:"version,omitempty"`
|
||||
Ttl uint32 `protobuf:"varint,10,opt,name=ttl" json:"ttl,omitempty"`
|
||||
CompactRevision uint32 `protobuf:"varint,11,opt,name=compact_revision,json=compactRevision" json:"compact_revision,omitempty"`
|
||||
ModifiedAtSecond int64 `protobuf:"varint,12,opt,name=modified_at_second,json=modifiedAtSecond" json:"modified_at_second,omitempty"`
|
||||
Id uint32 `protobuf:"varint,1,opt,name=id" json:"id,omitempty"`
|
||||
Size uint64 `protobuf:"varint,2,opt,name=size" json:"size,omitempty"`
|
||||
Collection string `protobuf:"bytes,3,opt,name=collection" json:"collection,omitempty"`
|
||||
FileCount uint64 `protobuf:"varint,4,opt,name=file_count,json=fileCount" json:"file_count,omitempty"`
|
||||
DeleteCount uint64 `protobuf:"varint,5,opt,name=delete_count,json=deleteCount" json:"delete_count,omitempty"`
|
||||
DeletedByteCount uint64 `protobuf:"varint,6,opt,name=deleted_byte_count,json=deletedByteCount" json:"deleted_byte_count,omitempty"`
|
||||
ReadOnly bool `protobuf:"varint,7,opt,name=read_only,json=readOnly" json:"read_only,omitempty"`
|
||||
ReplicaPlacement uint32 `protobuf:"varint,8,opt,name=replica_placement,json=replicaPlacement" json:"replica_placement,omitempty"`
|
||||
Version uint32 `protobuf:"varint,9,opt,name=version" json:"version,omitempty"`
|
||||
Ttl uint32 `protobuf:"varint,10,opt,name=ttl" json:"ttl,omitempty"`
|
||||
CompactRevision uint32 `protobuf:"varint,11,opt,name=compact_revision,json=compactRevision" json:"compact_revision,omitempty"`
|
||||
ModifiedAtSecond int64 `protobuf:"varint,12,opt,name=modified_at_second,json=modifiedAtSecond" json:"modified_at_second,omitempty"`
|
||||
RemoteStorageName string `protobuf:"bytes,13,opt,name=remote_storage_name,json=remoteStorageName" json:"remote_storage_name,omitempty"`
|
||||
RemoteStorageKey string `protobuf:"bytes,14,opt,name=remote_storage_key,json=remoteStorageKey" json:"remote_storage_key,omitempty"`
|
||||
}
|
||||
|
||||
func (m *VolumeInformationMessage) Reset() { *m = VolumeInformationMessage{} }
|
||||
@@ -347,6 +358,20 @@ func (m *VolumeInformationMessage) GetModifiedAtSecond() int64 {
|
||||
return 0
|
||||
}
|
||||
|
||||
func (m *VolumeInformationMessage) GetRemoteStorageName() string {
|
||||
if m != nil {
|
||||
return m.RemoteStorageName
|
||||
}
|
||||
return ""
|
||||
}
|
||||
|
||||
func (m *VolumeInformationMessage) GetRemoteStorageKey() string {
|
||||
if m != nil {
|
||||
return m.RemoteStorageKey
|
||||
}
|
||||
return ""
|
||||
}
|
||||
|
||||
type VolumeShortInformationMessage struct {
|
||||
Id uint32 `protobuf:"varint,1,opt,name=id" json:"id,omitempty"`
|
||||
Collection string `protobuf:"bytes,3,opt,name=collection" json:"collection,omitempty"`
|
||||
@@ -427,13 +452,45 @@ func (m *VolumeEcShardInformationMessage) GetEcIndexBits() uint32 {
|
||||
return 0
|
||||
}
|
||||
|
||||
type StorageBackend struct {
|
||||
Type string `protobuf:"bytes,1,opt,name=type" json:"type,omitempty"`
|
||||
Id string `protobuf:"bytes,2,opt,name=id" json:"id,omitempty"`
|
||||
Properties map[string]string `protobuf:"bytes,3,rep,name=properties" json:"properties,omitempty" protobuf_key:"bytes,1,opt,name=key" protobuf_val:"bytes,2,opt,name=value"`
|
||||
}
|
||||
|
||||
func (m *StorageBackend) Reset() { *m = StorageBackend{} }
|
||||
func (m *StorageBackend) String() string { return proto.CompactTextString(m) }
|
||||
func (*StorageBackend) ProtoMessage() {}
|
||||
func (*StorageBackend) Descriptor() ([]byte, []int) { return fileDescriptor0, []int{5} }
|
||||
|
||||
func (m *StorageBackend) GetType() string {
|
||||
if m != nil {
|
||||
return m.Type
|
||||
}
|
||||
return ""
|
||||
}
|
||||
|
||||
func (m *StorageBackend) GetId() string {
|
||||
if m != nil {
|
||||
return m.Id
|
||||
}
|
||||
return ""
|
||||
}
|
||||
|
||||
func (m *StorageBackend) GetProperties() map[string]string {
|
||||
if m != nil {
|
||||
return m.Properties
|
||||
}
|
||||
return nil
|
||||
}
|
||||
|
||||
type Empty struct {
|
||||
}
|
||||
|
||||
func (m *Empty) Reset() { *m = Empty{} }
|
||||
func (m *Empty) String() string { return proto.CompactTextString(m) }
|
||||
func (*Empty) ProtoMessage() {}
|
||||
func (*Empty) Descriptor() ([]byte, []int) { return fileDescriptor0, []int{5} }
|
||||
func (*Empty) Descriptor() ([]byte, []int) { return fileDescriptor0, []int{6} }
|
||||
|
||||
type SuperBlockExtra struct {
|
||||
ErasureCoding *SuperBlockExtra_ErasureCoding `protobuf:"bytes,1,opt,name=erasure_coding,json=erasureCoding" json:"erasure_coding,omitempty"`
|
||||
@@ -442,7 +499,7 @@ type SuperBlockExtra struct {
|
||||
func (m *SuperBlockExtra) Reset() { *m = SuperBlockExtra{} }
|
||||
func (m *SuperBlockExtra) String() string { return proto.CompactTextString(m) }
|
||||
func (*SuperBlockExtra) ProtoMessage() {}
|
||||
func (*SuperBlockExtra) Descriptor() ([]byte, []int) { return fileDescriptor0, []int{6} }
|
||||
func (*SuperBlockExtra) Descriptor() ([]byte, []int) { return fileDescriptor0, []int{7} }
|
||||
|
||||
func (m *SuperBlockExtra) GetErasureCoding() *SuperBlockExtra_ErasureCoding {
|
||||
if m != nil {
|
||||
@@ -461,7 +518,7 @@ func (m *SuperBlockExtra_ErasureCoding) Reset() { *m = SuperBlockExtra_E
|
||||
func (m *SuperBlockExtra_ErasureCoding) String() string { return proto.CompactTextString(m) }
|
||||
func (*SuperBlockExtra_ErasureCoding) ProtoMessage() {}
|
||||
func (*SuperBlockExtra_ErasureCoding) Descriptor() ([]byte, []int) {
|
||||
return fileDescriptor0, []int{6, 0}
|
||||
return fileDescriptor0, []int{7, 0}
|
||||
}
|
||||
|
||||
func (m *SuperBlockExtra_ErasureCoding) GetData() uint32 {
|
||||
@@ -492,7 +549,7 @@ type KeepConnectedRequest struct {
|
||||
func (m *KeepConnectedRequest) Reset() { *m = KeepConnectedRequest{} }
|
||||
func (m *KeepConnectedRequest) String() string { return proto.CompactTextString(m) }
|
||||
func (*KeepConnectedRequest) ProtoMessage() {}
|
||||
func (*KeepConnectedRequest) Descriptor() ([]byte, []int) { return fileDescriptor0, []int{7} }
|
||||
func (*KeepConnectedRequest) Descriptor() ([]byte, []int) { return fileDescriptor0, []int{8} }
|
||||
|
||||
func (m *KeepConnectedRequest) GetName() string {
|
||||
if m != nil {
|
||||
@@ -512,7 +569,7 @@ type VolumeLocation struct {
|
||||
func (m *VolumeLocation) Reset() { *m = VolumeLocation{} }
|
||||
func (m *VolumeLocation) String() string { return proto.CompactTextString(m) }
|
||||
func (*VolumeLocation) ProtoMessage() {}
|
||||
func (*VolumeLocation) Descriptor() ([]byte, []int) { return fileDescriptor0, []int{8} }
|
||||
func (*VolumeLocation) Descriptor() ([]byte, []int) { return fileDescriptor0, []int{9} }
|
||||
|
||||
func (m *VolumeLocation) GetUrl() string {
|
||||
if m != nil {
|
||||
@@ -557,7 +614,7 @@ type LookupVolumeRequest struct {
|
||||
func (m *LookupVolumeRequest) Reset() { *m = LookupVolumeRequest{} }
|
||||
func (m *LookupVolumeRequest) String() string { return proto.CompactTextString(m) }
|
||||
func (*LookupVolumeRequest) ProtoMessage() {}
|
||||
func (*LookupVolumeRequest) Descriptor() ([]byte, []int) { return fileDescriptor0, []int{9} }
|
||||
func (*LookupVolumeRequest) Descriptor() ([]byte, []int) { return fileDescriptor0, []int{10} }
|
||||
|
||||
func (m *LookupVolumeRequest) GetVolumeIds() []string {
|
||||
if m != nil {
|
||||
@@ -580,7 +637,7 @@ type LookupVolumeResponse struct {
|
||||
func (m *LookupVolumeResponse) Reset() { *m = LookupVolumeResponse{} }
|
||||
func (m *LookupVolumeResponse) String() string { return proto.CompactTextString(m) }
|
||||
func (*LookupVolumeResponse) ProtoMessage() {}
|
||||
func (*LookupVolumeResponse) Descriptor() ([]byte, []int) { return fileDescriptor0, []int{10} }
|
||||
func (*LookupVolumeResponse) Descriptor() ([]byte, []int) { return fileDescriptor0, []int{11} }
|
||||
|
||||
func (m *LookupVolumeResponse) GetVolumeIdLocations() []*LookupVolumeResponse_VolumeIdLocation {
|
||||
if m != nil {
|
||||
@@ -599,7 +656,7 @@ func (m *LookupVolumeResponse_VolumeIdLocation) Reset() { *m = LookupVol
|
||||
func (m *LookupVolumeResponse_VolumeIdLocation) String() string { return proto.CompactTextString(m) }
|
||||
func (*LookupVolumeResponse_VolumeIdLocation) ProtoMessage() {}
|
||||
func (*LookupVolumeResponse_VolumeIdLocation) Descriptor() ([]byte, []int) {
|
||||
return fileDescriptor0, []int{10, 0}
|
||||
return fileDescriptor0, []int{11, 0}
|
||||
}
|
||||
|
||||
func (m *LookupVolumeResponse_VolumeIdLocation) GetVolumeId() string {
|
||||
@@ -631,7 +688,7 @@ type Location struct {
|
||||
func (m *Location) Reset() { *m = Location{} }
|
||||
func (m *Location) String() string { return proto.CompactTextString(m) }
|
||||
func (*Location) ProtoMessage() {}
|
||||
func (*Location) Descriptor() ([]byte, []int) { return fileDescriptor0, []int{11} }
|
||||
func (*Location) Descriptor() ([]byte, []int) { return fileDescriptor0, []int{12} }
|
||||
|
||||
func (m *Location) GetUrl() string {
|
||||
if m != nil {
|
||||
@@ -662,7 +719,7 @@ type AssignRequest struct {
|
||||
func (m *AssignRequest) Reset() { *m = AssignRequest{} }
|
||||
func (m *AssignRequest) String() string { return proto.CompactTextString(m) }
|
||||
func (*AssignRequest) ProtoMessage() {}
|
||||
func (*AssignRequest) Descriptor() ([]byte, []int) { return fileDescriptor0, []int{12} }
|
||||
func (*AssignRequest) Descriptor() ([]byte, []int) { return fileDescriptor0, []int{13} }
|
||||
|
||||
func (m *AssignRequest) GetCount() uint64 {
|
||||
if m != nil {
|
||||
@@ -739,7 +796,7 @@ type AssignResponse struct {
|
||||
func (m *AssignResponse) Reset() { *m = AssignResponse{} }
|
||||
func (m *AssignResponse) String() string { return proto.CompactTextString(m) }
|
||||
func (*AssignResponse) ProtoMessage() {}
|
||||
func (*AssignResponse) Descriptor() ([]byte, []int) { return fileDescriptor0, []int{13} }
|
||||
func (*AssignResponse) Descriptor() ([]byte, []int) { return fileDescriptor0, []int{14} }
|
||||
|
||||
func (m *AssignResponse) GetFid() string {
|
||||
if m != nil {
|
||||
@@ -792,7 +849,7 @@ type StatisticsRequest struct {
|
||||
func (m *StatisticsRequest) Reset() { *m = StatisticsRequest{} }
|
||||
func (m *StatisticsRequest) String() string { return proto.CompactTextString(m) }
|
||||
func (*StatisticsRequest) ProtoMessage() {}
|
||||
func (*StatisticsRequest) Descriptor() ([]byte, []int) { return fileDescriptor0, []int{14} }
|
||||
func (*StatisticsRequest) Descriptor() ([]byte, []int) { return fileDescriptor0, []int{15} }
|
||||
|
||||
func (m *StatisticsRequest) GetReplication() string {
|
||||
if m != nil {
|
||||
@@ -827,7 +884,7 @@ type StatisticsResponse struct {
|
||||
func (m *StatisticsResponse) Reset() { *m = StatisticsResponse{} }
|
||||
func (m *StatisticsResponse) String() string { return proto.CompactTextString(m) }
|
||||
func (*StatisticsResponse) ProtoMessage() {}
|
||||
func (*StatisticsResponse) Descriptor() ([]byte, []int) { return fileDescriptor0, []int{15} }
|
||||
func (*StatisticsResponse) Descriptor() ([]byte, []int) { return fileDescriptor0, []int{16} }
|
||||
|
||||
func (m *StatisticsResponse) GetReplication() string {
|
||||
if m != nil {
|
||||
@@ -879,7 +936,7 @@ type StorageType struct {
|
||||
func (m *StorageType) Reset() { *m = StorageType{} }
|
||||
func (m *StorageType) String() string { return proto.CompactTextString(m) }
|
||||
func (*StorageType) ProtoMessage() {}
|
||||
func (*StorageType) Descriptor() ([]byte, []int) { return fileDescriptor0, []int{16} }
|
||||
func (*StorageType) Descriptor() ([]byte, []int) { return fileDescriptor0, []int{17} }
|
||||
|
||||
func (m *StorageType) GetReplication() string {
|
||||
if m != nil {
|
||||
@@ -902,7 +959,7 @@ type Collection struct {
|
||||
func (m *Collection) Reset() { *m = Collection{} }
|
||||
func (m *Collection) String() string { return proto.CompactTextString(m) }
|
||||
func (*Collection) ProtoMessage() {}
|
||||
func (*Collection) Descriptor() ([]byte, []int) { return fileDescriptor0, []int{17} }
|
||||
func (*Collection) Descriptor() ([]byte, []int) { return fileDescriptor0, []int{18} }
|
||||
|
||||
func (m *Collection) GetName() string {
|
||||
if m != nil {
|
||||
@@ -919,7 +976,7 @@ type CollectionListRequest struct {
|
||||
func (m *CollectionListRequest) Reset() { *m = CollectionListRequest{} }
|
||||
func (m *CollectionListRequest) String() string { return proto.CompactTextString(m) }
|
||||
func (*CollectionListRequest) ProtoMessage() {}
|
||||
func (*CollectionListRequest) Descriptor() ([]byte, []int) { return fileDescriptor0, []int{18} }
|
||||
func (*CollectionListRequest) Descriptor() ([]byte, []int) { return fileDescriptor0, []int{19} }
|
||||
|
||||
func (m *CollectionListRequest) GetIncludeNormalVolumes() bool {
|
||||
if m != nil {
|
||||
@@ -942,7 +999,7 @@ type CollectionListResponse struct {
|
||||
func (m *CollectionListResponse) Reset() { *m = CollectionListResponse{} }
|
||||
func (m *CollectionListResponse) String() string { return proto.CompactTextString(m) }
|
||||
func (*CollectionListResponse) ProtoMessage() {}
|
||||
func (*CollectionListResponse) Descriptor() ([]byte, []int) { return fileDescriptor0, []int{19} }
|
||||
func (*CollectionListResponse) Descriptor() ([]byte, []int) { return fileDescriptor0, []int{20} }
|
||||
|
||||
func (m *CollectionListResponse) GetCollections() []*Collection {
|
||||
if m != nil {
|
||||
@@ -958,7 +1015,7 @@ type CollectionDeleteRequest struct {
|
||||
func (m *CollectionDeleteRequest) Reset() { *m = CollectionDeleteRequest{} }
|
||||
func (m *CollectionDeleteRequest) String() string { return proto.CompactTextString(m) }
|
||||
func (*CollectionDeleteRequest) ProtoMessage() {}
|
||||
func (*CollectionDeleteRequest) Descriptor() ([]byte, []int) { return fileDescriptor0, []int{20} }
|
||||
func (*CollectionDeleteRequest) Descriptor() ([]byte, []int) { return fileDescriptor0, []int{21} }
|
||||
|
||||
func (m *CollectionDeleteRequest) GetName() string {
|
||||
if m != nil {
|
||||
@@ -973,7 +1030,7 @@ type CollectionDeleteResponse struct {
|
||||
func (m *CollectionDeleteResponse) Reset() { *m = CollectionDeleteResponse{} }
|
||||
func (m *CollectionDeleteResponse) String() string { return proto.CompactTextString(m) }
|
||||
func (*CollectionDeleteResponse) ProtoMessage() {}
|
||||
func (*CollectionDeleteResponse) Descriptor() ([]byte, []int) { return fileDescriptor0, []int{21} }
|
||||
func (*CollectionDeleteResponse) Descriptor() ([]byte, []int) { return fileDescriptor0, []int{22} }
|
||||
|
||||
//
|
||||
// volume related
|
||||
@@ -986,12 +1043,13 @@ type DataNodeInfo struct {
|
||||
ActiveVolumeCount uint64 `protobuf:"varint,5,opt,name=active_volume_count,json=activeVolumeCount" json:"active_volume_count,omitempty"`
|
||||
VolumeInfos []*VolumeInformationMessage `protobuf:"bytes,6,rep,name=volume_infos,json=volumeInfos" json:"volume_infos,omitempty"`
|
||||
EcShardInfos []*VolumeEcShardInformationMessage `protobuf:"bytes,7,rep,name=ec_shard_infos,json=ecShardInfos" json:"ec_shard_infos,omitempty"`
|
||||
RemoteVolumeCount uint64 `protobuf:"varint,8,opt,name=remote_volume_count,json=remoteVolumeCount" json:"remote_volume_count,omitempty"`
|
||||
}
|
||||
|
||||
func (m *DataNodeInfo) Reset() { *m = DataNodeInfo{} }
|
||||
func (m *DataNodeInfo) String() string { return proto.CompactTextString(m) }
|
||||
func (*DataNodeInfo) ProtoMessage() {}
|
||||
func (*DataNodeInfo) Descriptor() ([]byte, []int) { return fileDescriptor0, []int{22} }
|
||||
func (*DataNodeInfo) Descriptor() ([]byte, []int) { return fileDescriptor0, []int{23} }
|
||||
|
||||
func (m *DataNodeInfo) GetId() string {
|
||||
if m != nil {
|
||||
@@ -1042,6 +1100,13 @@ func (m *DataNodeInfo) GetEcShardInfos() []*VolumeEcShardInformationMessage {
|
||||
return nil
|
||||
}
|
||||
|
||||
func (m *DataNodeInfo) GetRemoteVolumeCount() uint64 {
|
||||
if m != nil {
|
||||
return m.RemoteVolumeCount
|
||||
}
|
||||
return 0
|
||||
}
|
||||
|
||||
type RackInfo struct {
|
||||
Id string `protobuf:"bytes,1,opt,name=id" json:"id,omitempty"`
|
||||
VolumeCount uint64 `protobuf:"varint,2,opt,name=volume_count,json=volumeCount" json:"volume_count,omitempty"`
|
||||
@@ -1049,12 +1114,13 @@ type RackInfo struct {
|
||||
FreeVolumeCount uint64 `protobuf:"varint,4,opt,name=free_volume_count,json=freeVolumeCount" json:"free_volume_count,omitempty"`
|
||||
ActiveVolumeCount uint64 `protobuf:"varint,5,opt,name=active_volume_count,json=activeVolumeCount" json:"active_volume_count,omitempty"`
|
||||
DataNodeInfos []*DataNodeInfo `protobuf:"bytes,6,rep,name=data_node_infos,json=dataNodeInfos" json:"data_node_infos,omitempty"`
|
||||
RemoteVolumeCount uint64 `protobuf:"varint,7,opt,name=remote_volume_count,json=remoteVolumeCount" json:"remote_volume_count,omitempty"`
|
||||
}
|
||||
|
||||
func (m *RackInfo) Reset() { *m = RackInfo{} }
|
||||
func (m *RackInfo) String() string { return proto.CompactTextString(m) }
|
||||
func (*RackInfo) ProtoMessage() {}
|
||||
func (*RackInfo) Descriptor() ([]byte, []int) { return fileDescriptor0, []int{23} }
|
||||
func (*RackInfo) Descriptor() ([]byte, []int) { return fileDescriptor0, []int{24} }
|
||||
|
||||
func (m *RackInfo) GetId() string {
|
||||
if m != nil {
|
||||
@@ -1098,6 +1164,13 @@ func (m *RackInfo) GetDataNodeInfos() []*DataNodeInfo {
|
||||
return nil
|
||||
}
|
||||
|
||||
func (m *RackInfo) GetRemoteVolumeCount() uint64 {
|
||||
if m != nil {
|
||||
return m.RemoteVolumeCount
|
||||
}
|
||||
return 0
|
||||
}
|
||||
|
||||
type DataCenterInfo struct {
|
||||
Id string `protobuf:"bytes,1,opt,name=id" json:"id,omitempty"`
|
||||
VolumeCount uint64 `protobuf:"varint,2,opt,name=volume_count,json=volumeCount" json:"volume_count,omitempty"`
|
||||
@@ -1105,12 +1178,13 @@ type DataCenterInfo struct {
|
||||
FreeVolumeCount uint64 `protobuf:"varint,4,opt,name=free_volume_count,json=freeVolumeCount" json:"free_volume_count,omitempty"`
|
||||
ActiveVolumeCount uint64 `protobuf:"varint,5,opt,name=active_volume_count,json=activeVolumeCount" json:"active_volume_count,omitempty"`
|
||||
RackInfos []*RackInfo `protobuf:"bytes,6,rep,name=rack_infos,json=rackInfos" json:"rack_infos,omitempty"`
|
||||
RemoteVolumeCount uint64 `protobuf:"varint,7,opt,name=remote_volume_count,json=remoteVolumeCount" json:"remote_volume_count,omitempty"`
|
||||
}
|
||||
|
||||
func (m *DataCenterInfo) Reset() { *m = DataCenterInfo{} }
|
||||
func (m *DataCenterInfo) String() string { return proto.CompactTextString(m) }
|
||||
func (*DataCenterInfo) ProtoMessage() {}
|
||||
func (*DataCenterInfo) Descriptor() ([]byte, []int) { return fileDescriptor0, []int{24} }
|
||||
func (*DataCenterInfo) Descriptor() ([]byte, []int) { return fileDescriptor0, []int{25} }
|
||||
|
||||
func (m *DataCenterInfo) GetId() string {
|
||||
if m != nil {
|
||||
@@ -1154,6 +1228,13 @@ func (m *DataCenterInfo) GetRackInfos() []*RackInfo {
|
||||
return nil
|
||||
}
|
||||
|
||||
func (m *DataCenterInfo) GetRemoteVolumeCount() uint64 {
|
||||
if m != nil {
|
||||
return m.RemoteVolumeCount
|
||||
}
|
||||
return 0
|
||||
}
|
||||
|
||||
type TopologyInfo struct {
|
||||
Id string `protobuf:"bytes,1,opt,name=id" json:"id,omitempty"`
|
||||
VolumeCount uint64 `protobuf:"varint,2,opt,name=volume_count,json=volumeCount" json:"volume_count,omitempty"`
|
||||
@@ -1161,12 +1242,13 @@ type TopologyInfo struct {
|
||||
FreeVolumeCount uint64 `protobuf:"varint,4,opt,name=free_volume_count,json=freeVolumeCount" json:"free_volume_count,omitempty"`
|
||||
ActiveVolumeCount uint64 `protobuf:"varint,5,opt,name=active_volume_count,json=activeVolumeCount" json:"active_volume_count,omitempty"`
|
||||
DataCenterInfos []*DataCenterInfo `protobuf:"bytes,6,rep,name=data_center_infos,json=dataCenterInfos" json:"data_center_infos,omitempty"`
|
||||
RemoteVolumeCount uint64 `protobuf:"varint,7,opt,name=remote_volume_count,json=remoteVolumeCount" json:"remote_volume_count,omitempty"`
|
||||
}
|
||||
|
||||
func (m *TopologyInfo) Reset() { *m = TopologyInfo{} }
|
||||
func (m *TopologyInfo) String() string { return proto.CompactTextString(m) }
|
||||
func (*TopologyInfo) ProtoMessage() {}
|
||||
func (*TopologyInfo) Descriptor() ([]byte, []int) { return fileDescriptor0, []int{25} }
|
||||
func (*TopologyInfo) Descriptor() ([]byte, []int) { return fileDescriptor0, []int{26} }
|
||||
|
||||
func (m *TopologyInfo) GetId() string {
|
||||
if m != nil {
|
||||
@@ -1210,13 +1292,20 @@ func (m *TopologyInfo) GetDataCenterInfos() []*DataCenterInfo {
|
||||
return nil
|
||||
}
|
||||
|
||||
func (m *TopologyInfo) GetRemoteVolumeCount() uint64 {
|
||||
if m != nil {
|
||||
return m.RemoteVolumeCount
|
||||
}
|
||||
return 0
|
||||
}
|
||||
|
||||
type VolumeListRequest struct {
|
||||
}
|
||||
|
||||
func (m *VolumeListRequest) Reset() { *m = VolumeListRequest{} }
|
||||
func (m *VolumeListRequest) String() string { return proto.CompactTextString(m) }
|
||||
func (*VolumeListRequest) ProtoMessage() {}
|
||||
func (*VolumeListRequest) Descriptor() ([]byte, []int) { return fileDescriptor0, []int{26} }
|
||||
func (*VolumeListRequest) Descriptor() ([]byte, []int) { return fileDescriptor0, []int{27} }
|
||||
|
||||
type VolumeListResponse struct {
|
||||
TopologyInfo *TopologyInfo `protobuf:"bytes,1,opt,name=topology_info,json=topologyInfo" json:"topology_info,omitempty"`
|
||||
@@ -1226,7 +1315,7 @@ type VolumeListResponse struct {
|
||||
func (m *VolumeListResponse) Reset() { *m = VolumeListResponse{} }
|
||||
func (m *VolumeListResponse) String() string { return proto.CompactTextString(m) }
|
||||
func (*VolumeListResponse) ProtoMessage() {}
|
||||
func (*VolumeListResponse) Descriptor() ([]byte, []int) { return fileDescriptor0, []int{27} }
|
||||
func (*VolumeListResponse) Descriptor() ([]byte, []int) { return fileDescriptor0, []int{28} }
|
||||
|
||||
func (m *VolumeListResponse) GetTopologyInfo() *TopologyInfo {
|
||||
if m != nil {
|
||||
@@ -1249,7 +1338,7 @@ type LookupEcVolumeRequest struct {
|
||||
func (m *LookupEcVolumeRequest) Reset() { *m = LookupEcVolumeRequest{} }
|
||||
func (m *LookupEcVolumeRequest) String() string { return proto.CompactTextString(m) }
|
||||
func (*LookupEcVolumeRequest) ProtoMessage() {}
|
||||
func (*LookupEcVolumeRequest) Descriptor() ([]byte, []int) { return fileDescriptor0, []int{28} }
|
||||
func (*LookupEcVolumeRequest) Descriptor() ([]byte, []int) { return fileDescriptor0, []int{29} }
|
||||
|
||||
func (m *LookupEcVolumeRequest) GetVolumeId() uint32 {
|
||||
if m != nil {
|
||||
@@ -1266,7 +1355,7 @@ type LookupEcVolumeResponse struct {
|
||||
func (m *LookupEcVolumeResponse) Reset() { *m = LookupEcVolumeResponse{} }
|
||||
func (m *LookupEcVolumeResponse) String() string { return proto.CompactTextString(m) }
|
||||
func (*LookupEcVolumeResponse) ProtoMessage() {}
|
||||
func (*LookupEcVolumeResponse) Descriptor() ([]byte, []int) { return fileDescriptor0, []int{29} }
|
||||
func (*LookupEcVolumeResponse) Descriptor() ([]byte, []int) { return fileDescriptor0, []int{30} }
|
||||
|
||||
func (m *LookupEcVolumeResponse) GetVolumeId() uint32 {
|
||||
if m != nil {
|
||||
@@ -1293,7 +1382,7 @@ func (m *LookupEcVolumeResponse_EcShardIdLocation) Reset() {
|
||||
func (m *LookupEcVolumeResponse_EcShardIdLocation) String() string { return proto.CompactTextString(m) }
|
||||
func (*LookupEcVolumeResponse_EcShardIdLocation) ProtoMessage() {}
|
||||
func (*LookupEcVolumeResponse_EcShardIdLocation) Descriptor() ([]byte, []int) {
|
||||
return fileDescriptor0, []int{29, 0}
|
||||
return fileDescriptor0, []int{30, 0}
|
||||
}
|
||||
|
||||
func (m *LookupEcVolumeResponse_EcShardIdLocation) GetShardId() uint32 {
|
||||
@@ -1316,7 +1405,7 @@ type GetMasterConfigurationRequest struct {
|
||||
func (m *GetMasterConfigurationRequest) Reset() { *m = GetMasterConfigurationRequest{} }
|
||||
func (m *GetMasterConfigurationRequest) String() string { return proto.CompactTextString(m) }
|
||||
func (*GetMasterConfigurationRequest) ProtoMessage() {}
|
||||
func (*GetMasterConfigurationRequest) Descriptor() ([]byte, []int) { return fileDescriptor0, []int{30} }
|
||||
func (*GetMasterConfigurationRequest) Descriptor() ([]byte, []int) { return fileDescriptor0, []int{31} }
|
||||
|
||||
type GetMasterConfigurationResponse struct {
|
||||
MetricsAddress string `protobuf:"bytes,1,opt,name=metrics_address,json=metricsAddress" json:"metrics_address,omitempty"`
|
||||
@@ -1326,7 +1415,7 @@ type GetMasterConfigurationResponse struct {
|
||||
func (m *GetMasterConfigurationResponse) Reset() { *m = GetMasterConfigurationResponse{} }
|
||||
func (m *GetMasterConfigurationResponse) String() string { return proto.CompactTextString(m) }
|
||||
func (*GetMasterConfigurationResponse) ProtoMessage() {}
|
||||
func (*GetMasterConfigurationResponse) Descriptor() ([]byte, []int) { return fileDescriptor0, []int{31} }
|
||||
func (*GetMasterConfigurationResponse) Descriptor() ([]byte, []int) { return fileDescriptor0, []int{32} }
|
||||
|
||||
func (m *GetMasterConfigurationResponse) GetMetricsAddress() string {
|
||||
if m != nil {
|
||||
@@ -1348,6 +1437,7 @@ func init() {
|
||||
proto.RegisterType((*VolumeInformationMessage)(nil), "master_pb.VolumeInformationMessage")
|
||||
proto.RegisterType((*VolumeShortInformationMessage)(nil), "master_pb.VolumeShortInformationMessage")
|
||||
proto.RegisterType((*VolumeEcShardInformationMessage)(nil), "master_pb.VolumeEcShardInformationMessage")
|
||||
proto.RegisterType((*StorageBackend)(nil), "master_pb.StorageBackend")
|
||||
proto.RegisterType((*Empty)(nil), "master_pb.Empty")
|
||||
proto.RegisterType((*SuperBlockExtra)(nil), "master_pb.SuperBlockExtra")
|
||||
proto.RegisterType((*SuperBlockExtra_ErasureCoding)(nil), "master_pb.SuperBlockExtra.ErasureCoding")
|
||||
@@ -1817,127 +1907,137 @@ var _Seaweed_serviceDesc = grpc.ServiceDesc{
|
||||
func init() { proto.RegisterFile("master.proto", fileDescriptor0) }
|
||||
|
||||
var fileDescriptor0 = []byte{
|
||||
// 1943 bytes of a gzipped FileDescriptorProto
|
||||
0x1f, 0x8b, 0x08, 0x00, 0x00, 0x09, 0x6e, 0x88, 0x02, 0xff, 0xd4, 0x59, 0x4b, 0x6f, 0x1b, 0xc9,
|
||||
0x11, 0xf6, 0x90, 0x14, 0x45, 0x16, 0x1f, 0x22, 0x5b, 0xb2, 0x96, 0xe6, 0xc6, 0x16, 0x3d, 0x1b,
|
||||
0x60, 0xb5, 0xce, 0x46, 0xd9, 0x68, 0x17, 0x48, 0x80, 0x24, 0x58, 0xd8, 0xb2, 0x76, 0x23, 0xd8,
|
||||
0xf2, 0xda, 0x43, 0xc7, 0x0b, 0x04, 0x08, 0x26, 0xcd, 0x99, 0x96, 0x34, 0xd0, 0xbc, 0x32, 0xdd,
|
||||
0x94, 0xc9, 0xcd, 0x31, 0xb9, 0x05, 0xc8, 0x25, 0x87, 0x9c, 0x72, 0xcf, 0x3d, 0xb7, 0x1c, 0x72,
|
||||
0xc9, 0x8f, 0xc8, 0x39, 0x7f, 0x21, 0xd7, 0x20, 0x40, 0xd0, 0xaf, 0x99, 0x1e, 0x92, 0x92, 0xac,
|
||||
0x05, 0x7c, 0xf0, 0x6d, 0xa6, 0xaa, 0xba, 0xba, 0xe6, 0xab, 0xae, 0xaa, 0xaf, 0x49, 0x68, 0x47,
|
||||
0x98, 0x32, 0x92, 0xed, 0xa5, 0x59, 0xc2, 0x12, 0xd4, 0x94, 0x6f, 0x6e, 0x3a, 0xb1, 0xff, 0x50,
|
||||
0x87, 0xe6, 0xcf, 0x09, 0xce, 0xd8, 0x84, 0x60, 0x86, 0xba, 0x50, 0x09, 0xd2, 0x81, 0x35, 0xb2,
|
||||
0x76, 0x9b, 0x4e, 0x25, 0x48, 0x11, 0x82, 0x5a, 0x9a, 0x64, 0x6c, 0x50, 0x19, 0x59, 0xbb, 0x1d,
|
||||
0x47, 0x3c, 0xa3, 0xbb, 0x00, 0xe9, 0x74, 0x12, 0x06, 0x9e, 0x3b, 0xcd, 0xc2, 0x41, 0x55, 0xd8,
|
||||
0x36, 0xa5, 0xe4, 0x17, 0x59, 0x88, 0x76, 0xa1, 0x17, 0xe1, 0x99, 0x7b, 0x91, 0x84, 0xd3, 0x88,
|
||||
0xb8, 0x5e, 0x32, 0x8d, 0xd9, 0xa0, 0x26, 0x96, 0x77, 0x23, 0x3c, 0x7b, 0x25, 0xc4, 0x07, 0x5c,
|
||||
0x8a, 0x46, 0x3c, 0xaa, 0x99, 0x7b, 0x12, 0x84, 0xc4, 0x3d, 0x27, 0xf3, 0xc1, 0xda, 0xc8, 0xda,
|
||||
0xad, 0x39, 0x10, 0xe1, 0xd9, 0x17, 0x41, 0x48, 0x9e, 0x90, 0x39, 0xda, 0x81, 0x96, 0x8f, 0x19,
|
||||
0x76, 0x3d, 0x12, 0x33, 0x92, 0x0d, 0xea, 0x62, 0x2f, 0xe0, 0xa2, 0x03, 0x21, 0xe1, 0xf1, 0x65,
|
||||
0xd8, 0x3b, 0x1f, 0xac, 0x0b, 0x8d, 0x78, 0xe6, 0xf1, 0x61, 0x3f, 0x0a, 0x62, 0x57, 0x44, 0xde,
|
||||
0x10, 0x5b, 0x37, 0x85, 0xe4, 0x39, 0x0f, 0xff, 0x67, 0xb0, 0x2e, 0x63, 0xa3, 0x83, 0xe6, 0xa8,
|
||||
0xba, 0xdb, 0xda, 0xff, 0x60, 0x2f, 0x47, 0x63, 0x4f, 0x86, 0x77, 0x14, 0x9f, 0x24, 0x59, 0x84,
|
||||
0x59, 0x90, 0xc4, 0xc7, 0x84, 0x52, 0x7c, 0x4a, 0x1c, 0xbd, 0x06, 0x1d, 0x41, 0x2b, 0x26, 0x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3, 0xfc, 0xb3, 0x9a, 0xc2,
|
||||
0x44, 0xbf, 0xa2, 0x1e, 0x54, 0x19, 0x0b, 0x07, 0x20, 0xa4, 0xfc, 0x11, 0x7d, 0x04, 0x3d, 0x2f,
|
||||
0x89, 0x52, 0xec, 0x31, 0x37, 0x23, 0x17, 0x81, 0x58, 0xd4, 0x12, 0xea, 0x0d, 0x25, 0x77, 0x94,
|
||||
0x98, 0x7f, 0x4e, 0x94, 0xf8, 0xc1, 0x49, 0x40, 0x7c, 0x17, 0x33, 0x95, 0x26, 0x51, 0x72, 0x55,
|
||||
0xa7, 0xa7, 0x35, 0x0f, 0x99, 0x4c, 0x90, 0xfd, 0x57, 0x0b, 0xee, 0x5e, 0x59, 0xce, 0x4b, 0x49,
|
||||
0xba, 0x2e, 0x21, 0x6f, 0x0b, 0x03, 0x7b, 0x0a, 0x3b, 0xd7, 0x14, 0xd9, 0x35, 0xb1, 0x56, 0x96,
|
||||
0x62, 0xb5, 0xa1, 0x43, 0x3c, 0x37, 0x88, 0x7d, 0x32, 0x73, 0x27, 0x01, 0x93, 0xc7, 0xbf, 0xe3,
|
||||
0xb4, 0x88, 0x77, 0xc4, 0x65, 0x8f, 0x02, 0x46, 0xed, 0x75, 0x58, 0x3b, 0x8c, 0x52, 0x36, 0xb7,
|
||||
0xff, 0x61, 0xc1, 0xc6, 0x78, 0x9a, 0x92, 0xec, 0x51, 0x98, 0x78, 0xe7, 0x87, 0x33, 0x96, 0x61,
|
||||
0xf4, 0x15, 0x74, 0x49, 0x86, 0xe9, 0x34, 0xe3, 0xc7, 0xc6, 0x0f, 0xe2, 0x53, 0xb1, 0x79, 0xb9,
|
||||
0x5b, 0x2e, 0xac, 0xd9, 0x3b, 0x94, 0x0b, 0x0e, 0x84, 0xbd, 0xd3, 0x21, 0xe6, 0xeb, 0xf0, 0x97,
|
||||
0xd0, 0x29, 0xe9, 0x79, 0x4d, 0xf0, 0xd9, 0xa2, 0x3e, 0x4a, 0x3c, 0xf3, 0x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0xad, 0x02, 0x76, 0xdd, 0x07, 0x6f, 0x1b, 0xed, 0xa7, 0x58,
|
||||
0xe7, 0x98, 0x96, 0xf6, 0xf7, 0xe1, 0xbd, 0x42, 0xf5, 0x58, 0x34, 0xfa, 0xab, 0x06, 0xd0, 0x10,
|
||||
0x06, 0xcb, 0xe6, 0x32, 0x06, 0xfb, 0xdf, 0x15, 0x68, 0x3f, 0x56, 0x95, 0xcb, 0x59, 0x80, 0x31,
|
||||
0xf7, 0x9b, 0x62, 0xee, 0xdf, 0x87, 0x76, 0xa9, 0x20, 0x25, 0xa1, 0x6c, 0x5d, 0x18, 0x17, 0xbd,
|
||||
0x55, 0x57, 0xc2, 0xaa, 0x30, 0x5b, 0xbc, 0x12, 0x3e, 0x80, 0xfe, 0x49, 0x46, 0xc8, 0xf2, 0xed,
|
||||
0xb1, 0xe6, 0x6c, 0x70, 0x85, 0x69, 0xbb, 0x07, 0x9b, 0xd8, 0x63, 0xc1, 0xc5, 0x82, 0xb5, 0x3c,
|
||||
0x5f, 0x7d, 0xa9, 0x32, 0xed, 0xbf, 0xc8, 0x03, 0x0d, 0xe2, 0x93, 0x84, 0x0e, 0xea, 0x6f, 0x7e,
|
||||
0xfb, 0x53, 0x5f, 0xc3, 0x35, 0x14, 0x3d, 0x87, 0xae, 0xbe, 0x45, 0x28, 0x4f, 0xeb, 0x37, 0xbe,
|
||||
0xa1, 0xb4, 0x49, 0xa1, 0xa2, 0xf6, 0xef, 0x2b, 0xd0, 0x70, 0xb0, 0x77, 0xfe, 0x6e, 0xe3, 0xfb,
|
||||
0x39, 0x6c, 0xe4, 0x3d, 0xbf, 0x04, 0xf1, 0x7b, 0x06, 0x30, 0xe6, 0x51, 0x72, 0x3a, 0xbe, 0xf1,
|
||||
0x46, 0xed, 0xff, 0x59, 0xd0, 0x7d, 0x9c, 0xcf, 0x95, 0x77, 0x1b, 0x8c, 0x7d, 0x00, 0x3e, 0x08,
|
||||
0x4b, 0x38, 0x98, 0xc4, 0x41, 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0x20, 0x94, 0xeb, 0xba, 0x04, 0xc2, 0xca, 0x2e, 0x54, 0x02, 0x61, 0x75, 0x53, 0xb0, 0x6f,
|
||||
0xa1, 0x04, 0xb6, 0x57, 0x57, 0x1b, 0x32, 0x7f, 0x52, 0xb9, 0xb2, 0x64, 0x87, 0x1f, 0xbd, 0x81,
|
||||
0xa5, 0xde, 0x70, 0x52, 0x17, 0xff, 0x3e, 0x7c, 0xfa, 0xff, 0x00, 0x00, 0x00, 0xff, 0xff, 0x44,
|
||||
0x05, 0x7a, 0xc2, 0x8d, 0x18, 0x00, 0x00,
|
||||
// 2102 bytes of a gzipped FileDescriptorProto
|
||||
0x1f, 0x8b, 0x08, 0x00, 0x00, 0x09, 0x6e, 0x88, 0x02, 0xff, 0xd4, 0x59, 0x4b, 0x6f, 0x1c, 0xc7,
|
||||
0x11, 0xd6, 0xec, 0x2e, 0x97, 0xbb, 0xb5, 0xef, 0x26, 0x45, 0xaf, 0xd6, 0x96, 0xb5, 0x1a, 0x07,
|
||||
0x30, 0xa5, 0x38, 0x8c, 0x43, 0x1b, 0x88, 0x91, 0xc4, 0x30, 0x24, 0x8a, 0x76, 0x08, 0x89, 0xb4,
|
||||
0x34, 0x54, 0x64, 0x20, 0x40, 0x30, 0xe9, 0x9d, 0x69, 0x92, 0x03, 0xce, 0x2b, 0xd3, 0xbd, 0x14,
|
||||
0xd7, 0xb9, 0x04, 0xc8, 0x31, 0xa7, 0x20, 0x87, 0xfc, 0x85, 0x5c, 0x72, 0x4a, 0xce, 0xbe, 0xe4,
|
||||
0x47, 0xe4, 0x7f, 0xe4, 0xea, 0x4b, 0xd0, 0xaf, 0x99, 0x9e, 0x7d, 0x90, 0xa6, 0x01, 0x1f, 0x74,
|
||||
0x9b, 0xae, 0xaa, 0xae, 0xae, 0xfe, 0xaa, 0xbb, 0xea, 0xeb, 0x5d, 0x68, 0x47, 0x98, 0x32, 0x92,
|
||||
0xed, 0xa4, 0x59, 0xc2, 0x12, 0xd4, 0x94,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|
||||
0xcb, 0x0d, 0xeb, 0xc2, 0xb0, 0xaf, 0x34, 0x8f, 0x67, 0xda, 0xfa, 0x6d, 0x68, 0x66, 0x04, 0xfb,
|
||||
0x6e, 0x12, 0x87, 0x33, 0x51, 0x28, 0x1a, 0x4e, 0x83, 0x0b, 0xbe, 0x8c, 0xc3, 0x19, 0xfa, 0x31,
|
||||
0x0c, 0x32, 0x92, 0x86, 0x81, 0x87, 0xdd, 0x34, 0xc4, 0x1e, 0x89, 0x48, 0xac, 0x6b, 0x46, 0x5f,
|
||||
0x29, 0x9e, 0x6b, 0x39, 0x1a, 0xc2, 0xfa, 0x05, 0xc9, 0x28, 0xdf, 0x56, 0x53, 0x98, 0xe8, 0x21,
|
||||
0xea, 0x43, 0x95, 0xb1, 0x70, 0x08, 0x42, 0xca, 0x3f, 0xd1, 0x03, 0xe8, 0x7b, 0x49, 0x94, 0x62,
|
||||
0x8f, 0xb9, 0x19, 0xb9, 0x08, 0xc4, 0xa4, 0x96, 0x50, 0xf7, 0x94, 0xdc, 0x51, 0x62, 0xbe, 0x9d,
|
||||
0x28, 0xf1, 0x83, 0x93, 0x80, 0xf8, 0x2e, 0x66, 0x2a, 0xd9, 0xe2, 0xe2, 0x56, 0x9d, 0xbe, 0xd6,
|
||||
0x3c, 0x62, 0x32, 0xcd, 0x68, 0x07, 0x36, 0x32, 0x12, 0x25, 0x8c, 0xb8, 0x3a, 0xd9, 0x31, 0x8e,
|
||||
0xc8, 0xb0, 0x23, 0x70, 0x1e, 0x48, 0x95, 0xca, 0xf1, 0x11, 0x8e, 0x08, 0xf7, 0x3e, 0x67, 0xcf,
|
||||
0x6b, 0x6d, 0x57, 0x98, 0xf7, 0x4b, 0xe6, 0x4f, 0xc9, 0xcc, 0xfe, 0x87, 0x05, 0x77, 0xaf, 0x2c,
|
||||
0x39, 0x0b, 0x47, 0xe0, 0xba, 0x74, 0xff, 0x50, 0x08, 0xdb, 0x53, 0xb8, 0x77, 0x4d, 0x21, 0xb8,
|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, 0x60, 0x33,
|
||||
0x45, 0x34, 0xd4, 0x88, 0x97, 0x0a, 0x55, 0x78, 0x03, 0x5f, 0x82, 0xd6, 0x71, 0x9a, 0x52, 0x72,
|
||||
0xe0, 0x53, 0xfb, 0x21, 0x6c, 0x3e, 0x25, 0x24, 0xdd, 0x4b, 0xe2, 0x98, 0x78, 0x8c, 0xf8, 0x0e,
|
||||
0xf9, 0xc3, 0x94, 0x50, 0xc6, 0x97, 0x10, 0x77, 0x42, 0xe5, 0x83, 0x7f, 0xdb, 0x7f, 0xb7, 0xa0,
|
||||
0x2b, 0x8f, 0xcb, 0xb3, 0xc4, 0x13, 0x87, 0x84, 0x83, 0xc6, 0x19, 0x8c, 0x02, 0x6d, 0x9a, 0x85,
|
||||
0x73, 0xd4, 0xa6, 0x32, 0x4f, 0x6d, 0xee, 0x40, 0x43, 0xf4, 0xfe, 0x22, 0x98, 0x75, 0xde, 0xce,
|
||||
0x03, 0x9f, 0x16, 0x55, 0xcb, 0x97, 0xea, 0x9a, 0x50, 0xb7, 0x74, 0x7b, 0xe6, 0x26, 0x45, 0x67,
|
||||
0x58, 0x33, 0x3b, 0x83, 0xfd, 0x12, 0x36, 0x9e, 0x25, 0xc9, 0xf9, 0x34, 0x95, 0xe1, 0xe9, 0x4d,
|
||||
0x94, 0xf7, 0x6e, 0x8d, 0xab, 0x3c, 0x96, 0x7c, 0xef, 0xd7, 0x1d, 0x65, 0xfb, 0x7f, 0x16, 0x6c,
|
||||
0x96, 0xdd, 0xaa, 0x66, 0xf6, 0x7b, 0xd8, 0xc8, 0xfd, 0xba, 0xa1, 0xc2, 0x42, 0x2e, 0xd0, 0xda,
|
||||
0xfd, 0xd0, 0x48, 0xf3, 0xb2, 0xd9, 0x9a, 0x20, 0xf9, 0x1a, 0x44, 0x67, 0x70, 0x31, 0x27, 0xa1,
|
||||
0xa3, 0x4b, 0xe8, 0xcf, 0x9b, 0xf1, 0x22, 0x9c, 0xaf, 0xaa, 0x10, 0x6f, 0xe8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 0x7c, 0x9e, 0xf4, 0x35, 0x23, 0xe9,
|
||||
0x1c, 0x1a, 0x3c, 0x65, 0x67, 0x1a, 0x1a, 0xfe, 0x6d, 0x9f, 0xc2, 0xe0, 0x98, 0x61, 0x16, 0x50,
|
||||
0x16, 0x78, 0x54, 0xa7, 0x73, 0x2e, 0x71, 0xd6, 0x75, 0x89, 0xab, 0xac, 0x4a, 0x5c, 0x35, 0x4f,
|
||||
0x9c, 0xfd, 0x1f, 0x0b, 0x90, 0xb9, 0x92, 0x82, 0xe0, 0x07, 0x58, 0x8a, 0x43, 0xc6, 0x12, 0xc6,
|
||||
0xd9, 0x20, 0x67, 0x5c, 0x8a, 0x37, 0x09, 0x09, 0x4f, 0x1f, 0x3f, 0x0d, 0x53, 0x4a, 0x7c, 0xa9,
|
||||
0x95, 0xa4, 0xa9, 0xc1, 0x05, 0x42, 0x59, 0xe6, 0x5c, 0xf5, 0x39, 0xce, 0x65, 0x3f, 0x82, 0x96,
|
||||
0xea, 0x3f, 0x2f, 0x79, 0xef, 0xba, 0x3e, 0x7a, 0x15, 0x5d, 0xa5, 0x00, 0x62, 0x0c, 0xb0, 0x57,
|
||||
0x44, 0xbf, 0xac, 0x02, 0xff, 0x11, 0x6e, 0x17, 0x16, 0xcf, 0x02, 0xca, 0x74, 0x5e, 0x3e, 0x86,
|
||||
0xad, 0x20, 0xf6, 0xc2, 0xa9, 0x4f, 0xdc, 0x98, 0x77, 0xf0, 0x30, 0x7f, 0xbc, 0x58, 0x82, 0xad,
|
||||
0x6d, 0x2a, 0xed, 0x91, 0x50, 0xea, 0x47, 0xcc, 0x07, 0x80, 0xf4, 0x2c, 0xe2, 0xe5, 0x33, 0x2a,
|
||||
0x62, 0x46, 0x5f, 0x69, 0xf6, 0x3d, 0x65, 0x6d, 0xbf, 0x80, 0xad, 0xf9, 0xc5, 0x55, 0xaa, 0x7e,
|
||||
0x0e, 0xad, 0x02, 0x76, 0x5d, 0x07, 0x6f, 0x1b, 0xe5, 0xa7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42, 0x51, 0xa2, 0x4a, 0x20, 0x2c, 0xd4, 0xb3, 0x12, 0x08, 0x8b, 0x75, 0x4d,
|
||||
0x82, 0x50, 0xbe, 0xd7, 0x25, 0x10, 0x96, 0x56, 0xa1, 0x12, 0x08, 0xcb, 0x8b, 0x82, 0x7d, 0x0b,
|
||||
0x25, 0xb0, 0xb5, 0xfc, 0xb6, 0x21, 0xf3, 0x27, 0xa1, 0x2b, 0xaf, 0xec, 0xe8, 0xc1, 0x77, 0xb0,
|
||||
0xd4, 0x0b, 0x4e, 0xea, 0xe2, 0x2f, 0xaa, 0x8f, 0xfe, 0x1f, 0x00, 0x00, 0xff, 0xff, 0x6c, 0x64,
|
||||
0x5c, 0xbc, 0xb2, 0x1a, 0x00, 0x00,
|
||||
}
|
||||
@@ -0,0 +1,43 @@
|
||||
package pb
|
||||
|
||||
import (
|
||||
"fmt"
|
||||
"testing"
|
||||
|
||||
"github.com/chrislusf/seaweedfs/weed/pb/volume_server_pb"
|
||||
"github.com/golang/protobuf/jsonpb"
|
||||
)
|
||||
|
||||
func TestJsonpMarshalUnmarshal(t *testing.T) {
|
||||
|
||||
tv := &volume_server_pb.RemoteFile{
|
||||
BackendType: "aws",
|
||||
BackendId: "",
|
||||
FileSize: 12,
|
||||
}
|
||||
|
||||
m := jsonpb.Marshaler{
|
||||
EmitDefaults: true,
|
||||
Indent: " ",
|
||||
}
|
||||
|
||||
if text, err := m.MarshalToString(tv); err != nil {
|
||||
fmt.Printf("marshal eror: %v\n", err)
|
||||
} else {
|
||||
fmt.Printf("marshalled: %s\n", text)
|
||||
}
|
||||
|
||||
rawJson := `{
|
||||
"backendType":"aws",
|
||||
"backendId":"temp",
|
||||
"FileSize":12
|
||||
}`
|
||||
|
||||
tv1 := &volume_server_pb.RemoteFile{}
|
||||
if err := jsonpb.UnmarshalString(rawJson, tv1); err != nil {
|
||||
fmt.Printf("unmarshal error: %v\n", err)
|
||||
}
|
||||
|
||||
fmt.Printf("unmarshalled: %+v\n", tv1)
|
||||
|
||||
}
|
||||
+40
-11
@@ -67,6 +67,10 @@ service VolumeServer {
|
||||
rpc VolumeEcBlobDelete (VolumeEcBlobDeleteRequest) returns (VolumeEcBlobDeleteResponse) {
|
||||
}
|
||||
|
||||
// tiered storage
|
||||
rpc VolumeTierCopyDatToRemote (VolumeTierCopyDatToRemoteRequest) returns (stream VolumeTierCopyDatToRemoteResponse) {
|
||||
}
|
||||
|
||||
// query
|
||||
rpc Query (QueryRequest) returns (stream QueriedStripe) {
|
||||
}
|
||||
@@ -324,6 +328,31 @@ message MemStatus {
|
||||
uint64 stack = 7;
|
||||
}
|
||||
|
||||
// tired storage on volume servers
|
||||
message RemoteFile {
|
||||
string backend_type = 1;
|
||||
string backend_id = 2;
|
||||
string key = 3;
|
||||
uint64 offset = 4;
|
||||
uint64 file_size = 5;
|
||||
uint64 modified_time = 6;
|
||||
}
|
||||
message VolumeTierInfo {
|
||||
repeated RemoteFile files = 1;
|
||||
}
|
||||
|
||||
message VolumeTierCopyDatToRemoteRequest {
|
||||
uint32 volume_id = 1;
|
||||
string collection = 2;
|
||||
string destination_backend_name = 3;
|
||||
bool keep_local_dat_file = 4;
|
||||
}
|
||||
message VolumeTierCopyDatToRemoteResponse {
|
||||
int64 processed = 1;
|
||||
float processedPercentage = 2;
|
||||
}
|
||||
|
||||
// select on volume servers
|
||||
message QueryRequest {
|
||||
repeated string selections = 1;
|
||||
repeated string from_file_ids = 2;
|
||||
@@ -338,17 +367,17 @@ message QueryRequest {
|
||||
// NONE | GZIP | BZIP2
|
||||
string compression_type = 1;
|
||||
message CSVInput {
|
||||
string file_header_info = 1; // Valid values: NONE | USE | IGNORE
|
||||
string record_delimiter = 2; // Default: \n
|
||||
string field_delimiter = 3; // Default: ,
|
||||
string quote_charactoer = 4; // Default: "
|
||||
string file_header_info = 1; // Valid values: NONE | USE | IGNORE
|
||||
string record_delimiter = 2; // Default: \n
|
||||
string field_delimiter = 3; // Default: ,
|
||||
string quote_charactoer = 4; // Default: "
|
||||
string quote_escape_character = 5; // Default: "
|
||||
string comments = 6; // Default: #
|
||||
string comments = 6; // Default: #
|
||||
// If true, records might contain record delimiters within quote characters
|
||||
bool allow_quoted_record_delimiter = 7; // default False.
|
||||
bool allow_quoted_record_delimiter = 7; // default False.
|
||||
}
|
||||
message JSONInput {
|
||||
string type = 1; // Valid values: DOCUMENT | LINES
|
||||
string type = 1; // Valid values: DOCUMENT | LINES
|
||||
}
|
||||
message ParquetInput {
|
||||
}
|
||||
@@ -361,10 +390,10 @@ message QueryRequest {
|
||||
|
||||
message OutputSerialization {
|
||||
message CSVOutput {
|
||||
string quote_fields = 1; // Valid values: ALWAYS | ASNEEDED
|
||||
string record_delimiter = 2; // Default: \n
|
||||
string field_delimiter = 3; // Default: ,
|
||||
string quote_charactoer = 4; // Default: "
|
||||
string quote_fields = 1; // Valid values: ALWAYS | ASNEEDED
|
||||
string record_delimiter = 2; // Default: \n
|
||||
string field_delimiter = 3; // Default: ,
|
||||
string quote_charactoer = 4; // Default: "
|
||||
string quote_escape_character = 5; // Default: "
|
||||
}
|
||||
message JSONOutput {
|
||||
|
||||
@@ -65,6 +65,10 @@ It has these top-level messages:
|
||||
ReadVolumeFileStatusResponse
|
||||
DiskStatus
|
||||
MemStatus
|
||||
RemoteFile
|
||||
VolumeTierInfo
|
||||
VolumeTierCopyDatToRemoteRequest
|
||||
VolumeTierCopyDatToRemoteResponse
|
||||
QueryRequest
|
||||
QueriedStripe
|
||||
*/
|
||||
@@ -1394,6 +1398,148 @@ func (m *MemStatus) GetStack() uint64 {
|
||||
return 0
|
||||
}
|
||||
|
||||
// tired storage on volume servers
|
||||
type RemoteFile struct {
|
||||
BackendType string `protobuf:"bytes,1,opt,name=backend_type,json=backendType" json:"backend_type,omitempty"`
|
||||
BackendId string `protobuf:"bytes,2,opt,name=backend_id,json=backendId" json:"backend_id,omitempty"`
|
||||
Key string `protobuf:"bytes,3,opt,name=key" json:"key,omitempty"`
|
||||
Offset uint64 `protobuf:"varint,4,opt,name=offset" json:"offset,omitempty"`
|
||||
FileSize uint64 `protobuf:"varint,5,opt,name=file_size,json=fileSize" json:"file_size,omitempty"`
|
||||
ModifiedTime uint64 `protobuf:"varint,6,opt,name=modified_time,json=modifiedTime" json:"modified_time,omitempty"`
|
||||
}
|
||||
|
||||
func (m *RemoteFile) Reset() { *m = RemoteFile{} }
|
||||
func (m *RemoteFile) String() string { return proto.CompactTextString(m) }
|
||||
func (*RemoteFile) ProtoMessage() {}
|
||||
func (*RemoteFile) Descriptor() ([]byte, []int) { return fileDescriptor0, []int{56} }
|
||||
|
||||
func (m *RemoteFile) GetBackendType() string {
|
||||
if m != nil {
|
||||
return m.BackendType
|
||||
}
|
||||
return ""
|
||||
}
|
||||
|
||||
func (m *RemoteFile) GetBackendId() string {
|
||||
if m != nil {
|
||||
return m.BackendId
|
||||
}
|
||||
return ""
|
||||
}
|
||||
|
||||
func (m *RemoteFile) GetKey() string {
|
||||
if m != nil {
|
||||
return m.Key
|
||||
}
|
||||
return ""
|
||||
}
|
||||
|
||||
func (m *RemoteFile) GetOffset() uint64 {
|
||||
if m != nil {
|
||||
return m.Offset
|
||||
}
|
||||
return 0
|
||||
}
|
||||
|
||||
func (m *RemoteFile) GetFileSize() uint64 {
|
||||
if m != nil {
|
||||
return m.FileSize
|
||||
}
|
||||
return 0
|
||||
}
|
||||
|
||||
func (m *RemoteFile) GetModifiedTime() uint64 {
|
||||
if m != nil {
|
||||
return m.ModifiedTime
|
||||
}
|
||||
return 0
|
||||
}
|
||||
|
||||
type VolumeTierInfo struct {
|
||||
Files []*RemoteFile `protobuf:"bytes,1,rep,name=files" json:"files,omitempty"`
|
||||
}
|
||||
|
||||
func (m *VolumeTierInfo) Reset() { *m = VolumeTierInfo{} }
|
||||
func (m *VolumeTierInfo) String() string { return proto.CompactTextString(m) }
|
||||
func (*VolumeTierInfo) ProtoMessage() {}
|
||||
func (*VolumeTierInfo) Descriptor() ([]byte, []int) { return fileDescriptor0, []int{57} }
|
||||
|
||||
func (m *VolumeTierInfo) GetFiles() []*RemoteFile {
|
||||
if m != nil {
|
||||
return m.Files
|
||||
}
|
||||
return nil
|
||||
}
|
||||
|
||||
type VolumeTierCopyDatToRemoteRequest struct {
|
||||
VolumeId uint32 `protobuf:"varint,1,opt,name=volume_id,json=volumeId" json:"volume_id,omitempty"`
|
||||
Collection string `protobuf:"bytes,2,opt,name=collection" json:"collection,omitempty"`
|
||||
DestinationBackendName string `protobuf:"bytes,3,opt,name=destination_backend_name,json=destinationBackendName" json:"destination_backend_name,omitempty"`
|
||||
KeepLocalDatFile bool `protobuf:"varint,4,opt,name=keep_local_dat_file,json=keepLocalDatFile" json:"keep_local_dat_file,omitempty"`
|
||||
}
|
||||
|
||||
func (m *VolumeTierCopyDatToRemoteRequest) Reset() { *m = VolumeTierCopyDatToRemoteRequest{} }
|
||||
func (m *VolumeTierCopyDatToRemoteRequest) String() string { return proto.CompactTextString(m) }
|
||||
func (*VolumeTierCopyDatToRemoteRequest) ProtoMessage() {}
|
||||
func (*VolumeTierCopyDatToRemoteRequest) Descriptor() ([]byte, []int) {
|
||||
return fileDescriptor0, []int{58}
|
||||
}
|
||||
|
||||
func (m *VolumeTierCopyDatToRemoteRequest) GetVolumeId() uint32 {
|
||||
if m != nil {
|
||||
return m.VolumeId
|
||||
}
|
||||
return 0
|
||||
}
|
||||
|
||||
func (m *VolumeTierCopyDatToRemoteRequest) GetCollection() string {
|
||||
if m != nil {
|
||||
return m.Collection
|
||||
}
|
||||
return ""
|
||||
}
|
||||
|
||||
func (m *VolumeTierCopyDatToRemoteRequest) GetDestinationBackendName() string {
|
||||
if m != nil {
|
||||
return m.DestinationBackendName
|
||||
}
|
||||
return ""
|
||||
}
|
||||
|
||||
func (m *VolumeTierCopyDatToRemoteRequest) GetKeepLocalDatFile() bool {
|
||||
if m != nil {
|
||||
return m.KeepLocalDatFile
|
||||
}
|
||||
return false
|
||||
}
|
||||
|
||||
type VolumeTierCopyDatToRemoteResponse struct {
|
||||
Processed int64 `protobuf:"varint,1,opt,name=processed" json:"processed,omitempty"`
|
||||
ProcessedPercentage float32 `protobuf:"fixed32,2,opt,name=processedPercentage" json:"processedPercentage,omitempty"`
|
||||
}
|
||||
|
||||
func (m *VolumeTierCopyDatToRemoteResponse) Reset() { *m = VolumeTierCopyDatToRemoteResponse{} }
|
||||
func (m *VolumeTierCopyDatToRemoteResponse) String() string { return proto.CompactTextString(m) }
|
||||
func (*VolumeTierCopyDatToRemoteResponse) ProtoMessage() {}
|
||||
func (*VolumeTierCopyDatToRemoteResponse) Descriptor() ([]byte, []int) {
|
||||
return fileDescriptor0, []int{59}
|
||||
}
|
||||
|
||||
func (m *VolumeTierCopyDatToRemoteResponse) GetProcessed() int64 {
|
||||
if m != nil {
|
||||
return m.Processed
|
||||
}
|
||||
return 0
|
||||
}
|
||||
|
||||
func (m *VolumeTierCopyDatToRemoteResponse) GetProcessedPercentage() float32 {
|
||||
if m != nil {
|
||||
return m.ProcessedPercentage
|
||||
}
|
||||
return 0
|
||||
}
|
||||
|
||||
// select on volume servers
|
||||
type QueryRequest struct {
|
||||
Selections []string `protobuf:"bytes,1,rep,name=selections" json:"selections,omitempty"`
|
||||
FromFileIds []string `protobuf:"bytes,2,rep,name=from_file_ids,json=fromFileIds" json:"from_file_ids,omitempty"`
|
||||
@@ -1405,7 +1551,7 @@ type QueryRequest struct {
|
||||
func (m *QueryRequest) Reset() { *m = QueryRequest{} }
|
||||
func (m *QueryRequest) String() string { return proto.CompactTextString(m) }
|
||||
func (*QueryRequest) ProtoMessage() {}
|
||||
func (*QueryRequest) Descriptor() ([]byte, []int) { return fileDescriptor0, []int{56} }
|
||||
func (*QueryRequest) Descriptor() ([]byte, []int) { return fileDescriptor0, []int{60} }
|
||||
|
||||
func (m *QueryRequest) GetSelections() []string {
|
||||
if m != nil {
|
||||
@@ -1451,7 +1597,7 @@ type QueryRequest_Filter struct {
|
||||
func (m *QueryRequest_Filter) Reset() { *m = QueryRequest_Filter{} }
|
||||
func (m *QueryRequest_Filter) String() string { return proto.CompactTextString(m) }
|
||||
func (*QueryRequest_Filter) ProtoMessage() {}
|
||||
func (*QueryRequest_Filter) Descriptor() ([]byte, []int) { return fileDescriptor0, []int{56, 0} }
|
||||
func (*QueryRequest_Filter) Descriptor() ([]byte, []int) { return fileDescriptor0, []int{60, 0} }
|
||||
|
||||
func (m *QueryRequest_Filter) GetField() string {
|
||||
if m != nil {
|
||||
@@ -1486,7 +1632,7 @@ func (m *QueryRequest_InputSerialization) Reset() { *m = QueryRequest_In
|
||||
func (m *QueryRequest_InputSerialization) String() string { return proto.CompactTextString(m) }
|
||||
func (*QueryRequest_InputSerialization) ProtoMessage() {}
|
||||
func (*QueryRequest_InputSerialization) Descriptor() ([]byte, []int) {
|
||||
return fileDescriptor0, []int{56, 1}
|
||||
return fileDescriptor0, []int{60, 1}
|
||||
}
|
||||
|
||||
func (m *QueryRequest_InputSerialization) GetCompressionType() string {
|
||||
@@ -1534,7 +1680,7 @@ func (m *QueryRequest_InputSerialization_CSVInput) Reset() {
|
||||
func (m *QueryRequest_InputSerialization_CSVInput) String() string { return proto.CompactTextString(m) }
|
||||
func (*QueryRequest_InputSerialization_CSVInput) ProtoMessage() {}
|
||||
func (*QueryRequest_InputSerialization_CSVInput) Descriptor() ([]byte, []int) {
|
||||
return fileDescriptor0, []int{56, 1, 0}
|
||||
return fileDescriptor0, []int{60, 1, 0}
|
||||
}
|
||||
|
||||
func (m *QueryRequest_InputSerialization_CSVInput) GetFileHeaderInfo() string {
|
||||
@@ -1596,7 +1742,7 @@ func (m *QueryRequest_InputSerialization_JSONInput) Reset() {
|
||||
func (m *QueryRequest_InputSerialization_JSONInput) String() string { return proto.CompactTextString(m) }
|
||||
func (*QueryRequest_InputSerialization_JSONInput) ProtoMessage() {}
|
||||
func (*QueryRequest_InputSerialization_JSONInput) Descriptor() ([]byte, []int) {
|
||||
return fileDescriptor0, []int{56, 1, 1}
|
||||
return fileDescriptor0, []int{60, 1, 1}
|
||||
}
|
||||
|
||||
func (m *QueryRequest_InputSerialization_JSONInput) GetType() string {
|
||||
@@ -1617,7 +1763,7 @@ func (m *QueryRequest_InputSerialization_ParquetInput) String() string {
|
||||
}
|
||||
func (*QueryRequest_InputSerialization_ParquetInput) ProtoMessage() {}
|
||||
func (*QueryRequest_InputSerialization_ParquetInput) Descriptor() ([]byte, []int) {
|
||||
return fileDescriptor0, []int{56, 1, 2}
|
||||
return fileDescriptor0, []int{60, 1, 2}
|
||||
}
|
||||
|
||||
type QueryRequest_OutputSerialization struct {
|
||||
@@ -1629,7 +1775,7 @@ func (m *QueryRequest_OutputSerialization) Reset() { *m = QueryRequest_O
|
||||
func (m *QueryRequest_OutputSerialization) String() string { return proto.CompactTextString(m) }
|
||||
func (*QueryRequest_OutputSerialization) ProtoMessage() {}
|
||||
func (*QueryRequest_OutputSerialization) Descriptor() ([]byte, []int) {
|
||||
return fileDescriptor0, []int{56, 2}
|
||||
return fileDescriptor0, []int{60, 2}
|
||||
}
|
||||
|
||||
func (m *QueryRequest_OutputSerialization) GetCsvOutput() *QueryRequest_OutputSerialization_CSVOutput {
|
||||
@@ -1662,7 +1808,7 @@ func (m *QueryRequest_OutputSerialization_CSVOutput) String() string {
|
||||
}
|
||||
func (*QueryRequest_OutputSerialization_CSVOutput) ProtoMessage() {}
|
||||
func (*QueryRequest_OutputSerialization_CSVOutput) Descriptor() ([]byte, []int) {
|
||||
return fileDescriptor0, []int{56, 2, 0}
|
||||
return fileDescriptor0, []int{60, 2, 0}
|
||||
}
|
||||
|
||||
func (m *QueryRequest_OutputSerialization_CSVOutput) GetQuoteFields() string {
|
||||
@@ -1712,7 +1858,7 @@ func (m *QueryRequest_OutputSerialization_JSONOutput) String() string {
|
||||
}
|
||||
func (*QueryRequest_OutputSerialization_JSONOutput) ProtoMessage() {}
|
||||
func (*QueryRequest_OutputSerialization_JSONOutput) Descriptor() ([]byte, []int) {
|
||||
return fileDescriptor0, []int{56, 2, 1}
|
||||
return fileDescriptor0, []int{60, 2, 1}
|
||||
}
|
||||
|
||||
func (m *QueryRequest_OutputSerialization_JSONOutput) GetRecordDelimiter() string {
|
||||
@@ -1729,7 +1875,7 @@ type QueriedStripe struct {
|
||||
func (m *QueriedStripe) Reset() { *m = QueriedStripe{} }
|
||||
func (m *QueriedStripe) String() string { return proto.CompactTextString(m) }
|
||||
func (*QueriedStripe) ProtoMessage() {}
|
||||
func (*QueriedStripe) Descriptor() ([]byte, []int) { return fileDescriptor0, []int{57} }
|
||||
func (*QueriedStripe) Descriptor() ([]byte, []int) { return fileDescriptor0, []int{61} }
|
||||
|
||||
func (m *QueriedStripe) GetRecords() []byte {
|
||||
if m != nil {
|
||||
@@ -1795,6 +1941,10 @@ func init() {
|
||||
proto.RegisterType((*ReadVolumeFileStatusResponse)(nil), "volume_server_pb.ReadVolumeFileStatusResponse")
|
||||
proto.RegisterType((*DiskStatus)(nil), "volume_server_pb.DiskStatus")
|
||||
proto.RegisterType((*MemStatus)(nil), "volume_server_pb.MemStatus")
|
||||
proto.RegisterType((*RemoteFile)(nil), "volume_server_pb.RemoteFile")
|
||||
proto.RegisterType((*VolumeTierInfo)(nil), "volume_server_pb.VolumeTierInfo")
|
||||
proto.RegisterType((*VolumeTierCopyDatToRemoteRequest)(nil), "volume_server_pb.VolumeTierCopyDatToRemoteRequest")
|
||||
proto.RegisterType((*VolumeTierCopyDatToRemoteResponse)(nil), "volume_server_pb.VolumeTierCopyDatToRemoteResponse")
|
||||
proto.RegisterType((*QueryRequest)(nil), "volume_server_pb.QueryRequest")
|
||||
proto.RegisterType((*QueryRequest_Filter)(nil), "volume_server_pb.QueryRequest.Filter")
|
||||
proto.RegisterType((*QueryRequest_InputSerialization)(nil), "volume_server_pb.QueryRequest.InputSerialization")
|
||||
@@ -1847,6 +1997,8 @@ type VolumeServerClient interface {
|
||||
VolumeEcShardsUnmount(ctx context.Context, in *VolumeEcShardsUnmountRequest, opts ...grpc.CallOption) (*VolumeEcShardsUnmountResponse, error)
|
||||
VolumeEcShardRead(ctx context.Context, in *VolumeEcShardReadRequest, opts ...grpc.CallOption) (VolumeServer_VolumeEcShardReadClient, error)
|
||||
VolumeEcBlobDelete(ctx context.Context, in *VolumeEcBlobDeleteRequest, opts ...grpc.CallOption) (*VolumeEcBlobDeleteResponse, error)
|
||||
// tiered storage
|
||||
VolumeTierCopyDatToRemote(ctx context.Context, in *VolumeTierCopyDatToRemoteRequest, opts ...grpc.CallOption) (VolumeServer_VolumeTierCopyDatToRemoteClient, error)
|
||||
// query
|
||||
Query(ctx context.Context, in *QueryRequest, opts ...grpc.CallOption) (VolumeServer_QueryClient, error)
|
||||
}
|
||||
@@ -2185,8 +2337,40 @@ func (c *volumeServerClient) VolumeEcBlobDelete(ctx context.Context, in *VolumeE
|
||||
return out, nil
|
||||
}
|
||||
|
||||
func (c *volumeServerClient) VolumeTierCopyDatToRemote(ctx context.Context, in *VolumeTierCopyDatToRemoteRequest, opts ...grpc.CallOption) (VolumeServer_VolumeTierCopyDatToRemoteClient, error) {
|
||||
stream, err := grpc.NewClientStream(ctx, &_VolumeServer_serviceDesc.Streams[4], c.cc, "/volume_server_pb.VolumeServer/VolumeTierCopyDatToRemote", opts...)
|
||||
if err != nil {
|
||||
return nil, err
|
||||
}
|
||||
x := &volumeServerVolumeTierCopyDatToRemoteClient{stream}
|
||||
if err := x.ClientStream.SendMsg(in); err != nil {
|
||||
return nil, err
|
||||
}
|
||||
if err := x.ClientStream.CloseSend(); err != nil {
|
||||
return nil, err
|
||||
}
|
||||
return x, nil
|
||||
}
|
||||
|
||||
type VolumeServer_VolumeTierCopyDatToRemoteClient interface {
|
||||
Recv() (*VolumeTierCopyDatToRemoteResponse, error)
|
||||
grpc.ClientStream
|
||||
}
|
||||
|
||||
type volumeServerVolumeTierCopyDatToRemoteClient struct {
|
||||
grpc.ClientStream
|
||||
}
|
||||
|
||||
func (x *volumeServerVolumeTierCopyDatToRemoteClient) Recv() (*VolumeTierCopyDatToRemoteResponse, error) {
|
||||
m := new(VolumeTierCopyDatToRemoteResponse)
|
||||
if err := x.ClientStream.RecvMsg(m); err != nil {
|
||||
return nil, err
|
||||
}
|
||||
return m, nil
|
||||
}
|
||||
|
||||
func (c *volumeServerClient) Query(ctx context.Context, in *QueryRequest, opts ...grpc.CallOption) (VolumeServer_QueryClient, error) {
|
||||
stream, err := grpc.NewClientStream(ctx, &_VolumeServer_serviceDesc.Streams[4], c.cc, "/volume_server_pb.VolumeServer/Query", opts...)
|
||||
stream, err := grpc.NewClientStream(ctx, &_VolumeServer_serviceDesc.Streams[5], c.cc, "/volume_server_pb.VolumeServer/Query", opts...)
|
||||
if err != nil {
|
||||
return nil, err
|
||||
}
|
||||
@@ -2249,6 +2433,8 @@ type VolumeServerServer interface {
|
||||
VolumeEcShardsUnmount(context.Context, *VolumeEcShardsUnmountRequest) (*VolumeEcShardsUnmountResponse, error)
|
||||
VolumeEcShardRead(*VolumeEcShardReadRequest, VolumeServer_VolumeEcShardReadServer) error
|
||||
VolumeEcBlobDelete(context.Context, *VolumeEcBlobDeleteRequest) (*VolumeEcBlobDeleteResponse, error)
|
||||
// tiered storage
|
||||
VolumeTierCopyDatToRemote(*VolumeTierCopyDatToRemoteRequest, VolumeServer_VolumeTierCopyDatToRemoteServer) error
|
||||
// query
|
||||
Query(*QueryRequest, VolumeServer_QueryServer) error
|
||||
}
|
||||
@@ -2737,6 +2923,27 @@ func _VolumeServer_VolumeEcBlobDelete_Handler(srv interface{}, ctx context.Conte
|
||||
return interceptor(ctx, in, info, handler)
|
||||
}
|
||||
|
||||
func _VolumeServer_VolumeTierCopyDatToRemote_Handler(srv interface{}, stream grpc.ServerStream) error {
|
||||
m := new(VolumeTierCopyDatToRemoteRequest)
|
||||
if err := stream.RecvMsg(m); err != nil {
|
||||
return err
|
||||
}
|
||||
return srv.(VolumeServerServer).VolumeTierCopyDatToRemote(m, &volumeServerVolumeTierCopyDatToRemoteServer{stream})
|
||||
}
|
||||
|
||||
type VolumeServer_VolumeTierCopyDatToRemoteServer interface {
|
||||
Send(*VolumeTierCopyDatToRemoteResponse) error
|
||||
grpc.ServerStream
|
||||
}
|
||||
|
||||
type volumeServerVolumeTierCopyDatToRemoteServer struct {
|
||||
grpc.ServerStream
|
||||
}
|
||||
|
||||
func (x *volumeServerVolumeTierCopyDatToRemoteServer) Send(m *VolumeTierCopyDatToRemoteResponse) error {
|
||||
return x.ServerStream.SendMsg(m)
|
||||
}
|
||||
|
||||
func _VolumeServer_Query_Handler(srv interface{}, stream grpc.ServerStream) error {
|
||||
m := new(QueryRequest)
|
||||
if err := stream.RecvMsg(m); err != nil {
|
||||
@@ -2872,6 +3079,11 @@ var _VolumeServer_serviceDesc = grpc.ServiceDesc{
|
||||
Handler: _VolumeServer_VolumeEcShardRead_Handler,
|
||||
ServerStreams: true,
|
||||
},
|
||||
{
|
||||
StreamName: "VolumeTierCopyDatToRemote",
|
||||
Handler: _VolumeServer_VolumeTierCopyDatToRemote_Handler,
|
||||
ServerStreams: true,
|
||||
},
|
||||
{
|
||||
StreamName: "Query",
|
||||
Handler: _VolumeServer_Query_Handler,
|
||||
@@ -2884,162 +3096,176 @@ var _VolumeServer_serviceDesc = grpc.ServiceDesc{
|
||||
func init() { proto.RegisterFile("volume_server.proto", fileDescriptor0) }
|
||||
|
||||
var fileDescriptor0 = []byte{
|
||||
// 2503 bytes of a gzipped FileDescriptorProto
|
||||
0x1f, 0x8b, 0x08, 0x00, 0x00, 0x09, 0x6e, 0x88, 0x02, 0xff, 0xd4, 0x1a, 0x4d, 0x77, 0x1c, 0x47,
|
||||
0x51, 0xeb, 0x5d, 0x49, 0xbb, 0xb5, 0x2b, 0x4b, 0x6e, 0xc9, 0xd2, 0x7a, 0x6c, 0xc9, 0xca, 0xe4,
|
||||
0xc3, 0xb2, 0x9d, 0xc8, 0x8e, 0x02, 0x24, 0x24, 0x04, 0xb0, 0x65, 0x1b, 0x4c, 0x62, 0x99, 0x8c,
|
||||
0x1c, 0x13, 0x70, 0x1e, 0xf3, 0x5a, 0x33, 0x2d, 0x6b, 0xd0, 0xcc, 0xf4, 0x78, 0xa6, 0x47, 0xd6,
|
||||
0xfa, 0xc1, 0x29, 0x5c, 0xf9, 0x01, 0x9c, 0x39, 0x71, 0xe1, 0xca, 0x0f, 0xe0, 0xc2, 0x0f, 0x80,
|
||||
0x2b, 0x17, 0xce, 0x1c, 0xb8, 0xf1, 0x1e, 0x17, 0x5e, 0x7f, 0xcc, 0xec, 0x7c, 0x6a, 0x47, 0xb1,
|
||||
0xdf, 0xe3, 0xe5, 0xd6, 0x53, 0x5d, 0x1f, 0x5d, 0xd5, 0x55, 0xd5, 0xd5, 0xd5, 0x03, 0x8b, 0x47,
|
||||
0xd4, 0x8d, 0x3d, 0x62, 0x46, 0x24, 0x3c, 0x22, 0xe1, 0x66, 0x10, 0x52, 0x46, 0xd1, 0x42, 0x0e,
|
||||
0x68, 0x06, 0x7b, 0xfa, 0x0d, 0x40, 0xb7, 0x31, 0xb3, 0x0e, 0xee, 0x10, 0x97, 0x30, 0x62, 0x90,
|
||||
0x67, 0x31, 0x89, 0x18, 0xba, 0x00, 0xdd, 0x7d, 0xc7, 0x25, 0xa6, 0x63, 0x47, 0xc3, 0xd6, 0x7a,
|
||||
0x7b, 0xa3, 0x67, 0xcc, 0xf2, 0xef, 0xfb, 0x76, 0xa4, 0x3f, 0x84, 0xc5, 0x1c, 0x41, 0x14, 0x50,
|
||||
0x3f, 0x22, 0xe8, 0x03, 0x98, 0x0d, 0x49, 0x14, 0xbb, 0x4c, 0x12, 0xf4, 0xb7, 0xd6, 0x36, 0x8b,
|
||||
0xb2, 0x36, 0x53, 0x92, 0xd8, 0x65, 0x46, 0x82, 0xae, 0x7f, 0xd5, 0x82, 0x41, 0x76, 0x06, 0xad,
|
||||
0xc0, 0xac, 0x12, 0x3e, 0x6c, 0xad, 0xb7, 0x36, 0x7a, 0xc6, 0x8c, 0x94, 0x8d, 0x96, 0x61, 0x26,
|
||||
0x62, 0x98, 0xc5, 0xd1, 0xf0, 0xcc, 0x7a, 0x6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06, 0xb3, 0x62, 0x61, 0xf3, 0x56, 0x12, 0x15, 0x12, 0x8c, 0x74, 0x98,
|
||||
0x73, 0xec, 0x63, 0x53, 0xa4, 0x23, 0x91, 0x4c, 0xba, 0x82, 0x5b, 0xdf, 0xb1, 0x8f, 0xef, 0x39,
|
||||
0x2e, 0xe1, 0x16, 0xd5, 0x1f, 0xc3, 0x25, 0xa9, 0xfc, 0x7d, 0xdf, 0x0a, 0x89, 0x47, 0x7c, 0x86,
|
||||
0xdd, 0x6d, 0x1a, 0x8c, 0x1a, 0xb9, 0xcd, 0x05, 0xe8, 0x46, 0x8e, 0x6f, 0x11, 0xd3, 0x97, 0x49,
|
||||
0xad, 0x63, 0xcc, 0x8a, 0xef, 0x9d, 0x48, 0xbf, 0x0d, 0xab, 0x35, 0x7c, 0x95, 0x65, 0x5f, 0x83,
|
||||
0x81, 0x58, 0x98, 0x45, 0x7d, 0x46, 0x7c, 0x26, 0x78, 0x0f, 0x8c, 0x3e, 0x87, 0x6d, 0x4b, 0x90,
|
||||
0xfe, 0x2e, 0x20, 0xc9, 0xe3, 0x01, 0x8d, 0xfd, 0x66, 0xe1, 0x7c, 0x1e, 0x16, 0x73, 0x24, 0xca,
|
||||
0x37, 0xde, 0x83, 0x25, 0x09, 0xfe, 0xdc, 0xf7, 0x1a, 0xf3, 0x5a, 0x81, 0xf3, 0x05, 0x22, 0xc5,
|
||||
0x6d, 0x2b, 0x11, 0x92, 0x3f, 0x76, 0x4e, 0x64, 0xb6, 0x9c, 0xac, 0x20, 0x7f, 0xf2, 0x88, 0xcc,
|
||||
0x25, 0x17, 0x8c, 0xc3, 0x43, 0x83, 0x60, 0x9b, 0xfa, 0xee, 0xa8, 0x71, 0xe6, 0xaa, 0xa0, 0x54,
|
||||
0x7c, 0xff, 0xd4, 0x82, 0x73, 0x49, 0x4a, 0x6b, 0xb8, 0x9b, 0xa7, 0x74, 0xe7, 0x76, 0xad, 0x3b,
|
||||
0x77, 0xc6, 0xee, 0xbc, 0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0x3d, 0x92, 0x53, 0xbb, 0x72, 0x46, 0xff, 0x6d, 0x9a, 0x5b, 0xb3, 0xab, 0x18, 0x57,
|
||||
0x15, 0x3e, 0x21, 0x9c, 0xe1, 0x01, 0xc1, 0x36, 0x09, 0x95, 0x1a, 0x03, 0x09, 0xfc, 0xb1, 0x80,
|
||||
0x71, 0x0b, 0x2b, 0xa4, 0x3d, 0x6a, 0x8f, 0xc4, 0x8a, 0x06, 0x06, 0x48, 0xd0, 0x6d, 0x6a, 0x8f,
|
||||
0x44, 0x92, 0x8b, 0x4c, 0xe1, 0x24, 0xd6, 0x41, 0xec, 0x1f, 0x8a, 0xd5, 0x74, 0x8d, 0xbe, 0x13,
|
||||
0x7d, 0x8a, 0x23, 0xb6, 0xcd, 0x41, 0xfa, 0x9f, 0x5b, 0x49, 0x94, 0xf1, 0x65, 0x18, 0xc4, 0x22,
|
||||
0xce, 0xd1, 0xff, 0xc1, 0x1c, 0x9c, 0x42, 0x45, 0x43, 0xae, 0xba, 0x54, 0x01, 0x83, 0xe4, 0x9c,
|
||||
0x3a, 0x8b, 0xc4, 0xcc, 0x38, 0xc8, 0xf3, 0x0b, 0x57, 0x41, 0xfe, 0x65, 0x92, 0x64, 0xef, 0x5a,
|
||||
0xbb, 0x07, 0x38, 0xb4, 0xa3, 0x1f, 0x11, 0x9f, 0x84, 0x98, 0xbd, 0x92, 0x43, 0x5f, 0x5f, 0x87,
|
||||
0xb5, 0x3a, 0xee, 0x4a, 0xfe, 0x93, 0xe4, 0xf0, 0x48, 0x30, 0x0c, 0xb2, 0x17, 0x3b, 0xae, 0xfd,
|
||||
0x4a, 0xc4, 0x7f, 0x52, 0x54, 0x2e, 0x65, 0xae, 0xfc, 0xe7, 0x1a, 0x9c, 0x0b, 0x05, 0x88, 0x99,
|
||||
0x11, 0x47, 0x48, 0xeb, 0xfd, 0x39, 0x63, 0x5e, 0x4d, 0x08, 0x42, 0x5e, 0xf7, 0xff, 0x25, 0xf5,
|
||||
0x80, 0x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x76, 0x4f, 0x80, 0xbe, 0x91, 0xae, 0xa4, 0xbd, 0x0f, 0x30,
|
||||
0xd6, 0xbf, 0x52, 0x85, 0x56, 0xa5, 0x0a, 0xfa, 0x55, 0x98, 0xe3, 0x96, 0x75, 0x88, 0xbd, 0xcb,
|
||||
0x42, 0x27, 0x10, 0x6f, 0x13, 0x12, 0x27, 0x52, 0xb5, 0x61, 0xf2, 0xb9, 0xf5, 0xc7, 0x15, 0x18,
|
||||
0x64, 0xef, 0xb4, 0xe8, 0x4b, 0xe8, 0x67, 0xde, 0x60, 0xd0, 0x1b, 0xe5, 0x4d, 0x2b, 0xbf, 0xe9,
|
||||
0x68, 0x6f, 0x4e, 0xc0, 0x52, 0xe5, 0xdb, 0x14, 0xf2, 0xe1, 0x5c, 0xe9, 0x21, 0x03, 0x5d, 0x2b,
|
||||
0x53, 0xd7, 0x3d, 0x93, 0x68, 0xd7, 0x1b, 0xe1, 0xa6, 0xf2, 0x18, 0x2c, 0x56, 0xbc, 0x4c, 0xa0,
|
||||
0xb7, 0x27, 0x70, 0xc9, 0xbd, 0x8e, 0x68, 0xef, 0x34, 0xc4, 0x4e, 0xa5, 0x3e, 0x03, 0x54, 0x7e,
|
||||
0xb6, 0x40, 0xd7, 0x27, 0xb2, 0x19, 0x3f, 0x8b, 0x68, 0x6f, 0x37, 0x43, 0xae, 0x55, 0x54, 0x3e,
|
||||
0x68, 0x4c, 0x54, 0x34, 0xf7, 0x64, 0x32, 0x51, 0xd1, 0xc2, 0x2b, 0xc9, 0x14, 0x3a, 0x84, 0x85,
|
||||
0xe2, 0x63, 0x07, 0xba, 0x5a, 0xf7, 0x38, 0x57, 0x7a, 0x4b, 0xd1, 0xae, 0x35, 0x41, 0x4d, 0x85,
|
||||
0x11, 0x38, 0x9b, 0x7f, 0x5c, 0x40, 0x57, 0xca, 0xf4, 0x95, 0xcf, 0x2b, 0xda, 0xc6, 0x64, 0xc4,
|
||||
0xac, 0x4e, 0xc5, 0x07, 0x87, 0x2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ce, 0xae, 0x7f, 0x25, 0x00, 0x00,
|
||||
// 2735 bytes of a gzipped FileDescriptorProto
|
||||
0x1f, 0x8b, 0x08, 0x00, 0x00, 0x09, 0x6e, 0x88, 0x02, 0xff, 0xd4, 0x3a, 0xcd, 0x73, 0x1c, 0x47,
|
||||
0xf5, 0x5a, 0xaf, 0x64, 0xed, 0xbe, 0x5d, 0x59, 0x72, 0x4b, 0x91, 0x37, 0x23, 0x4b, 0x56, 0x26,
|
||||
0x5f, 0x92, 0x13, 0xcb, 0x8e, 0xf2, 0xfb, 0x91, 0x90, 0x10, 0xc0, 0x96, 0x6c, 0x30, 0x89, 0xe5,
|
||||
0x64, 0xe4, 0x98, 0x40, 0x52, 0x4c, 0xb5, 0x66, 0x5a, 0xd6, 0xa0, 0x99, 0xe9, 0xf1, 0x4c, 0xaf,
|
||||
0xe2, 0x75, 0xc1, 0x29, 0x1c, 0xb8, 0xf0, 0x07, 0x70, 0xe6, 0xce, 0x89, 0x2a, 0xaa, 0xb8, 0x72,
|
||||
0xc9, 0x1f, 0x00, 0x57, 0x2e, 0x9c, 0x39, 0x70, 0xa3, 0x8a, 0x0b, 0xd5, 0x5f, 0xb3, 0xf3, 0xa9,
|
||||
0x1d, 0xc5, 0xae, 0xa2, 0xb8, 0xf5, 0xbc, 0x7e, 0x1f, 0xfd, 0x5e, 0xbf, 0xf7, 0xfa, 0x75, 0xbf,
|
||||
0x81, 0xc5, 0x13, 0xea, 0x0f, 0x03, 0x62, 0x27, 0x24, 0x3e, 0x21, 0xf1, 0x56, 0x14, 0x53, 0x46,
|
||||
0xd1, 0x42, 0x0e, 0x68, 0x47, 0x07, 0xe6, 0x75, 0x40, 0xb7, 0x30, 0x73, 0x8e, 0x76, 0x89, 0x4f,
|
||||
0x18, 0xb1, 0xc8, 0xe3, 0x21, 0x49, 0x18, 0x7a, 0x11, 0x3a, 0x87, 0x9e, 0x4f, 0x6c, 0xcf, 0x4d,
|
||||
0x06, 0xad, 0xf5, 0xf6, 0x46, 0xd7, 0x9a, 0xe5, 0xdf, 0x77, 0xdd, 0xc4, 0xbc, 0x0f, 0x8b, 0x39,
|
||||
0x82, 0x24, 0xa2, 0x61, 0x42, 0xd0, 0xbb, 0x30, 0x1b, 0x93, 0x64, 0xe8, 0x33, 0x49, 0xd0, 0xdb,
|
||||
0x5e, 0xdb, 0x2a, 0xca, 0xda, 0x4a, 0x49, 0x86, 0x3e, 0xb3, 0x34, 0xba, 0xf9, 0x55, 0x0b, 0xfa,
|
||||
0xd9, 0x19, 0x74, 0x09, 0x66, 0x95, 0xf0, 0x41, 0x6b, 0xbd, 0xb5, 0xd1, 0xb5, 0xce, 0x4b, 0xd9,
|
||||
0x68, 0x19, 0xce, 0x27, 0x0c, 0xb3, 0x61, 0x32, 0x38, 0xb7, 0xde, 0xda, 0x98, 0xb1, 0xd4, 0x17,
|
||||
0x5a, 0x82, 0x19, 0x12, 0xc7, 0x34, 0x1e, 0xb4, 0x05, 0xba, 0xfc, 0x40, 0x08, 0xa6, 0x13, 0xef,
|
||||
0x29, 0x19, 0x4c, 0xaf, 0xb7, 0x36, 0xe6, 0x2c, 0x31, 0x46, 0x03, 0x98, 0x3d, 0x21, 0x71, 0xe2,
|
||||
0xd1, 0x70, 0x30, 0x23, 0xc0, 0xfa, 0xd3, 0x9c, 0x85, 0x99, 0xdb, 0x41, 0xc4, 0x46, 0xe6, 0x3b,
|
||||
0x30, 0x78, 0x88, 0x9d, 0xe1, 0x30, 0x78, 0x28, 0x96, 0xbf, 0x73, 0x44, 0x9c, 0x63, 0x6d, 0x96,
|
||||
0x15, 0xe8, 0x2a, 0xa5, 0xd4, 0xda, 0xe6, 0xac, 0x8e, 0x04, 0xdc, 0x75, 0xcd, 0xef, 0xc3, 0x8b,
|
||||
0x15, 0x84, 0xca, 0x3c, 0x2f, 0xc3, 0xdc, 0x23, 0x1c, 0x1f, 0xe0, 0x47, 0xc4, 0x8e, 0x31, 0xf3,
|
||||
0xa8, 0xa0, 0x6e, 0x59, 0x7d, 0x05, 0xb4, 0x38, 0xcc, 0xfc, 0x1c, 0x8c, 0x1c, 0x07, 0x1a, 0x44,
|
||||
0xd8, 0x61, 0x4d, 0x84, 0xa3, 0x75, 0xe8, 0x45, 0x31, 0xc1, 0xbe, 0x4f, 0x1d, 0xcc, 0x88, 0xb0,
|
||||
0x4f, 0xdb, 0xca, 0x82, 0xcc, 0x55, 0x58, 0xa9, 0x64, 0x2e, 0x17, 0x68, 0xbe, 0x5b, 0x58, 0x3d,
|
||||
0x0d, 0x02, 0xaf, 0x91, 0x68, 0xf3, 0x72, 0x69, 0xd5, 0x82, 0x52, 0xf1, 0xfd, 0x76, 0x61, 0xd6,
|
||||
0x27, 0x38, 0x1c, 0x46, 0x8d, 0x18, 0x17, 0x57, 0xac, 0x49, 0x53, 0xce, 0x97, 0xa4, 0xdb, 0xec,
|
||||
0x50, 0xdf, 0x27, 0x0e, 0xf3, 0x68, 0xa8, 0xd9, 0xae, 0x01, 0x38, 0x29, 0x50, 0x39, 0x51, 0x06,
|
||||
0x62, 0x1a, 0x30, 0x28, 0x93, 0x2a, 0xb6, 0x7f, 0x6b, 0xc1, 0x0b, 0x37, 0x95, 0xd1, 0xa4, 0xe0,
|
||||
0x46, 0x1b, 0x90, 0x17, 0x79, 0xae, 0x28, 0xb2, 0xb8, 0x41, 0xed, 0xd2, 0x06, 0x71, 0x8c, 0x98,
|
||||
0x44, 0xbe, 0xe7, 0x60, 0xc1, 0x62, 0x5a, 0xb0, 0xc8, 0x82, 0xd0, 0x02, 0xb4, 0x19, 0xf3, 0x85,
|
||||
0xe7, 0x76, 0x2d, 0x3e, 0x44, 0xdb, 0xb0, 0x1c, 0x90, 0x80, 0xc6, 0x23, 0x3b, 0xc0, 0x91, 0x1d,
|
||||
0xe0, 0x27, 0x36, 0x77, 0x73, 0x3b, 0x38, 0x18, 0x9c, 0x17, 0xeb, 0x43, 0x72, 0xf6, 0x1e, 0x8e,
|
||||
0xee, 0xe1, 0x27, 0xfb, 0xde, 0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0x98, 0x23, 0x51, 0xbe, 0xf1, 0x36, 0x2c, 0x49, 0xf0, 0xa7, 0x61, 0xd0, 0x98, 0xd7,
|
||||
0x25, 0x78, 0xa1, 0x40, 0xa4, 0xb8, 0x6d, 0x6b, 0x21, 0xf9, 0x63, 0xe7, 0x54, 0x66, 0xcb, 0x7a,
|
||||
0x05, 0xf9, 0x93, 0x47, 0x64, 0x2e, 0xb9, 0x60, 0x1c, 0x1f, 0x5b, 0x04, 0xbb, 0x34, 0xf4, 0x47,
|
||||
0x8d, 0x33, 0x57, 0x05, 0xa5, 0xe2, 0xfb, 0xfb, 0x16, 0x5c, 0xd4, 0x29, 0xad, 0xe1, 0x6e, 0x9e,
|
||||
0xd1, 0x9d, 0xdb, 0xb5, 0xee, 0x3c, 0x3d, 0x76, 0xe7, 0x0d, 0x58, 0x48, 0xe8, 0x30, 0x76, 0x88,
|
||||
0xed, 0x62, 0x86, 0xed, 0x90, 0xba, 0x44, 0x79, 0xfb, 0x05, 0x09, 0xdf, 0xc5, 0x0c, 0xef, 0x51,
|
||||
0x97, 0x98, 0xdf, 0xd3, 0x9b, 0x9d, 0xf3, 0x92, 0x4d, 0xb8, 0xe8, 0xe3, 0x84, 0xd9, 0x38, 0x8a,
|
||||
0x48, 0xe8, 0xda, 0x98, 0x71, 0x57, 0x6b, 0x09, 0x57, 0xbb, 0xc0, 0x27, 0x6e, 0x0a, 0xf8, 0x4d,
|
||||
0xb6, 0x97, 0x98, 0x7f, 0x69, 0xc1, 0x3c, 0xa7, 0xe5, 0xae, 0xdd, 0x48, 0xdf, 0x05, 0x68, 0x93,
|
||||
0x27, 0x4c, 0x29, 0xca, 0x87, 0xe8, 0x3a, 0x2c, 0xaa, 0x18, 0xf2, 0x68, 0x38, 0x0e, 0xaf, 0xb6,
|
||||
0xcc, 0x46, 0xe3, 0xa9, 0x34, 0xc2, 0xae, 0x40, 0x2f, 0x61, 0x34, 0xd2, 0xd1, 0x3a, 0x2d, 0xa3,
|
||||
0x95, 0x83, 0x54, 0xb4, 0xe6, 0x6d, 0x3a, 0x53, 0x61, 0xd3, 0xbe, 0x97, 0xd8, 0xc4, 0xb1, 0xe5,
|
||||
0xaa, 0x44, 0xbc, 0x77, 0x2c, 0xf0, 0x92, 0xdb, 0x8e, 0xb4, 0x86, 0xf9, 0xff, 0xb0, 0x30, 0xd6,
|
||||
0xaa, 0x79, 0xec, 0x7c, 0xd5, 0xd2, 0xe9, 0xf0, 0x01, 0xf6, 0xfc, 0x7d, 0x12, 0xba, 0x24, 0x7e,
|
||||
0xc6, 0x98, 0x46, 0x37, 0x60, 0xc9, 0x73, 0x7d, 0x62, 0x33, 0x2f, 0x20, 0x74, 0xc8, 0xec, 0x84,
|
||||
0x38, 0x34, 0x74, 0x13, 0x6d, 0x1f, 0x3e, 0xf7, 0x40, 0x4e, 0xed, 0xcb, 0x19, 0xf3, 0x57, 0x69,
|
||||
0x6e, 0xcd, 0xae, 0x62, 0x5c, 0x55, 0x84, 0x84, 0x70, 0x86, 0x47, 0x04, 0xbb, 0x24, 0x56, 0x6a,
|
||||
0xf4, 0x25, 0xf0, 0x87, 0x02, 0xc6, 0x2d, 0xac, 0x90, 0x0e, 0xa8, 0x3b, 0x12, 0x2b, 0xea, 0x5b,
|
||||
0x20, 0x41, 0xb7, 0xa8, 0x3b, 0x12, 0x49, 0x2e, 0xb1, 0x85, 0x93, 0x38, 0x47, 0xc3, 0xf0, 0x58,
|
||||
0xac, 0xa6, 0x63, 0xf5, 0xbc, 0xe4, 0x23, 0x9c, 0xb0, 0x1d, 0x0e, 0x32, 0xff, 0xd8, 0xd2, 0x51,
|
||||
0xc6, 0x97, 0x61, 0x11, 0x87, 0x78, 0x27, 0xff, 0x05, 0x73, 0x70, 0x0a, 0x15, 0x0d, 0xb9, 0xea,
|
||||
0x52, 0x05, 0x0c, 0x92, 0x73, 0xea, 0x2c, 0x12, 0x33, 0xe3, 0x20, 0xcf, 0x2f, 0x5c, 0x05, 0xf9,
|
||||
0x17, 0x3a, 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0xea,
|
||||
0xab, 0x4b, 0x57, 0x16, 0x25, 0xc3, 0xb0, 0xb6, 0xba, 0x9a, 0xad, 0xad, 0xae, 0xf2, 0xdb, 0xdf,
|
||||
0x29, 0x9d, 0x10, 0x9f, 0x01, 0xec, 0x7a, 0xc9, 0xb1, 0x34, 0x32, 0x2f, 0xe7, 0x5c, 0x2f, 0x56,
|
||||
0xf7, 0x65, 0x3e, 0xe4, 0x10, 0xec, 0xfb, 0xca, 0x74, 0x7c, 0xc8, 0xdd, 0x77, 0x98, 0x10, 0x57,
|
||||
0x59, 0x47, 0x8c, 0x39, 0xec, 0x30, 0x26, 0x44, 0x19, 0x40, 0x8c, 0xcd, 0xdf, 0xb5, 0xa0, 0x7b,
|
||||
0x8f, 0x04, 0x8a, 0xf3, 0x1a, 0xc0, 0x23, 0x1a, 0xd3, 0x21, 0xf3, 0x42, 0x22, 0xab, 0xcf, 0x19,
|
||||
0x2b, 0x03, 0xf9, 0xe6, 0x72, 0x44, 0x68, 0x12, 0xff, 0x50, 0x19, 0x53, 0x8c, 0x39, 0xec, 0x88,
|
||||
0xe0, 0x48, 0xd9, 0x4f, 0x8c, 0xd1, 0x12, 0xcc, 0x24, 0x0c, 0x3b, 0xc7, 0xc2, 0x58, 0xd3, 0x96,
|
||||
0xfc, 0x30, 0xff, 0xd4, 0x02, 0xb0, 0x48, 0x40, 0x99, 0xf0, 0x35, 0x5e, 0x15, 0x1e, 0x60, 0xe7,
|
||||
0x98, 0xd7, 0xc9, 0x6c, 0x14, 0x11, 0x65, 0x89, 0x9e, 0x82, 0x3d, 0x18, 0x45, 0x62, 0x87, 0x34,
|
||||
0x8a, 0xca, 0x1f, 0x5d, 0xab, 0xab, 0x20, 0xb2, 0x22, 0xd6, 0xa1, 0xd4, 0xb5, 0xf8, 0x30, 0x93,
|
||||
0x53, 0xe4, 0xb2, 0x75, 0x4e, 0x59, 0x81, 0x6e, 0xd1, 0x15, 0x44, 0x28, 0x0a, 0x3f, 0x78, 0x19,
|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, 0x08, 0x37, 0x95, 0xc7, 0x60, 0xb1,
|
||||
0xa2, 0xb9, 0x85, 0xde, 0x9c, 0xc0, 0x25, 0xd7, 0x60, 0x33, 0xae, 0x35, 0xc4, 0x4e, 0xa5, 0x3e,
|
||||
0x06, 0x54, 0xee, 0x7c, 0xa1, 0x37, 0x26, 0xb2, 0x19, 0x77, 0xd6, 0x8c, 0x37, 0x9b, 0x21, 0xd7,
|
||||
0x2a, 0x2a, 0x7b, 0x62, 0x13, 0x15, 0xcd, 0x75, 0xdd, 0x26, 0x2a, 0x5a, 0x68, 0xb4, 0x4d, 0xa1,
|
||||
0x63, 0x58, 0x28, 0xf6, 0xcb, 0xd0, 0x66, 0x5d, 0x7f, 0xb7, 0xd4, 0x8e, 0x33, 0xae, 0x36, 0x41,
|
||||
0x4d, 0x85, 0x11, 0xb8, 0x90, 0xef, 0x4f, 0xa1, 0xd7, 0xcb, 0xf4, 0x95, 0x1d, 0x3a, 0x63, 0x63,
|
||||
0x32, 0x62, 0x56, 0xa7, 0x62, 0xcf, 0xaa, 0x4a, 0xa7, 0x9a, 0x86, 0x58, 0x95, 0x4e, 0x75, 0x2d,
|
||||
0x30, 0x73, 0x0a, 0xfd, 0x42, 0x37, 0x42, 0x0a, 0xbd, 0x1c, 0xb4, 0x55, 0xc7, 0xa6, 0xba, 0x99,
|
||||
0x64, 0x5c, 0x6f, 0x8c, 0xaf, 0x65, 0xdf, 0x68, 0xf1, 0x58, 0xcf, 0xb4, 0x74, 0xaa, 0x62, 0xbd,
|
||||
0xdc, 0x24, 0xaa, 0x8a, 0xf5, 0xaa, 0xbe, 0xd0, 0x14, 0x3a, 0x80, 0xb9, 0x5c, 0x93, 0x07, 0xbd,
|
||||
0x56, 0x47, 0x99, 0x7f, 0x1d, 0x32, 0x5e, 0x9f, 0x88, 0x97, 0xca, 0xb0, 0x75, 0xf6, 0x52, 0xe9,
|
||||
0xaa, 0x76, 0x71, 0xf9, 0x7c, 0xf5, 0xda, 0x24, 0xb4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 0xbb, 0xfc, 0x9e, 0x8e, 0x26, 0xae, 0x3f, 0x97, 0x99, 0xaf, 0x35,
|
||||
0xc4, 0xae, 0xdf, 0x5d, 0x9d, 0xa9, 0x27, 0x2a, 0x50, 0xc8, 0xd8, 0xd7, 0x1b, 0xe3, 0xa7, 0xb2,
|
||||
0x23, 0xdd, 0x44, 0xcf, 0xbc, 0x85, 0xa3, 0xab, 0x13, 0xf8, 0x64, 0xde, 0xf2, 0x8d, 0x37, 0x1a,
|
||||
0xe1, 0x56, 0x45, 0x6f, 0xf6, 0x75, 0xfa, 0x34, 0x7f, 0x2a, 0x3d, 0xa9, 0x9f, 0xe6, 0x4f, 0x15,
|
||||
0x0f, 0xde, 0x53, 0xe8, 0xd7, 0xe3, 0xee, 0x68, 0xf9, 0xe5, 0x09, 0x6d, 0xd7, 0xe6, 0x82, 0xda,
|
||||
0x07, 0x37, 0xe3, 0xed, 0x33, 0xd1, 0x64, 0xb4, 0xff, 0x08, 0x66, 0xc4, 0x6d, 0x0b, 0xad, 0x9d,
|
||||
0x7e, 0x0d, 0x33, 0xae, 0x54, 0xcf, 0xa7, 0x97, 0x09, 0xce, 0xed, 0xe0, 0xbc, 0xf8, 0x6d, 0xf0,
|
||||
0xed, 0xff, 0x04, 0x00, 0x00, 0xff, 0xff, 0x8a, 0x85, 0xda, 0x2e, 0x4d, 0x28, 0x00, 0x00,
|
||||
}
|
||||
@@ -0,0 +1,5 @@
|
||||
package volume_server_pb
|
||||
|
||||
func (m *RemoteFile) BackendName() string {
|
||||
return m.BackendType + "." + m.BackendId
|
||||
}
|
||||
@@ -1,47 +0,0 @@
|
||||
# AWS S3 Select feature in Seaweedfs
|
||||
|
||||
## Start weed
|
||||
|
||||
```bash
|
||||
git checkout s3-select
|
||||
# Compile weed
|
||||
weed server -s3
|
||||
```
|
||||
|
||||
## Install And Configure AWSCLI
|
||||
|
||||
```bash
|
||||
pip install awscli
|
||||
aws configure // default all the way
|
||||
aws configure set default.s3.signature_version s3v4
|
||||
```
|
||||
|
||||
## Make a bucket in S3
|
||||
|
||||
```bash
|
||||
aws --endpoint-url http://localhost:8333 s3 mb s3://newbucketgoogle
|
||||
```
|
||||
|
||||
## Download googleplaystore.csv
|
||||
|
||||
Link: https://www.kaggle.com/lava18/google-play-store-apps
|
||||
|
||||
## Copy the file to the S3 bucket
|
||||
|
||||
```bash
|
||||
aws --endpoint-url http://localhost:8333 s3 copy google-play-store-apps/googleplaystore.csv s3://newbucketgoogle
|
||||
```
|
||||
|
||||
## Perform S3 Select Query
|
||||
|
||||
```bash
|
||||
aws --endpoint-url http://localhost:8333 s3api select-object-content --bucket "newbucketgoogle" --key
|
||||
"googleplaystore.csv" --expression "select * from s3object limit 5" --expression-type 'SQL' --input-serialization '{"CSV": {"FileHeaderInfo": "USE","RecordDelimiter": "\n","FieldDelimiter": ","}, "CompressionType": "NONE"}' --output-serialization '{"CSV": {"RecordDelimiter": "\n","FieldDelimiter": ","}}' "sample.csv"
|
||||
```
|
||||
|
||||
## Check out result
|
||||
|
||||
```bash
|
||||
vim sample.csv
|
||||
```
|
||||
|
||||
@@ -3,6 +3,7 @@ package s3api
|
||||
import (
|
||||
"context"
|
||||
"fmt"
|
||||
"io"
|
||||
"os"
|
||||
"strings"
|
||||
"time"
|
||||
@@ -89,13 +90,25 @@ func (s3a *S3ApiServer) list(ctx context.Context, parentDirectoryPath, prefix, s
|
||||
}
|
||||
|
||||
glog.V(4).Infof("read directory: %v", request)
|
||||
resp, err := client.ListEntries(ctx, request)
|
||||
stream, err := client.ListEntries(ctx, request)
|
||||
if err != nil {
|
||||
glog.V(0).Infof("read directory %v: %v", request, err)
|
||||
return fmt.Errorf("list dir %v: %v", parentDirectoryPath, err)
|
||||
}
|
||||
|
||||
entries = resp.Entries
|
||||
for {
|
||||
resp, recvErr := stream.Recv()
|
||||
if recvErr != nil {
|
||||
if recvErr == io.EOF {
|
||||
break
|
||||
} else {
|
||||
return recvErr
|
||||
}
|
||||
}
|
||||
|
||||
entries = append(entries, resp.Entry)
|
||||
|
||||
}
|
||||
|
||||
return nil
|
||||
})
|
||||
|
||||
@@ -4,8 +4,6 @@ import (
|
||||
"crypto/md5"
|
||||
"encoding/json"
|
||||
"fmt"
|
||||
"github.com/minio/minio/cmd"
|
||||
"github.com/minio/minio/pkg/s3select"
|
||||
"io"
|
||||
"io/ioutil"
|
||||
"net/http"
|
||||
@@ -14,7 +12,6 @@ import (
|
||||
"github.com/chrislusf/seaweedfs/weed/glog"
|
||||
"github.com/chrislusf/seaweedfs/weed/server"
|
||||
"github.com/gorilla/mux"
|
||||
xhttp "github.com/minio/minio/cmd/http"
|
||||
)
|
||||
|
||||
var (
|
||||
@@ -118,15 +115,10 @@ func (s3a *S3ApiServer) DeleteMultipleObjectsHandler(w http.ResponseWriter, r *h
|
||||
}
|
||||
|
||||
func (s3a *S3ApiServer) proxyToFiler(w http.ResponseWriter, r *http.Request, destUrl string, responseFn func(proxyResonse *http.Response, w http.ResponseWriter)) {
|
||||
var method string
|
||||
method = r.Method
|
||||
|
||||
if r.URL.RawQuery == "select&select-type=2" {
|
||||
method = "GET"
|
||||
}
|
||||
glog.V(2).Infof("s3 proxying %s to %s", method, destUrl)
|
||||
glog.V(2).Infof("s3 proxying %s to %s", r.Method, destUrl)
|
||||
|
||||
proxyReq, err := http.NewRequest(method, destUrl, r.Body)
|
||||
proxyReq, err := http.NewRequest(r.Method, destUrl, r.Body)
|
||||
|
||||
if err != nil {
|
||||
glog.Errorf("NewRequest %s: %v", destUrl, err)
|
||||
@@ -232,63 +224,3 @@ func getObject(vars map[string]string) string {
|
||||
}
|
||||
return object
|
||||
}
|
||||
|
||||
func (s3a *S3ApiServer) SelectObjectContent(w http.ResponseWriter, r *http.Request) {
|
||||
vars := mux.Vars(r)
|
||||
bucket := vars["bucket"]
|
||||
object := getObject(vars)
|
||||
|
||||
s3Select, err := s3select.NewS3Select(r.Body)
|
||||
if err != nil {
|
||||
if serr, ok := err.(s3select.SelectError); ok {
|
||||
encodedErrorResponse := encodeResponse(cmd.APIErrorResponse{
|
||||
Code: serr.ErrorCode(),
|
||||
Message: serr.ErrorMessage(),
|
||||
BucketName: bucket,
|
||||
Key: object,
|
||||
Resource: r.URL.Path,
|
||||
RequestID: w.Header().Get(xhttp.AmzRequestID),
|
||||
HostID: "",
|
||||
})
|
||||
writeResponse(w, serr.HTTPStatusCode(), encodedErrorResponse, "application/xml")
|
||||
} else {
|
||||
writeErrorResponse(w, ErrInternalError, r.URL)
|
||||
}
|
||||
return
|
||||
}
|
||||
|
||||
if strings.HasSuffix(r.URL.Path, "/") {
|
||||
writeErrorResponse(w, ErrNotImplemented, r.URL)
|
||||
return
|
||||
}
|
||||
|
||||
destUrl := fmt.Sprintf("http://%s%s/%s%s",
|
||||
s3a.option.Filer, s3a.option.BucketsPath, bucket, object)
|
||||
passThroughResponseSelectObjectContent := func(proxyResonse *http.Response,
|
||||
w http.ResponseWriter) {
|
||||
getObject := func(offset, length int64) (io.ReadCloser, error) {
|
||||
return proxyResonse.Body, nil
|
||||
}
|
||||
if err = s3Select.Open(getObject); err != nil {
|
||||
if serr, ok := err.(s3select.SelectError); ok {
|
||||
encodedErrorResponse := encodeResponse(cmd.APIErrorResponse{
|
||||
Code: serr.ErrorCode(),
|
||||
Message: serr.ErrorMessage(),
|
||||
BucketName: bucket,
|
||||
Key: object,
|
||||
Resource: r.URL.Path,
|
||||
RequestID: w.Header().Get(xhttp.AmzRequestID),
|
||||
HostID: "",
|
||||
})
|
||||
writeResponse(w, serr.HTTPStatusCode(), encodedErrorResponse, mimeXML)
|
||||
} else {
|
||||
writeResponse(w, http.StatusInternalServerError, encodeResponse("not s3select.SelectError"), mimeXML)
|
||||
}
|
||||
return
|
||||
}
|
||||
|
||||
s3Select.Evaluate(w)
|
||||
s3Select.Close()
|
||||
}
|
||||
s3a.proxyToFiler(w, r, destUrl, passThroughResponseSelectObjectContent)
|
||||
}
|
||||
@@ -3,6 +3,7 @@ package s3api
|
||||
import (
|
||||
"context"
|
||||
"fmt"
|
||||
"io"
|
||||
"net/http"
|
||||
"net/url"
|
||||
"path/filepath"
|
||||
@@ -107,7 +108,7 @@ func (s3a *S3ApiServer) listFilerEntries(ctx context.Context, bucket, originalPr
|
||||
InclusiveStartFrom: false,
|
||||
}
|
||||
|
||||
resp, err := client.ListEntries(ctx, request)
|
||||
stream, err := client.ListEntries(ctx, request)
|
||||
if err != nil {
|
||||
return fmt.Errorf("list buckets: %v", err)
|
||||
}
|
||||
@@ -117,7 +118,18 @@ func (s3a *S3ApiServer) listFilerEntries(ctx context.Context, bucket, originalPr
|
||||
var counter int
|
||||
var lastEntryName string
|
||||
var isTruncated bool
|
||||
for _, entry := range resp.Entries {
|
||||
|
||||
for {
|
||||
resp, recvErr := stream.Recv()
|
||||
if recvErr != nil {
|
||||
if recvErr == io.EOF {
|
||||
break
|
||||
} else {
|
||||
return recvErr
|
||||
}
|
||||
}
|
||||
|
||||
entry := resp.Entry
|
||||
counter++
|
||||
if counter > maxKeys {
|
||||
isTruncated = true
|
||||
@@ -143,6 +155,7 @@ func (s3a *S3ApiServer) listFilerEntries(ctx context.Context, bucket, originalPr
|
||||
StorageClass: "STANDARD",
|
||||
})
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
response = ListBucketResult{
|
||||
|
||||
@@ -1,12 +1,6 @@
|
||||
package s3api
|
||||
|
||||
import (
|
||||
_ "github.com/chrislusf/seaweedfs/weed/filer2/cassandra"
|
||||
_ "github.com/chrislusf/seaweedfs/weed/filer2/leveldb"
|
||||
_ "github.com/chrislusf/seaweedfs/weed/filer2/memdb"
|
||||
_ "github.com/chrislusf/seaweedfs/weed/filer2/mysql"
|
||||
_ "github.com/chrislusf/seaweedfs/weed/filer2/postgres"
|
||||
_ "github.com/chrislusf/seaweedfs/weed/filer2/redis"
|
||||
"github.com/gorilla/mux"
|
||||
"google.golang.org/grpc"
|
||||
"net/http"
|
||||
@@ -79,8 +73,6 @@ func (s3a *S3ApiServer) registerRouter(router *mux.Router) {
|
||||
bucket.Methods("GET").Path("/{object:.+}").HandlerFunc(s3a.GetObjectHandler)
|
||||
// ListObjectsV1 (Legacy)
|
||||
bucket.Methods("GET").HandlerFunc(s3a.ListObjectsV1Handler)
|
||||
// SelectObjectContent
|
||||
bucket.Methods("POST").Path("/{object:.+}").HandlerFunc(s3a.SelectObjectContent).Queries("select", "", "select-type", "2")
|
||||
|
||||
// DeleteMultipleObjects
|
||||
bucket.Methods("POST").HandlerFunc(s3a.DeleteMultipleObjectsHandler).Queries("delete", "")
|
||||
|
||||
@@ -11,17 +11,18 @@ import (
|
||||
"strings"
|
||||
"time"
|
||||
|
||||
"github.com/chrislusf/seaweedfs/weed/storage/needle"
|
||||
"google.golang.org/grpc"
|
||||
|
||||
"github.com/chrislusf/seaweedfs/weed/glog"
|
||||
"github.com/chrislusf/seaweedfs/weed/operation"
|
||||
"github.com/chrislusf/seaweedfs/weed/stats"
|
||||
"github.com/chrislusf/seaweedfs/weed/storage/needle"
|
||||
"github.com/chrislusf/seaweedfs/weed/util"
|
||||
|
||||
_ "github.com/chrislusf/seaweedfs/weed/statik"
|
||||
"github.com/gorilla/mux"
|
||||
statik "github.com/rakyll/statik/fs"
|
||||
|
||||
_ "github.com/chrislusf/seaweedfs/weed/statik"
|
||||
)
|
||||
|
||||
var serverStats *stats.ServerStats
|
||||
@@ -115,6 +116,7 @@ func submitForClientHandler(w http.ResponseWriter, r *http.Request, masterUrl st
|
||||
}
|
||||
ar := &operation.VolumeAssignRequest{
|
||||
Count: count,
|
||||
DataCenter: r.FormValue("dataCenter"),
|
||||
Replication: r.FormValue("replication"),
|
||||
Collection: r.FormValue("collection"),
|
||||
Ttl: r.FormValue("ttl"),
|
||||
|
||||
@@ -33,28 +33,27 @@ func (fs *FilerServer) LookupDirectoryEntry(ctx context.Context, req *filer_pb.L
|
||||
}, nil
|
||||
}
|
||||
|
||||
func (fs *FilerServer) ListEntries(ctx context.Context, req *filer_pb.ListEntriesRequest) (*filer_pb.ListEntriesResponse, error) {
|
||||
func (fs *FilerServer) ListEntries(req *filer_pb.ListEntriesRequest, stream filer_pb.SeaweedFiler_ListEntriesServer) error {
|
||||
|
||||
limit := int(req.Limit)
|
||||
if limit == 0 {
|
||||
limit = fs.option.DirListingLimit
|
||||
}
|
||||
|
||||
paginationLimit := 1024
|
||||
paginationLimit := filer2.PaginationSize
|
||||
if limit < paginationLimit {
|
||||
paginationLimit = limit
|
||||
}
|
||||
|
||||
resp := &filer_pb.ListEntriesResponse{}
|
||||
lastFileName := req.StartFromFileName
|
||||
includeLastFile := req.InclusiveStartFrom
|
||||
for limit > 0 {
|
||||
entries, err := fs.filer.ListDirectoryEntries(ctx, filer2.FullPath(req.Directory), lastFileName, includeLastFile, paginationLimit)
|
||||
entries, err := fs.filer.ListDirectoryEntries(stream.Context(), filer2.FullPath(req.Directory), lastFileName, includeLastFile, paginationLimit)
|
||||
if err != nil {
|
||||
return nil, err
|
||||
return err
|
||||
}
|
||||
if len(entries) == 0 {
|
||||
return resp, nil
|
||||
return nil
|
||||
}
|
||||
|
||||
includeLastFile = false
|
||||
@@ -69,15 +68,19 @@ func (fs *FilerServer) ListEntries(ctx context.Context, req *filer_pb.ListEntrie
|
||||
}
|
||||
}
|
||||
|
||||
resp.Entries = append(resp.Entries, &filer_pb.Entry{
|
||||
Name: entry.Name(),
|
||||
IsDirectory: entry.IsDirectory(),
|
||||
Chunks: entry.Chunks,
|
||||
Attributes: filer2.EntryAttributeToPb(entry),
|
||||
})
|
||||
if err := stream.Send(&filer_pb.ListEntriesResponse{
|
||||
Entry: &filer_pb.Entry{
|
||||
Name: entry.Name(),
|
||||
IsDirectory: entry.IsDirectory(),
|
||||
Chunks: entry.Chunks,
|
||||
Attributes: filer2.EntryAttributeToPb(entry),
|
||||
},
|
||||
}); err != nil {
|
||||
return err
|
||||
}
|
||||
limit--
|
||||
if limit == 0 {
|
||||
return resp, nil
|
||||
return nil
|
||||
}
|
||||
}
|
||||
|
||||
@@ -87,7 +90,7 @@ func (fs *FilerServer) ListEntries(ctx context.Context, req *filer_pb.ListEntrie
|
||||
|
||||
}
|
||||
|
||||
return resp, nil
|
||||
return nil
|
||||
}
|
||||
|
||||
func (fs *FilerServer) LookupVolume(ctx context.Context, req *filer_pb.LookupVolumeRequest) (*filer_pb.LookupVolumeResponse, error) {
|
||||
@@ -137,7 +140,7 @@ func (fs *FilerServer) CreateEntry(ctx context.Context, req *filer_pb.CreateEntr
|
||||
})
|
||||
|
||||
if err == nil {
|
||||
fs.filer.DeleteChunks(fullpath, garbages)
|
||||
fs.filer.DeleteChunks(garbages)
|
||||
}
|
||||
|
||||
return &filer_pb.CreateEntryResponse{}, err
|
||||
@@ -186,8 +189,8 @@ func (fs *FilerServer) UpdateEntry(ctx context.Context, req *filer_pb.UpdateEntr
|
||||
}
|
||||
|
||||
if err = fs.filer.UpdateEntry(ctx, entry, newEntry); err == nil {
|
||||
fs.filer.DeleteChunks(entry.FullPath, unusedChunks)
|
||||
fs.filer.DeleteChunks(entry.FullPath, garbages)
|
||||
fs.filer.DeleteChunks(unusedChunks)
|
||||
fs.filer.DeleteChunks(garbages)
|
||||
}
|
||||
|
||||
fs.filer.NotifyUpdateEvent(entry, newEntry, true)
|
||||
|
||||
@@ -18,7 +18,6 @@ import (
|
||||
_ "github.com/chrislusf/seaweedfs/weed/filer2/etcd"
|
||||
_ "github.com/chrislusf/seaweedfs/weed/filer2/leveldb"
|
||||
_ "github.com/chrislusf/seaweedfs/weed/filer2/leveldb2"
|
||||
_ "github.com/chrislusf/seaweedfs/weed/filer2/memdb"
|
||||
_ "github.com/chrislusf/seaweedfs/weed/filer2/mysql"
|
||||
_ "github.com/chrislusf/seaweedfs/weed/filer2/postgres"
|
||||
_ "github.com/chrislusf/seaweedfs/weed/filer2/redis"
|
||||
|
||||
@@ -149,6 +149,16 @@ func (fs *FilerServer) updateFilerStore(ctx context.Context, r *http.Request, w
|
||||
stats.FilerRequestHistogram.WithLabelValues("postStoreWrite").Observe(time.Since(start).Seconds())
|
||||
}()
|
||||
|
||||
modeStr := r.URL.Query().Get("mode")
|
||||
if modeStr == "" {
|
||||
modeStr = "0660"
|
||||
}
|
||||
mode, err := strconv.ParseUint(modeStr, 8, 32)
|
||||
if err != nil {
|
||||
glog.Errorf("Invalid mode format: %s, use 0660 by default", modeStr)
|
||||
mode = 0660
|
||||
}
|
||||
|
||||
path := r.URL.Path
|
||||
if strings.HasSuffix(path, "/") {
|
||||
if ret.Name != "" {
|
||||
@@ -165,7 +175,7 @@ func (fs *FilerServer) updateFilerStore(ctx context.Context, r *http.Request, w
|
||||
Attr: filer2.Attr{
|
||||
Mtime: time.Now(),
|
||||
Crtime: crTime,
|
||||
Mode: 0660,
|
||||
Mode: os.FileMode(mode),
|
||||
Uid: OS_UID,
|
||||
Gid: OS_GID,
|
||||
Replication: replication,
|
||||
@@ -184,7 +194,7 @@ func (fs *FilerServer) updateFilerStore(ctx context.Context, r *http.Request, w
|
||||
}
|
||||
// glog.V(4).Infof("saving %s => %+v", path, entry)
|
||||
if dbErr := fs.filer.CreateEntry(ctx, entry); dbErr != nil {
|
||||
fs.filer.DeleteChunks(entry.FullPath, entry.Chunks)
|
||||
fs.filer.DeleteChunks(entry.Chunks)
|
||||
glog.V(0).Infof("failing to write %s to filer server : %v", path, dbErr)
|
||||
writeJsonError(w, r, http.StatusInternalServerError, dbErr)
|
||||
err = dbErr
|
||||
@@ -270,12 +280,14 @@ func (fs *FilerServer) uploadToVolumeServer(r *http.Request, u *url.URL, auth se
|
||||
// curl -X DELETE http://localhost:8888/path/to
|
||||
// curl -X DELETE http://localhost:8888/path/to?recursive=true
|
||||
// curl -X DELETE http://localhost:8888/path/to?recursive=true&ignoreRecursiveError=true
|
||||
// curl -X DELETE http://localhost:8888/path/to?recursive=true&skipChunkDeletion=true
|
||||
func (fs *FilerServer) DeleteHandler(w http.ResponseWriter, r *http.Request) {
|
||||
|
||||
isRecursive := r.FormValue("recursive") == "true"
|
||||
ignoreRecursiveError := r.FormValue("ignoreRecursiveError") == "true"
|
||||
skipChunkDeletion := r.FormValue("skipChunkDeletion") == "true"
|
||||
|
||||
err := fs.filer.DeleteEntryMetaAndData(context.Background(), filer2.FullPath(r.URL.Path), isRecursive, ignoreRecursiveError, true)
|
||||
err := fs.filer.DeleteEntryMetaAndData(context.Background(), filer2.FullPath(r.URL.Path), isRecursive, ignoreRecursiveError, !skipChunkDeletion)
|
||||
if err != nil {
|
||||
glog.V(1).Infoln("deleting", r.URL.Path, ":", err.Error())
|
||||
writeJsonError(w, r, http.StatusInternalServerError, err)
|
||||
|
||||
@@ -177,7 +177,7 @@ func (fs *FilerServer) doAutoChunk(ctx context.Context, w http.ResponseWriter, r
|
||||
Chunks: fileChunks,
|
||||
}
|
||||
if dbErr := fs.filer.CreateEntry(ctx, entry); dbErr != nil {
|
||||
fs.filer.DeleteChunks(entry.FullPath, entry.Chunks)
|
||||
fs.filer.DeleteChunks(entry.Chunks)
|
||||
replyerr = dbErr
|
||||
filerResult.Error = dbErr.Error()
|
||||
glog.V(0).Infof("failing to write %s to filer server : %v", path, dbErr)
|
||||
|
||||
@@ -14,10 +14,14 @@ func ToBreadcrumb(fullpath string) (crumbs []Breadcrumb) {
|
||||
parts := strings.Split(fullpath, "/")
|
||||
|
||||
for i := 0; i < len(parts); i++ {
|
||||
crumbs = append(crumbs, Breadcrumb{
|
||||
Name: parts[i] + "/",
|
||||
crumb := Breadcrumb{
|
||||
Name: parts[i] + " /",
|
||||
Link: "/" + filepath.ToSlash(filepath.Join(parts[0:i+1]...)),
|
||||
})
|
||||
}
|
||||
if !strings.HasSuffix(crumb.Link, "/") {
|
||||
crumb.Link += "/"
|
||||
}
|
||||
crumbs = append(crumbs, crumb)
|
||||
}
|
||||
|
||||
return
|
||||
|
||||
@@ -50,7 +50,7 @@ var StatusTpl = template.Must(template.New("status").Funcs(funcMap).Parse(`<!DOC
|
||||
<div class="row">
|
||||
<div>
|
||||
{{ range $entry := .Breadcrumbs }}
|
||||
<a href={{ $entry.Link }} >
|
||||
<a href="{{ $entry.Link }}" >
|
||||
{{ $entry.Name }}
|
||||
</a>
|
||||
{{ end }}
|
||||
|
||||
@@ -9,6 +9,7 @@ import (
|
||||
"github.com/chrislusf/raft"
|
||||
"github.com/chrislusf/seaweedfs/weed/glog"
|
||||
"github.com/chrislusf/seaweedfs/weed/pb/master_pb"
|
||||
"github.com/chrislusf/seaweedfs/weed/storage/backend"
|
||||
"github.com/chrislusf/seaweedfs/weed/storage/needle"
|
||||
"github.com/chrislusf/seaweedfs/weed/topology"
|
||||
"google.golang.org/grpc/peer"
|
||||
@@ -76,7 +77,10 @@ func (ms *MasterServer) SendHeartbeat(stream master_pb.Seaweed_SendHeartbeatServ
|
||||
int64(heartbeat.MaxVolumeCount))
|
||||
glog.V(0).Infof("added volume server %v:%d", heartbeat.GetIp(), heartbeat.GetPort())
|
||||
if err := stream.Send(&master_pb.HeartbeatResponse{
|
||||
VolumeSizeLimit: uint64(ms.option.VolumeSizeLimitMB) * 1024 * 1024,
|
||||
VolumeSizeLimit: uint64(ms.option.VolumeSizeLimitMB) * 1024 * 1024,
|
||||
MetricsAddress: ms.option.MetricsAddress,
|
||||
MetricsIntervalSeconds: uint32(ms.option.MetricsIntervalSec),
|
||||
StorageBackends: backend.ToPbStorageBackends(),
|
||||
}); err != nil {
|
||||
glog.Warningf("SendHeartbeat.Send volume size to %s:%d %v", dn.Ip, dn.Port, err)
|
||||
return err
|
||||
@@ -164,9 +168,7 @@ func (ms *MasterServer) SendHeartbeat(stream master_pb.Seaweed_SendHeartbeatServ
|
||||
return err
|
||||
}
|
||||
if err := stream.Send(&master_pb.HeartbeatResponse{
|
||||
Leader: newLeader,
|
||||
MetricsAddress: ms.option.MetricsAddress,
|
||||
MetricsIntervalSeconds: uint32(ms.option.MetricsIntervalSec),
|
||||
Leader: newLeader,
|
||||
}); err != nil {
|
||||
glog.Warningf("SendHeartbeat.Send response to to %s:%d %v", dn.Ip, dn.Port, err)
|
||||
return err
|
||||
|
||||
@@ -6,6 +6,7 @@ import (
|
||||
"time"
|
||||
|
||||
"github.com/chrislusf/seaweedfs/weed/security"
|
||||
"github.com/chrislusf/seaweedfs/weed/storage/backend"
|
||||
"github.com/chrislusf/seaweedfs/weed/storage/erasure_coding"
|
||||
"github.com/spf13/viper"
|
||||
"google.golang.org/grpc"
|
||||
@@ -90,6 +91,9 @@ func (vs *VolumeServer) doHeartbeat(ctx context.Context, masterNode, masterGrpcA
|
||||
vs.MetricsAddress = in.GetMetricsAddress()
|
||||
vs.MetricsIntervalSec = int(in.GetMetricsIntervalSeconds())
|
||||
}
|
||||
if len(in.StorageBackends) > 0 {
|
||||
backend.LoadFromPbStorageBackends(in.StorageBackends)
|
||||
}
|
||||
}
|
||||
}()
|
||||
|
||||
|
||||
@@ -47,7 +47,7 @@ func (vs *VolumeServer) VolumeSyncStatus(ctx context.Context, req *volume_server
|
||||
|
||||
}
|
||||
|
||||
func sendFileContent(datBackend backend.DataStorageBackend, buf []byte, startOffset, stopOffset int64, stream volume_server_pb.VolumeServer_VolumeIncrementalCopyServer) error {
|
||||
func sendFileContent(datBackend backend.BackendStorageFile, buf []byte, startOffset, stopOffset int64, stream volume_server_pb.VolumeServer_VolumeIncrementalCopyServer) error {
|
||||
var blockSizeLimit = int64(len(buf))
|
||||
for i := int64(0); i < stopOffset-startOffset; i += blockSizeLimit {
|
||||
n, readErr := datBackend.ReadAt(buf, startOffset+i)
|
||||
|
||||
@@ -0,0 +1,93 @@
|
||||
package weed_server
|
||||
|
||||
import (
|
||||
"fmt"
|
||||
"os"
|
||||
"time"
|
||||
|
||||
"github.com/chrislusf/seaweedfs/weed/pb/volume_server_pb"
|
||||
"github.com/chrislusf/seaweedfs/weed/storage/backend"
|
||||
"github.com/chrislusf/seaweedfs/weed/storage/needle"
|
||||
)
|
||||
|
||||
// VolumeTierCopyDatToRemote copy dat file to a remote tier
|
||||
func (vs *VolumeServer) VolumeTierCopyDatToRemote(req *volume_server_pb.VolumeTierCopyDatToRemoteRequest, stream volume_server_pb.VolumeServer_VolumeTierCopyDatToRemoteServer) error {
|
||||
|
||||
// find existing volume
|
||||
v := vs.store.GetVolume(needle.VolumeId(req.VolumeId))
|
||||
if v == nil {
|
||||
return fmt.Errorf("volume %d not found", req.VolumeId)
|
||||
}
|
||||
|
||||
// verify the collection
|
||||
if v.Collection != req.Collection {
|
||||
return fmt.Errorf("existing collection:%v unexpected input: %v", v.Collection, req.Collection)
|
||||
}
|
||||
|
||||
// locate the disk file
|
||||
diskFile, ok := v.DataBackend.(*backend.DiskFile)
|
||||
if !ok {
|
||||
return fmt.Errorf("volume %d is not on local disk", req.VolumeId)
|
||||
}
|
||||
|
||||
// check valid storage backend type
|
||||
backendStorage, found := backend.BackendStorages[req.DestinationBackendName]
|
||||
if !found {
|
||||
var keys []string
|
||||
for key := range backend.BackendStorages {
|
||||
keys = append(keys, key)
|
||||
}
|
||||
return fmt.Errorf("destination %s not found, suppported: %v", req.DestinationBackendName, keys)
|
||||
}
|
||||
|
||||
// check whether the existing backend storage is the same as requested
|
||||
// if same, skip
|
||||
backendType, backendId := backend.BackendNameToTypeId(req.DestinationBackendName)
|
||||
for _, remoteFile := range v.GetVolumeTierInfo().GetFiles() {
|
||||
if remoteFile.BackendType == backendType && remoteFile.BackendId == backendId {
|
||||
return fmt.Errorf("destination %s already exists", req.DestinationBackendName)
|
||||
}
|
||||
}
|
||||
|
||||
startTime := time.Now()
|
||||
fn := func(progressed int64, percentage float32) error {
|
||||
now := time.Now()
|
||||
if now.Sub(startTime) < time.Second {
|
||||
return nil
|
||||
}
|
||||
startTime = now
|
||||
return stream.Send(&volume_server_pb.VolumeTierCopyDatToRemoteResponse{
|
||||
Processed: progressed,
|
||||
ProcessedPercentage: percentage,
|
||||
})
|
||||
}
|
||||
// copy the data file
|
||||
key, size, err := backendStorage.CopyFile(diskFile.File, fn)
|
||||
if err != nil {
|
||||
return fmt.Errorf("backend %s copy file %s: %v", req.DestinationBackendName, diskFile.Name(), err)
|
||||
}
|
||||
|
||||
// save the remote file to volume tier info
|
||||
v.GetVolumeTierInfo().Files = append(v.GetVolumeTierInfo().GetFiles(), &volume_server_pb.RemoteFile{
|
||||
BackendType: backendType,
|
||||
BackendId: backendId,
|
||||
Key: key,
|
||||
Offset: 0,
|
||||
FileSize: uint64(size),
|
||||
ModifiedTime: uint64(time.Now().Unix()),
|
||||
})
|
||||
|
||||
if err := v.SaveVolumeTierInfo(); err != nil {
|
||||
return fmt.Errorf("volume %d fail to save remote file info: %v", v.Id, err)
|
||||
}
|
||||
|
||||
if err := v.LoadRemoteFile(); err != nil {
|
||||
return fmt.Errorf("volume %d fail to load remote file: %v", v.Id, err)
|
||||
}
|
||||
|
||||
if !req.KeepLocalDatFile {
|
||||
os.Remove(v.FileName() + ".dat")
|
||||
}
|
||||
|
||||
return nil
|
||||
}
|
||||
@@ -12,7 +12,7 @@ import (
|
||||
func (vs *VolumeServer) statusHandler(w http.ResponseWriter, r *http.Request) {
|
||||
m := make(map[string]interface{})
|
||||
m["Version"] = util.VERSION
|
||||
m["Volumes"] = vs.store.Status()
|
||||
m["Volumes"] = vs.store.VolumeInfos()
|
||||
writeJsonQuiet(w, r, http.StatusOK, m)
|
||||
}
|
||||
|
||||
|
||||
@@ -8,6 +8,7 @@ import (
|
||||
"github.com/chrislusf/seaweedfs/weed/pb/volume_server_pb"
|
||||
ui "github.com/chrislusf/seaweedfs/weed/server/volume_server_ui"
|
||||
"github.com/chrislusf/seaweedfs/weed/stats"
|
||||
"github.com/chrislusf/seaweedfs/weed/storage"
|
||||
"github.com/chrislusf/seaweedfs/weed/util"
|
||||
)
|
||||
|
||||
@@ -20,19 +21,30 @@ func (vs *VolumeServer) uiStatusHandler(w http.ResponseWriter, r *http.Request)
|
||||
ds = append(ds, stats.NewDiskStatus(dir))
|
||||
}
|
||||
}
|
||||
volumeInfos := vs.store.VolumeInfos()
|
||||
var normalVolumeInfos, remoteVolumeInfos []*storage.VolumeInfo
|
||||
for _, vinfo := range volumeInfos {
|
||||
if vinfo.IsRemote() {
|
||||
remoteVolumeInfos = append(remoteVolumeInfos, vinfo)
|
||||
} else {
|
||||
normalVolumeInfos = append(normalVolumeInfos, vinfo)
|
||||
}
|
||||
}
|
||||
args := struct {
|
||||
Version string
|
||||
Masters []string
|
||||
Volumes interface{}
|
||||
EcVolumes interface{}
|
||||
DiskStatuses interface{}
|
||||
Stats interface{}
|
||||
Counters *stats.ServerStats
|
||||
Version string
|
||||
Masters []string
|
||||
Volumes interface{}
|
||||
EcVolumes interface{}
|
||||
RemoteVolumes interface{}
|
||||
DiskStatuses interface{}
|
||||
Stats interface{}
|
||||
Counters *stats.ServerStats
|
||||
}{
|
||||
util.VERSION,
|
||||
vs.SeedMasterNodes,
|
||||
vs.store.Status(),
|
||||
normalVolumeInfos,
|
||||
vs.store.EcVolumes(),
|
||||
remoteVolumeInfos,
|
||||
ds,
|
||||
infos,
|
||||
serverStats,
|
||||
|
||||
@@ -128,6 +128,36 @@ var StatusTpl = template.Must(template.New("status").Funcs(funcMap).Parse(`<!DOC
|
||||
</table>
|
||||
</div>
|
||||
|
||||
<div class="row">
|
||||
<h2>Remote Volumes</h2>
|
||||
<table class="table table-striped">
|
||||
<thead>
|
||||
<tr>
|
||||
<th>Id</th>
|
||||
<th>Collection</th>
|
||||
<th>Size</th>
|
||||
<th>Files</th>
|
||||
<th>Trash</th>
|
||||
<th>Remote</th>
|
||||
<th>Key</th>
|
||||
</tr>
|
||||
</thead>
|
||||
<tbody>
|
||||
{{ range .RemoteVolumes }}
|
||||
<tr>
|
||||
<td><code>{{ .Id }}</code></td>
|
||||
<td>{{ .Collection }}</td>
|
||||
<td>{{ .Size }} Bytes</td>
|
||||
<td>{{ .FileCount }}</td>
|
||||
<td>{{ .DeleteCount }} / {{.DeletedByteCount}} Bytes</td>
|
||||
<td>{{ .RemoteStorageName }}</td>
|
||||
<td>{{ .RemoteStorageKey }}</td>
|
||||
</tr>
|
||||
{{ end }}
|
||||
</tbody>
|
||||
</table>
|
||||
</div>
|
||||
|
||||
<div class="row">
|
||||
<h2>Erasure Coding Shards</h2>
|
||||
<table class="table table-striped">
|
||||
|
||||
@@ -10,16 +10,18 @@ import (
|
||||
"strings"
|
||||
"time"
|
||||
|
||||
"golang.org/x/net/webdav"
|
||||
"google.golang.org/grpc"
|
||||
|
||||
"github.com/chrislusf/seaweedfs/weed/operation"
|
||||
"github.com/chrislusf/seaweedfs/weed/pb/filer_pb"
|
||||
"github.com/chrislusf/seaweedfs/weed/util"
|
||||
"golang.org/x/net/webdav"
|
||||
"google.golang.org/grpc"
|
||||
|
||||
"github.com/spf13/viper"
|
||||
|
||||
"github.com/chrislusf/seaweedfs/weed/filer2"
|
||||
"github.com/chrislusf/seaweedfs/weed/glog"
|
||||
"github.com/chrislusf/seaweedfs/weed/security"
|
||||
"github.com/spf13/viper"
|
||||
)
|
||||
|
||||
type WebDavOption struct {
|
||||
@@ -163,7 +165,7 @@ func (fs *WebDavFileSystem) Mkdir(ctx context.Context, fullDirPath string, perm
|
||||
|
||||
func (fs *WebDavFileSystem) OpenFile(ctx context.Context, fullFilePath string, flag int, perm os.FileMode) (webdav.File, error) {
|
||||
|
||||
glog.V(2).Infof("WebDavFileSystem.OpenFile %v", fullFilePath)
|
||||
glog.V(2).Infof("WebDavFileSystem.OpenFile %v %x", fullFilePath, flag)
|
||||
|
||||
var err error
|
||||
if fullFilePath, err = clearName(fullFilePath); err != nil {
|
||||
@@ -175,12 +177,6 @@ func (fs *WebDavFileSystem) OpenFile(ctx context.Context, fullFilePath string, f
|
||||
if strings.HasSuffix(fullFilePath, "/") {
|
||||
return nil, os.ErrInvalid
|
||||
}
|
||||
// based directory should be exists.
|
||||
dir, _ := path.Split(fullFilePath)
|
||||
_, err := fs.stat(ctx, dir)
|
||||
if err != nil {
|
||||
return nil, os.ErrInvalid
|
||||
}
|
||||
_, err = fs.stat(ctx, fullFilePath)
|
||||
if err == nil {
|
||||
if flag&os.O_EXCL != 0 {
|
||||
@@ -448,9 +444,11 @@ func (f *WebDavFile) Write(buf []byte) (int, error) {
|
||||
return nil
|
||||
})
|
||||
|
||||
if err != nil {
|
||||
if err == nil {
|
||||
glog.V(3).Infof("WebDavFileSystem.Write %v: written [%d,%d)", f.name, f.off, f.off+int64(len(buf)))
|
||||
f.off += int64(len(buf))
|
||||
}
|
||||
|
||||
return len(buf), err
|
||||
}
|
||||
|
||||
@@ -494,10 +492,13 @@ func (f *WebDavFile) Read(p []byte) (readSize int, err error) {
|
||||
}
|
||||
readSize = int(totalRead)
|
||||
|
||||
glog.V(3).Infof("WebDavFileSystem.Read %v: [%d,%d)", f.name, f.off, f.off+totalRead)
|
||||
|
||||
f.off += totalRead
|
||||
if readSize == 0 {
|
||||
return 0, io.EOF
|
||||
}
|
||||
|
||||
return
|
||||
}
|
||||
|
||||
@@ -511,7 +512,7 @@ func (f *WebDavFile) Readdir(count int) (ret []os.FileInfo, err error) {
|
||||
dir = dir[:len(dir)-1]
|
||||
}
|
||||
|
||||
err = filer2.ReadDirAllEntries(ctx, f.fs, dir, func(entry *filer_pb.Entry) {
|
||||
err = filer2.ReadDirAllEntries(ctx, f.fs, dir, "", func(entry *filer_pb.Entry, isLast bool) {
|
||||
fi := FileInfo{
|
||||
size: int64(filer2.TotalSize(entry.GetChunks())),
|
||||
name: entry.Name,
|
||||
|
||||
@@ -95,7 +95,7 @@ func doEcEncode(ctx context.Context, commandEnv *CommandEnv, collection string,
|
||||
// mark the volume as readonly
|
||||
err = markVolumeReadonly(ctx, commandEnv.option.GrpcDialOption, needle.VolumeId(vid), locations)
|
||||
if err != nil {
|
||||
return fmt.Errorf("generate ec shards for volume %d on %s: %v", vid, locations[0].Url, err)
|
||||
return fmt.Errorf("mark volume %d as readonly on %s: %v", vid, locations[0].Url, err)
|
||||
}
|
||||
|
||||
// generate ec shards
|
||||
|
||||
+50
-56
@@ -3,11 +3,13 @@ package shell
|
||||
import (
|
||||
"context"
|
||||
"fmt"
|
||||
"io"
|
||||
|
||||
"google.golang.org/grpc"
|
||||
|
||||
"github.com/chrislusf/seaweedfs/weed/filer2"
|
||||
"github.com/chrislusf/seaweedfs/weed/pb/filer_pb"
|
||||
"github.com/chrislusf/seaweedfs/weed/util"
|
||||
"google.golang.org/grpc"
|
||||
"io"
|
||||
)
|
||||
|
||||
func init() {
|
||||
@@ -43,62 +45,12 @@ func (c *commandFsDu) Do(args []string, commandEnv *CommandEnv, writer io.Writer
|
||||
path = path + "/"
|
||||
}
|
||||
|
||||
|
||||
var blockCount, byteCount uint64
|
||||
dir, name := filer2.FullPath(path).DirAndName()
|
||||
blockCount, byteCount, err = duTraverseDirectory(ctx, writer, commandEnv.getFilerClient(filerServer, filerPort), dir, name)
|
||||
|
||||
return commandEnv.withFilerClient(ctx, filerServer, filerPort, func(client filer_pb.SeaweedFilerClient) error {
|
||||
|
||||
_, _, err = paginateDirectory(ctx, writer, client, dir, name, 1000)
|
||||
|
||||
return err
|
||||
|
||||
})
|
||||
|
||||
}
|
||||
|
||||
func paginateDirectory(ctx context.Context, writer io.Writer, client filer_pb.SeaweedFilerClient, dir, name string, paginateSize int) (blockCount uint64, byteCount uint64, err error) {
|
||||
|
||||
paginatedCount := -1
|
||||
startFromFileName := ""
|
||||
|
||||
for paginatedCount == -1 || paginatedCount == paginateSize {
|
||||
resp, listErr := client.ListEntries(ctx, &filer_pb.ListEntriesRequest{
|
||||
Directory: dir,
|
||||
Prefix: name,
|
||||
StartFromFileName: startFromFileName,
|
||||
InclusiveStartFrom: false,
|
||||
Limit: uint32(paginateSize),
|
||||
})
|
||||
if listErr != nil {
|
||||
err = listErr
|
||||
return
|
||||
}
|
||||
|
||||
paginatedCount = len(resp.Entries)
|
||||
|
||||
for _, entry := range resp.Entries {
|
||||
if entry.IsDirectory {
|
||||
subDir := fmt.Sprintf("%s/%s", dir, entry.Name)
|
||||
if dir == "/" {
|
||||
subDir = "/" + entry.Name
|
||||
}
|
||||
numBlock, numByte, err := paginateDirectory(ctx, writer, client, subDir, "", paginateSize)
|
||||
if err == nil {
|
||||
blockCount += numBlock
|
||||
byteCount += numByte
|
||||
}
|
||||
} else {
|
||||
blockCount += uint64(len(entry.Chunks))
|
||||
byteCount += filer2.TotalSize(entry.Chunks)
|
||||
}
|
||||
startFromFileName = entry.Name
|
||||
|
||||
if name != "" && !entry.IsDirectory {
|
||||
fmt.Fprintf(writer, "block:%4d\tbyte:%10d\t%s/%s\n", blockCount, byteCount, dir, name)
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
if name == "" {
|
||||
if name == "" && err == nil {
|
||||
fmt.Fprintf(writer, "block:%4d\tbyte:%10d\t%s\n", blockCount, byteCount, dir)
|
||||
}
|
||||
|
||||
@@ -106,6 +58,31 @@ func paginateDirectory(ctx context.Context, writer io.Writer, client filer_pb.Se
|
||||
|
||||
}
|
||||
|
||||
func duTraverseDirectory(ctx context.Context, writer io.Writer, filerClient filer2.FilerClient, dir, name string) (blockCount uint64, byteCount uint64, err error) {
|
||||
|
||||
err = filer2.ReadDirAllEntries(ctx, filerClient, dir, name, func(entry *filer_pb.Entry, isLast bool) {
|
||||
if entry.IsDirectory {
|
||||
subDir := fmt.Sprintf("%s/%s", dir, entry.Name)
|
||||
if dir == "/" {
|
||||
subDir = "/" + entry.Name
|
||||
}
|
||||
numBlock, numByte, err := duTraverseDirectory(ctx, writer, filerClient, subDir, "")
|
||||
if err == nil {
|
||||
blockCount += numBlock
|
||||
byteCount += numByte
|
||||
}
|
||||
} else {
|
||||
blockCount += uint64(len(entry.Chunks))
|
||||
byteCount += filer2.TotalSize(entry.Chunks)
|
||||
}
|
||||
|
||||
if name != "" && !entry.IsDirectory {
|
||||
fmt.Fprintf(writer, "block:%4d\tbyte:%10d\t%s/%s\n", blockCount, byteCount, dir, name)
|
||||
}
|
||||
})
|
||||
return
|
||||
}
|
||||
|
||||
func (env *CommandEnv) withFilerClient(ctx context.Context, filerServer string, filerPort int64, fn func(filer_pb.SeaweedFilerClient) error) error {
|
||||
|
||||
filerGrpcAddress := fmt.Sprintf("%s:%d", filerServer, filerPort+10000)
|
||||
@@ -115,3 +92,20 @@ func (env *CommandEnv) withFilerClient(ctx context.Context, filerServer string,
|
||||
}, filerGrpcAddress, env.option.GrpcDialOption)
|
||||
|
||||
}
|
||||
|
||||
type commandFilerClient struct {
|
||||
env *CommandEnv
|
||||
filerServer string
|
||||
filerPort int64
|
||||
}
|
||||
|
||||
func (env *CommandEnv) getFilerClient(filerServer string, filerPort int64) *commandFilerClient {
|
||||
return &commandFilerClient{
|
||||
env: env,
|
||||
filerServer: filerServer,
|
||||
filerPort: filerPort,
|
||||
}
|
||||
}
|
||||
func (c *commandFilerClient) WithFilerClient(ctx context.Context, fn func(filer_pb.SeaweedFilerClient) error) error {
|
||||
return c.env.withFilerClient(ctx, c.filerServer, c.filerPort, fn)
|
||||
}
|
||||
+35
-66
@@ -3,13 +3,14 @@ package shell
|
||||
import (
|
||||
"context"
|
||||
"fmt"
|
||||
"github.com/chrislusf/seaweedfs/weed/filer2"
|
||||
"github.com/chrislusf/seaweedfs/weed/pb/filer_pb"
|
||||
"io"
|
||||
"os"
|
||||
"os/user"
|
||||
"strconv"
|
||||
"strings"
|
||||
|
||||
"github.com/chrislusf/seaweedfs/weed/filer2"
|
||||
"github.com/chrislusf/seaweedfs/weed/pb/filer_pb"
|
||||
)
|
||||
|
||||
func init() {
|
||||
@@ -66,83 +67,51 @@ func (c *commandFsLs) Do(args []string, commandEnv *CommandEnv, writer io.Writer
|
||||
}
|
||||
|
||||
dir, name := filer2.FullPath(path).DirAndName()
|
||||
|
||||
return commandEnv.withFilerClient(ctx, filerServer, filerPort, func(client filer_pb.SeaweedFilerClient) error {
|
||||
|
||||
return paginateOneDirectory(ctx, writer, client, dir, name, 1000, isLongFormat, showHidden)
|
||||
|
||||
})
|
||||
|
||||
}
|
||||
|
||||
func paginateOneDirectory(ctx context.Context, writer io.Writer, client filer_pb.SeaweedFilerClient, dir, name string, paginateSize int, isLongFormat, showHidden bool) (err error) {
|
||||
|
||||
entryCount := 0
|
||||
paginatedCount := -1
|
||||
startFromFileName := ""
|
||||
|
||||
for paginatedCount == -1 || paginatedCount == paginateSize {
|
||||
resp, listErr := client.ListEntries(ctx, &filer_pb.ListEntriesRequest{
|
||||
Directory: dir,
|
||||
Prefix: name,
|
||||
StartFromFileName: startFromFileName,
|
||||
InclusiveStartFrom: false,
|
||||
Limit: uint32(paginateSize),
|
||||
})
|
||||
if listErr != nil {
|
||||
err = listErr
|
||||
err = filer2.ReadDirAllEntries(ctx, commandEnv.getFilerClient(filerServer, filerPort), dir, name, func(entry *filer_pb.Entry, isLast bool) {
|
||||
|
||||
if !showHidden && strings.HasPrefix(entry.Name, ".") {
|
||||
return
|
||||
}
|
||||
|
||||
paginatedCount = len(resp.Entries)
|
||||
entryCount++
|
||||
|
||||
for _, entry := range resp.Entries {
|
||||
|
||||
if !showHidden && strings.HasPrefix(entry.Name, ".") {
|
||||
continue
|
||||
if isLongFormat {
|
||||
fileMode := os.FileMode(entry.Attributes.FileMode)
|
||||
userName, groupNames := entry.Attributes.UserName, entry.Attributes.GroupName
|
||||
if userName == "" {
|
||||
if user, userErr := user.LookupId(strconv.Itoa(int(entry.Attributes.Uid))); userErr == nil {
|
||||
userName = user.Username
|
||||
}
|
||||
}
|
||||
groupName := ""
|
||||
if len(groupNames) > 0 {
|
||||
groupName = groupNames[0]
|
||||
}
|
||||
if groupName == "" {
|
||||
if group, groupErr := user.LookupGroupId(strconv.Itoa(int(entry.Attributes.Gid))); groupErr == nil {
|
||||
groupName = group.Name
|
||||
}
|
||||
}
|
||||
|
||||
entryCount++
|
||||
|
||||
if isLongFormat {
|
||||
fileMode := os.FileMode(entry.Attributes.FileMode)
|
||||
userName, groupNames := entry.Attributes.UserName, entry.Attributes.GroupName
|
||||
if userName == "" {
|
||||
if user, userErr := user.LookupId(strconv.Itoa(int(entry.Attributes.Uid))); userErr == nil {
|
||||
userName = user.Username
|
||||
}
|
||||
}
|
||||
groupName := ""
|
||||
if len(groupNames) > 0 {
|
||||
groupName = groupNames[0]
|
||||
}
|
||||
if groupName == "" {
|
||||
if group, groupErr := user.LookupGroupId(strconv.Itoa(int(entry.Attributes.Gid))); groupErr == nil {
|
||||
groupName = group.Name
|
||||
}
|
||||
}
|
||||
|
||||
if dir == "/" {
|
||||
// just for printing
|
||||
dir = ""
|
||||
}
|
||||
fmt.Fprintf(writer, "%s %3d %s %s %6d %s/%s\n",
|
||||
fileMode, len(entry.Chunks),
|
||||
userName, groupName,
|
||||
filer2.TotalSize(entry.Chunks), dir, entry.Name)
|
||||
} else {
|
||||
fmt.Fprintf(writer, "%s\n", entry.Name)
|
||||
if dir == "/" {
|
||||
// just for printing
|
||||
dir = ""
|
||||
}
|
||||
|
||||
startFromFileName = entry.Name
|
||||
|
||||
fmt.Fprintf(writer, "%s %3d %s %s %6d %s/%s\n",
|
||||
fileMode, len(entry.Chunks),
|
||||
userName, groupName,
|
||||
filer2.TotalSize(entry.Chunks), dir, entry.Name)
|
||||
} else {
|
||||
fmt.Fprintf(writer, "%s\n", entry.Name)
|
||||
}
|
||||
}
|
||||
|
||||
if isLongFormat {
|
||||
})
|
||||
|
||||
if isLongFormat && err == nil {
|
||||
fmt.Fprintf(writer, "total %d\n", entryCount)
|
||||
}
|
||||
|
||||
return
|
||||
|
||||
}
|
||||
@@ -5,11 +5,12 @@ import (
|
||||
"fmt"
|
||||
"io"
|
||||
|
||||
"github.com/spf13/viper"
|
||||
|
||||
"github.com/chrislusf/seaweedfs/weed/filer2"
|
||||
"github.com/chrislusf/seaweedfs/weed/notification"
|
||||
"github.com/chrislusf/seaweedfs/weed/pb/filer_pb"
|
||||
"github.com/chrislusf/seaweedfs/weed/util"
|
||||
"github.com/spf13/viper"
|
||||
)
|
||||
|
||||
func init() {
|
||||
@@ -46,33 +47,33 @@ func (c *commandFsMetaNotify) Do(args []string, commandEnv *CommandEnv, writer i
|
||||
|
||||
ctx := context.Background()
|
||||
|
||||
return commandEnv.withFilerClient(ctx, filerServer, filerPort, func(client filer_pb.SeaweedFilerClient) error {
|
||||
var dirCount, fileCount uint64
|
||||
|
||||
var dirCount, fileCount uint64
|
||||
err = doTraverseBFS(ctx, writer, commandEnv.getFilerClient(filerServer, filerPort), filer2.FullPath(path), func(parentPath filer2.FullPath, entry *filer_pb.Entry) {
|
||||
|
||||
err = doTraverse(ctx, writer, client, filer2.FullPath(path), func(parentPath filer2.FullPath, entry *filer_pb.Entry) error {
|
||||
|
||||
if entry.IsDirectory {
|
||||
dirCount++
|
||||
} else {
|
||||
fileCount++
|
||||
}
|
||||
|
||||
return notification.Queue.SendMessage(
|
||||
string(parentPath.Child(entry.Name)),
|
||||
&filer_pb.EventNotification{
|
||||
NewEntry: entry,
|
||||
},
|
||||
)
|
||||
|
||||
})
|
||||
|
||||
if err == nil {
|
||||
fmt.Fprintf(writer, "\ntotal notified %d directories, %d files\n", dirCount, fileCount)
|
||||
if entry.IsDirectory {
|
||||
dirCount++
|
||||
} else {
|
||||
fileCount++
|
||||
}
|
||||
|
||||
return err
|
||||
notifyErr := notification.Queue.SendMessage(
|
||||
string(parentPath.Child(entry.Name)),
|
||||
&filer_pb.EventNotification{
|
||||
NewEntry: entry,
|
||||
},
|
||||
)
|
||||
|
||||
if notifyErr != nil {
|
||||
fmt.Fprintf(writer, "fail to notify new entry event for %s: %v\n", parentPath.Child(entry.Name), notifyErr)
|
||||
}
|
||||
|
||||
})
|
||||
|
||||
if err == nil {
|
||||
fmt.Fprintf(writer, "\ntotal notified %d directories, %d files\n", dirCount, fileCount)
|
||||
}
|
||||
|
||||
return err
|
||||
|
||||
}
|
||||
@@ -6,12 +6,15 @@ import (
|
||||
"fmt"
|
||||
"io"
|
||||
"os"
|
||||
"sync"
|
||||
"sync/atomic"
|
||||
"time"
|
||||
|
||||
"github.com/golang/protobuf/proto"
|
||||
|
||||
"github.com/chrislusf/seaweedfs/weed/filer2"
|
||||
"github.com/chrislusf/seaweedfs/weed/pb/filer_pb"
|
||||
"github.com/chrislusf/seaweedfs/weed/util"
|
||||
"github.com/golang/protobuf/proto"
|
||||
)
|
||||
|
||||
func init() {
|
||||
@@ -51,114 +54,119 @@ func (c *commandFsMetaSave) Do(args []string, commandEnv *CommandEnv, writer io.
|
||||
return nil
|
||||
}
|
||||
|
||||
filerServer, filerPort, path, err := commandEnv.parseUrl(findInputDirectory(fsMetaSaveCommand.Args()))
|
||||
if err != nil {
|
||||
return err
|
||||
filerServer, filerPort, path, parseErr := commandEnv.parseUrl(findInputDirectory(fsMetaSaveCommand.Args()))
|
||||
if parseErr != nil {
|
||||
return parseErr
|
||||
}
|
||||
|
||||
ctx := context.Background()
|
||||
|
||||
return commandEnv.withFilerClient(ctx, filerServer, filerPort, func(client filer_pb.SeaweedFilerClient) error {
|
||||
t := time.Now()
|
||||
fileName := *outputFileName
|
||||
if fileName == "" {
|
||||
fileName = fmt.Sprintf("%s-%d-%4d%02d%02d-%02d%02d%02d.meta",
|
||||
filerServer, filerPort, t.Year(), t.Month(), t.Day(), t.Hour(), t.Minute(), t.Second())
|
||||
}
|
||||
|
||||
t := time.Now()
|
||||
fileName := *outputFileName
|
||||
if fileName == "" {
|
||||
fileName = fmt.Sprintf("%s-%d-%4d%02d%02d-%02d%02d%02d.meta",
|
||||
filerServer, filerPort, t.Year(), t.Month(), t.Day(), t.Hour(), t.Minute(), t.Second())
|
||||
dst, openErr := os.OpenFile(fileName, os.O_WRONLY|os.O_CREATE|os.O_TRUNC, 0644)
|
||||
if openErr != nil {
|
||||
return fmt.Errorf("failed to create file %s: %v", fileName, openErr)
|
||||
}
|
||||
defer dst.Close()
|
||||
|
||||
var dirCount, fileCount uint64
|
||||
|
||||
err = doTraverseBFS(ctx, writer, commandEnv.getFilerClient(filerServer, filerPort), filer2.FullPath(path), func(parentPath filer2.FullPath, entry *filer_pb.Entry) {
|
||||
|
||||
protoMessage := &filer_pb.FullEntry{
|
||||
Dir: string(parentPath),
|
||||
Entry: entry,
|
||||
}
|
||||
|
||||
dst, err := os.OpenFile(fileName, os.O_WRONLY|os.O_CREATE|os.O_TRUNC, 0644)
|
||||
bytes, err := proto.Marshal(protoMessage)
|
||||
if err != nil {
|
||||
return nil
|
||||
}
|
||||
defer dst.Close()
|
||||
|
||||
var dirCount, fileCount uint64
|
||||
|
||||
sizeBuf := make([]byte, 4)
|
||||
|
||||
err = doTraverse(ctx, writer, client, filer2.FullPath(path), func(parentPath filer2.FullPath, entry *filer_pb.Entry) error {
|
||||
|
||||
protoMessage := &filer_pb.FullEntry{
|
||||
Dir: string(parentPath),
|
||||
Entry: entry,
|
||||
}
|
||||
|
||||
bytes, err := proto.Marshal(protoMessage)
|
||||
if err != nil {
|
||||
return fmt.Errorf("marshall error: %v", err)
|
||||
}
|
||||
|
||||
util.Uint32toBytes(sizeBuf, uint32(len(bytes)))
|
||||
|
||||
dst.Write(sizeBuf)
|
||||
dst.Write(bytes)
|
||||
|
||||
if entry.IsDirectory {
|
||||
dirCount++
|
||||
} else {
|
||||
fileCount++
|
||||
}
|
||||
|
||||
if *verbose {
|
||||
println(parentPath.Child(entry.Name))
|
||||
}
|
||||
|
||||
return nil
|
||||
|
||||
})
|
||||
|
||||
if err == nil {
|
||||
fmt.Fprintf(writer, "\ntotal %d directories, %d files", dirCount, fileCount)
|
||||
fmt.Fprintf(writer, "\nmeta data for http://%s:%d%s is saved to %s\n", filerServer, filerPort, path, fileName)
|
||||
}
|
||||
|
||||
return err
|
||||
|
||||
})
|
||||
|
||||
}
|
||||
func doTraverse(ctx context.Context, writer io.Writer, client filer_pb.SeaweedFilerClient, parentPath filer2.FullPath, fn func(parentPath filer2.FullPath, entry *filer_pb.Entry) error) (err error) {
|
||||
|
||||
paginatedCount := -1
|
||||
startFromFileName := ""
|
||||
paginateSize := 1000
|
||||
|
||||
for paginatedCount == -1 || paginatedCount == paginateSize {
|
||||
resp, listErr := client.ListEntries(ctx, &filer_pb.ListEntriesRequest{
|
||||
Directory: string(parentPath),
|
||||
Prefix: "",
|
||||
StartFromFileName: startFromFileName,
|
||||
InclusiveStartFrom: false,
|
||||
Limit: uint32(paginateSize),
|
||||
})
|
||||
if listErr != nil {
|
||||
err = listErr
|
||||
fmt.Fprintf(writer, "marshall error: %v\n", err)
|
||||
return
|
||||
}
|
||||
|
||||
paginatedCount = len(resp.Entries)
|
||||
sizeBuf := make([]byte, 4)
|
||||
util.Uint32toBytes(sizeBuf, uint32(len(bytes)))
|
||||
|
||||
for _, entry := range resp.Entries {
|
||||
|
||||
if err = fn(parentPath, entry); err != nil {
|
||||
return err
|
||||
}
|
||||
|
||||
if entry.IsDirectory {
|
||||
subDir := fmt.Sprintf("%s/%s", parentPath, entry.Name)
|
||||
if parentPath == "/" {
|
||||
subDir = "/" + entry.Name
|
||||
}
|
||||
if err = doTraverse(ctx, writer, client, filer2.FullPath(subDir), fn); err != nil {
|
||||
return err
|
||||
}
|
||||
}
|
||||
startFromFileName = entry.Name
|
||||
dst.Write(sizeBuf)
|
||||
dst.Write(bytes)
|
||||
|
||||
if entry.IsDirectory {
|
||||
atomic.AddUint64(&dirCount, 1)
|
||||
} else {
|
||||
atomic.AddUint64(&fileCount, 1)
|
||||
}
|
||||
|
||||
if *verbose {
|
||||
println(parentPath.Child(entry.Name))
|
||||
}
|
||||
|
||||
})
|
||||
|
||||
if err == nil {
|
||||
fmt.Fprintf(writer, "\ntotal %d directories, %d files", dirCount, fileCount)
|
||||
fmt.Fprintf(writer, "\nmeta data for http://%s:%d%s is saved to %s\n", filerServer, filerPort, path, fileName)
|
||||
}
|
||||
|
||||
return err
|
||||
|
||||
}
|
||||
func doTraverseBFS(ctx context.Context, writer io.Writer, filerClient filer2.FilerClient,
|
||||
parentPath filer2.FullPath, fn func(parentPath filer2.FullPath, entry *filer_pb.Entry)) (err error) {
|
||||
|
||||
K := 5
|
||||
|
||||
var jobQueueWg sync.WaitGroup
|
||||
queue := util.NewQueue()
|
||||
jobQueueWg.Add(1)
|
||||
queue.Enqueue(parentPath)
|
||||
var isTerminating bool
|
||||
|
||||
for i := 0; i < K; i++ {
|
||||
go func() {
|
||||
for {
|
||||
if isTerminating {
|
||||
break
|
||||
}
|
||||
t := queue.Dequeue()
|
||||
if t == nil {
|
||||
time.Sleep(329 * time.Millisecond)
|
||||
continue
|
||||
}
|
||||
dir := t.(filer2.FullPath)
|
||||
processErr := processOneDirectory(ctx, writer, filerClient, dir, queue, &jobQueueWg, fn)
|
||||
if processErr != nil {
|
||||
err = processErr
|
||||
}
|
||||
jobQueueWg.Done()
|
||||
}
|
||||
}()
|
||||
}
|
||||
jobQueueWg.Wait()
|
||||
isTerminating = true
|
||||
return
|
||||
}
|
||||
|
||||
func processOneDirectory(ctx context.Context, writer io.Writer, filerClient filer2.FilerClient,
|
||||
parentPath filer2.FullPath, queue *util.Queue, jobQueueWg *sync.WaitGroup,
|
||||
fn func(parentPath filer2.FullPath, entry *filer_pb.Entry)) (err error) {
|
||||
|
||||
return filer2.ReadDirAllEntries(ctx, filerClient, string(parentPath), "", func(entry *filer_pb.Entry, isLast bool) {
|
||||
|
||||
fn(parentPath, entry)
|
||||
|
||||
if entry.IsDirectory {
|
||||
subDir := fmt.Sprintf("%s/%s", parentPath, entry.Name)
|
||||
if parentPath == "/" {
|
||||
subDir = "/" + entry.Name
|
||||
}
|
||||
jobQueueWg.Add(1)
|
||||
queue.Enqueue(filer2.FullPath(subDir))
|
||||
}
|
||||
})
|
||||
|
||||
}
|
||||
@@ -3,10 +3,11 @@ package shell
|
||||
import (
|
||||
"context"
|
||||
"fmt"
|
||||
"github.com/chrislusf/seaweedfs/weed/filer2"
|
||||
"github.com/chrislusf/seaweedfs/weed/pb/filer_pb"
|
||||
"io"
|
||||
"strings"
|
||||
|
||||
"github.com/chrislusf/seaweedfs/weed/filer2"
|
||||
"github.com/chrislusf/seaweedfs/weed/pb/filer_pb"
|
||||
)
|
||||
|
||||
func init() {
|
||||
@@ -38,77 +39,47 @@ func (c *commandFsTree) Do(args []string, commandEnv *CommandEnv, writer io.Writ
|
||||
|
||||
ctx := context.Background()
|
||||
|
||||
return commandEnv.withFilerClient(ctx, filerServer, filerPort, func(client filer_pb.SeaweedFilerClient) error {
|
||||
dirCount, fCount, terr := treeTraverseDirectory(ctx, writer, commandEnv.getFilerClient(filerServer, filerPort), dir, name, newPrefix(), -1)
|
||||
|
||||
dirCount, fCount, terr := treeTraverseDirectory(ctx, writer, client, dir, name, newPrefix(), -1)
|
||||
|
||||
if terr == nil {
|
||||
fmt.Fprintf(writer, "%d directories, %d files\n", dirCount, fCount)
|
||||
}
|
||||
|
||||
return terr
|
||||
|
||||
})
|
||||
|
||||
}
|
||||
func treeTraverseDirectory(ctx context.Context, writer io.Writer, client filer_pb.SeaweedFilerClient, dir, name string, prefix *Prefix, level int) (directoryCount, fileCount int64, err error) {
|
||||
|
||||
paginatedCount := -1
|
||||
startFromFileName := ""
|
||||
paginateSize := 1000
|
||||
|
||||
for paginatedCount == -1 || paginatedCount == paginateSize {
|
||||
resp, listErr := client.ListEntries(ctx, &filer_pb.ListEntriesRequest{
|
||||
Directory: dir,
|
||||
Prefix: name,
|
||||
StartFromFileName: startFromFileName,
|
||||
InclusiveStartFrom: false,
|
||||
Limit: uint32(paginateSize),
|
||||
})
|
||||
if listErr != nil {
|
||||
err = listErr
|
||||
return
|
||||
}
|
||||
|
||||
paginatedCount = len(resp.Entries)
|
||||
if paginatedCount > 0 {
|
||||
prefix.addMarker(level)
|
||||
}
|
||||
|
||||
for i, entry := range resp.Entries {
|
||||
|
||||
if level < 0 && name != "" {
|
||||
if entry.Name != name {
|
||||
break
|
||||
}
|
||||
}
|
||||
|
||||
// 0.1% wrong prefix here, but fixing it would need to paginate to the next batch first
|
||||
isLast := paginatedCount < paginateSize && i == paginatedCount-1
|
||||
fmt.Fprintf(writer, "%s%s\n", prefix.getPrefix(level, isLast), entry.Name)
|
||||
|
||||
if entry.IsDirectory {
|
||||
directoryCount++
|
||||
subDir := fmt.Sprintf("%s/%s", dir, entry.Name)
|
||||
if dir == "/" {
|
||||
subDir = "/" + entry.Name
|
||||
}
|
||||
dirCount, fCount, terr := treeTraverseDirectory(ctx, writer, client, subDir, "", prefix, level+1)
|
||||
directoryCount += dirCount
|
||||
fileCount += fCount
|
||||
err = terr
|
||||
} else {
|
||||
fileCount++
|
||||
}
|
||||
startFromFileName = entry.Name
|
||||
|
||||
}
|
||||
if terr == nil {
|
||||
fmt.Fprintf(writer, "%d directories, %d files\n", dirCount, fCount)
|
||||
}
|
||||
|
||||
return
|
||||
return terr
|
||||
|
||||
}
|
||||
|
||||
func treeTraverseDirectory(ctx context.Context, writer io.Writer, filerClient filer2.FilerClient, dir, name string, prefix *Prefix, level int) (directoryCount, fileCount int64, err error) {
|
||||
|
||||
prefix.addMarker(level)
|
||||
|
||||
err = filer2.ReadDirAllEntries(ctx, filerClient, dir, name, func(entry *filer_pb.Entry, isLast bool) {
|
||||
if level < 0 && name != "" {
|
||||
if entry.Name != name {
|
||||
return
|
||||
}
|
||||
}
|
||||
|
||||
fmt.Fprintf(writer, "%s%s\n", prefix.getPrefix(level, isLast), entry.Name)
|
||||
|
||||
if entry.IsDirectory {
|
||||
directoryCount++
|
||||
subDir := fmt.Sprintf("%s/%s", dir, entry.Name)
|
||||
if dir == "/" {
|
||||
subDir = "/" + entry.Name
|
||||
}
|
||||
dirCount, fCount, terr := treeTraverseDirectory(ctx, writer, filerClient, subDir, "", prefix, level+1)
|
||||
directoryCount += dirCount
|
||||
fileCount += fCount
|
||||
err = terr
|
||||
} else {
|
||||
fileCount++
|
||||
}
|
||||
|
||||
})
|
||||
return
|
||||
}
|
||||
|
||||
type Prefix struct {
|
||||
markers map[int]bool
|
||||
}
|
||||
|
||||
@@ -27,7 +27,7 @@ func (c *commandVolumeBalance) Name() string {
|
||||
func (c *commandVolumeBalance) Help() string {
|
||||
return `balance all volumes among volume servers
|
||||
|
||||
volume.balance [-c ALL|EACH_COLLECTION|<collection_name>] [-force] [-dataCenter=<data_center_name>]
|
||||
volume.balance [-collection ALL|EACH_COLLECTION|<collection_name>] [-force] [-dataCenter=<data_center_name>]
|
||||
|
||||
Algorithm:
|
||||
|
||||
|
||||
@@ -46,7 +46,7 @@ func (c *commandVolumeList) Do(args []string, commandEnv *CommandEnv, writer io.
|
||||
}
|
||||
|
||||
func writeTopologyInfo(writer io.Writer, t *master_pb.TopologyInfo, volumeSizeLimitMb uint64) statistics {
|
||||
fmt.Fprintf(writer, "Topology volume:%d/%d active:%d free:%d volumeSizeLimit:%d MB\n", t.VolumeCount, t.MaxVolumeCount, t.ActiveVolumeCount, t.FreeVolumeCount, volumeSizeLimitMb)
|
||||
fmt.Fprintf(writer, "Topology volume:%d/%d active:%d free:%d remote:%d volumeSizeLimit:%d MB\n", t.VolumeCount, t.MaxVolumeCount, t.ActiveVolumeCount, t.FreeVolumeCount, t.RemoteVolumeCount, volumeSizeLimitMb)
|
||||
sort.Slice(t.DataCenterInfos, func(i, j int) bool {
|
||||
return t.DataCenterInfos[i].Id < t.DataCenterInfos[j].Id
|
||||
})
|
||||
@@ -58,7 +58,7 @@ func writeTopologyInfo(writer io.Writer, t *master_pb.TopologyInfo, volumeSizeLi
|
||||
return s
|
||||
}
|
||||
func writeDataCenterInfo(writer io.Writer, t *master_pb.DataCenterInfo) statistics {
|
||||
fmt.Fprintf(writer, " DataCenter %s volume:%d/%d active:%d free:%d\n", t.Id, t.VolumeCount, t.MaxVolumeCount, t.ActiveVolumeCount, t.FreeVolumeCount)
|
||||
fmt.Fprintf(writer, " DataCenter %s volume:%d/%d active:%d free:%d remote:%d\n", t.Id, t.VolumeCount, t.MaxVolumeCount, t.ActiveVolumeCount, t.FreeVolumeCount, t.RemoteVolumeCount)
|
||||
var s statistics
|
||||
sort.Slice(t.RackInfos, func(i, j int) bool {
|
||||
return t.RackInfos[i].Id < t.RackInfos[j].Id
|
||||
@@ -70,7 +70,7 @@ func writeDataCenterInfo(writer io.Writer, t *master_pb.DataCenterInfo) statisti
|
||||
return s
|
||||
}
|
||||
func writeRackInfo(writer io.Writer, t *master_pb.RackInfo) statistics {
|
||||
fmt.Fprintf(writer, " Rack %s volume:%d/%d active:%d free:%d\n", t.Id, t.VolumeCount, t.MaxVolumeCount, t.ActiveVolumeCount, t.FreeVolumeCount)
|
||||
fmt.Fprintf(writer, " Rack %s volume:%d/%d active:%d free:%d remote:%d\n", t.Id, t.VolumeCount, t.MaxVolumeCount, t.ActiveVolumeCount, t.FreeVolumeCount, t.RemoteVolumeCount)
|
||||
var s statistics
|
||||
sort.Slice(t.DataNodeInfos, func(i, j int) bool {
|
||||
return t.DataNodeInfos[i].Id < t.DataNodeInfos[j].Id
|
||||
@@ -82,7 +82,7 @@ func writeRackInfo(writer io.Writer, t *master_pb.RackInfo) statistics {
|
||||
return s
|
||||
}
|
||||
func writeDataNodeInfo(writer io.Writer, t *master_pb.DataNodeInfo) statistics {
|
||||
fmt.Fprintf(writer, " DataNode %s volume:%d/%d active:%d free:%d\n", t.Id, t.VolumeCount, t.MaxVolumeCount, t.ActiveVolumeCount, t.FreeVolumeCount)
|
||||
fmt.Fprintf(writer, " DataNode %s volume:%d/%d active:%d free:%d remote:%d\n", t.Id, t.VolumeCount, t.MaxVolumeCount, t.ActiveVolumeCount, t.FreeVolumeCount, t.RemoteVolumeCount)
|
||||
var s statistics
|
||||
sort.Slice(t.VolumeInfos, func(i, j int) bool {
|
||||
return t.VolumeInfos[i].Id < t.VolumeInfos[j].Id
|
||||
|
||||
@@ -0,0 +1,150 @@
|
||||
package shell
|
||||
|
||||
import (
|
||||
"context"
|
||||
"flag"
|
||||
"fmt"
|
||||
"io"
|
||||
"time"
|
||||
|
||||
"github.com/chrislusf/seaweedfs/weed/operation"
|
||||
"github.com/chrislusf/seaweedfs/weed/pb/volume_server_pb"
|
||||
"github.com/chrislusf/seaweedfs/weed/storage/needle"
|
||||
"google.golang.org/grpc"
|
||||
)
|
||||
|
||||
func init() {
|
||||
Commands = append(Commands, &commandVolumeTier{})
|
||||
}
|
||||
|
||||
type commandVolumeTier struct {
|
||||
}
|
||||
|
||||
func (c *commandVolumeTier) Name() string {
|
||||
return "volume.tier.upload"
|
||||
}
|
||||
|
||||
func (c *commandVolumeTier) Help() string {
|
||||
return `move the dat file of a volume to a remote tier
|
||||
|
||||
volume.tier.upload [-collection=""] [-fullPercent=95] [-quietFor=1h]
|
||||
volume.tier.upload [-collection=""] -volumeId=<volume_id> -dest=<storage_backend> [-keepLocalDatFile]
|
||||
|
||||
e.g.:
|
||||
volume.tier.upload -volumeId=7 -dest=s3
|
||||
volume.tier.upload -volumeId=7 -dest=s3.default
|
||||
|
||||
The <storage_backend> is defined in master.toml.
|
||||
For example, "s3.default" in [storage.backend.s3.default]
|
||||
|
||||
This command will move the dat file of a volume to a remote tier.
|
||||
|
||||
SeaweedFS enables scalable and fast local access to lots of files,
|
||||
and the cloud storage is slower by cost efficient. How to combine them together?
|
||||
|
||||
Usually the data follows 80/20 rule: only 20% of data is frequently accessed.
|
||||
We can offload the old volumes to the cloud.
|
||||
|
||||
With this, SeaweedFS can be both fast and scalable, and infinite storage space.
|
||||
Just add more local SeaweedFS volume servers to increase the throughput.
|
||||
|
||||
The index file is still local, and the same O(1) disk read is applied to the remote file.
|
||||
|
||||
`
|
||||
}
|
||||
|
||||
func (c *commandVolumeTier) Do(args []string, commandEnv *CommandEnv, writer io.Writer) (err error) {
|
||||
|
||||
tierCommand := flag.NewFlagSet(c.Name(), flag.ContinueOnError)
|
||||
volumeId := tierCommand.Int("volumeId", 0, "the volume id")
|
||||
collection := tierCommand.String("collection", "", "the collection name")
|
||||
fullPercentage := tierCommand.Float64("fullPercent", 95, "the volume reaches the percentage of max volume size")
|
||||
quietPeriod := tierCommand.Duration("quietFor", 24*time.Hour, "select volumes without no writes for this period")
|
||||
dest := tierCommand.String("dest", "", "the target tier name")
|
||||
keepLocalDatFile := tierCommand.Bool("keepLocalDatFile", false, "whether keep local dat file")
|
||||
if err = tierCommand.Parse(args); err != nil {
|
||||
return nil
|
||||
}
|
||||
|
||||
ctx := context.Background()
|
||||
vid := needle.VolumeId(*volumeId)
|
||||
|
||||
// volumeId is provided
|
||||
if vid != 0 {
|
||||
return doVolumeTier(ctx, commandEnv, writer, *collection, vid, *dest, *keepLocalDatFile)
|
||||
}
|
||||
|
||||
// apply to all volumes in the collection
|
||||
// reusing collectVolumeIdsForEcEncode for now
|
||||
volumeIds, err := collectVolumeIdsForEcEncode(ctx, commandEnv, *collection, *fullPercentage, *quietPeriod)
|
||||
if err != nil {
|
||||
return err
|
||||
}
|
||||
fmt.Printf("tiering volumes: %v\n", volumeIds)
|
||||
for _, vid := range volumeIds {
|
||||
if err = doVolumeTier(ctx, commandEnv, writer, *collection, vid, *dest, *keepLocalDatFile); err != nil {
|
||||
return err
|
||||
}
|
||||
}
|
||||
|
||||
return nil
|
||||
}
|
||||
|
||||
func doVolumeTier(ctx context.Context, commandEnv *CommandEnv, writer io.Writer, collection string, vid needle.VolumeId, dest string, keepLocalDatFile bool) (err error) {
|
||||
// find volume location
|
||||
locations, found := commandEnv.MasterClient.GetLocations(uint32(vid))
|
||||
if !found {
|
||||
return fmt.Errorf("volume %d not found", vid)
|
||||
}
|
||||
|
||||
// mark the volume as readonly
|
||||
/*
|
||||
err = markVolumeReadonly(ctx, commandEnv.option.GrpcDialOption, needle.VolumeId(vid), locations)
|
||||
if err != nil {
|
||||
return fmt.Errorf("mark volume %d as readonly on %s: %v", vid, locations[0].Url, err)
|
||||
}
|
||||
*/
|
||||
|
||||
// copy the .dat file to remote tier
|
||||
err = copyDatToRemoteTier(ctx, commandEnv.option.GrpcDialOption, writer, needle.VolumeId(vid), collection, locations[0].Url, dest, keepLocalDatFile)
|
||||
if err != nil {
|
||||
return fmt.Errorf("copy dat file for volume %d on %s to %s: %v", vid, locations[0].Url, dest, err)
|
||||
}
|
||||
|
||||
return nil
|
||||
}
|
||||
|
||||
func copyDatToRemoteTier(ctx context.Context, grpcDialOption grpc.DialOption, writer io.Writer, volumeId needle.VolumeId, collection string, sourceVolumeServer string, dest string, keepLocalDatFile bool) error {
|
||||
|
||||
err := operation.WithVolumeServerClient(sourceVolumeServer, grpcDialOption, func(volumeServerClient volume_server_pb.VolumeServerClient) error {
|
||||
stream, copyErr := volumeServerClient.VolumeTierCopyDatToRemote(ctx, &volume_server_pb.VolumeTierCopyDatToRemoteRequest{
|
||||
VolumeId: uint32(volumeId),
|
||||
Collection: collection,
|
||||
DestinationBackendName: dest,
|
||||
KeepLocalDatFile: keepLocalDatFile,
|
||||
})
|
||||
|
||||
var lastProcessed int64
|
||||
for {
|
||||
resp, recvErr := stream.Recv()
|
||||
if recvErr != nil {
|
||||
if recvErr == io.EOF {
|
||||
break
|
||||
} else {
|
||||
return recvErr
|
||||
}
|
||||
}
|
||||
|
||||
processingSpeed := float64(resp.Processed-lastProcessed) / 1024.0 / 1024.0
|
||||
|
||||
fmt.Fprintf(writer, "copied %.2f%%, %d bytes, %.2fMB/s\n", resp.ProcessedPercentage, resp.Processed, processingSpeed)
|
||||
|
||||
lastProcessed = resp.Processed
|
||||
}
|
||||
|
||||
return copyErr
|
||||
})
|
||||
|
||||
return err
|
||||
|
||||
}
|
||||
+9
-15
@@ -9,10 +9,11 @@ import (
|
||||
"strconv"
|
||||
"strings"
|
||||
|
||||
"google.golang.org/grpc"
|
||||
|
||||
"github.com/chrislusf/seaweedfs/weed/filer2"
|
||||
"github.com/chrislusf/seaweedfs/weed/pb/filer_pb"
|
||||
"github.com/chrislusf/seaweedfs/weed/wdclient"
|
||||
"google.golang.org/grpc"
|
||||
)
|
||||
|
||||
type ShellOptions struct {
|
||||
@@ -71,26 +72,19 @@ func (ce *CommandEnv) checkDirectory(ctx context.Context, filerServer string, fi
|
||||
|
||||
return ce.withFilerClient(ctx, filerServer, filerPort, func(client filer_pb.SeaweedFilerClient) error {
|
||||
|
||||
resp, listErr := client.ListEntries(ctx, &filer_pb.ListEntriesRequest{
|
||||
Directory: dir,
|
||||
Prefix: name,
|
||||
StartFromFileName: name,
|
||||
InclusiveStartFrom: true,
|
||||
Limit: 1,
|
||||
resp, lookupErr := client.LookupDirectoryEntry(ctx, &filer_pb.LookupDirectoryEntryRequest{
|
||||
Directory: dir,
|
||||
Name: name,
|
||||
})
|
||||
if listErr != nil {
|
||||
return listErr
|
||||
if lookupErr != nil {
|
||||
return lookupErr
|
||||
}
|
||||
|
||||
if len(resp.Entries) == 0 {
|
||||
if resp.Entry == nil {
|
||||
return fmt.Errorf("entry not found")
|
||||
}
|
||||
|
||||
if resp.Entries[0].Name != name {
|
||||
return fmt.Errorf("not a valid directory, found %s", resp.Entries[0].Name)
|
||||
}
|
||||
|
||||
if !resp.Entries[0].IsDirectory {
|
||||
if !resp.Entry.IsDirectory {
|
||||
return fmt.Errorf("not a directory")
|
||||
}
|
||||
|
||||
|
||||
@@ -2,18 +2,132 @@ package backend
|
||||
|
||||
import (
|
||||
"io"
|
||||
"os"
|
||||
"strings"
|
||||
"time"
|
||||
|
||||
"github.com/chrislusf/seaweedfs/weed/glog"
|
||||
"github.com/chrislusf/seaweedfs/weed/pb/master_pb"
|
||||
"github.com/chrislusf/seaweedfs/weed/pb/volume_server_pb"
|
||||
"github.com/spf13/viper"
|
||||
)
|
||||
|
||||
type DataStorageBackend interface {
|
||||
type BackendStorageFile interface {
|
||||
io.ReaderAt
|
||||
io.WriterAt
|
||||
Truncate(off int64) error
|
||||
io.Closer
|
||||
GetStat() (datSize int64, modTime time.Time, err error)
|
||||
String() string
|
||||
Name() string
|
||||
}
|
||||
|
||||
type BackendStorage interface {
|
||||
ToProperties() map[string]string
|
||||
NewStorageFile(key string, tierInfo *volume_server_pb.VolumeTierInfo) BackendStorageFile
|
||||
CopyFile(f *os.File, fn func(progressed int64, percentage float32) error) (key string, size int64, err error)
|
||||
}
|
||||
|
||||
type StringProperties interface {
|
||||
GetString(key string) string
|
||||
}
|
||||
type StorageType string
|
||||
type BackendStorageFactory interface {
|
||||
StorageType() StorageType
|
||||
BuildStorage(configuration StringProperties, id string) (BackendStorage, error)
|
||||
}
|
||||
|
||||
var (
|
||||
StorageBackends []DataStorageBackend
|
||||
BackendStorageFactories = make(map[StorageType]BackendStorageFactory)
|
||||
BackendStorages = make(map[string]BackendStorage)
|
||||
)
|
||||
|
||||
func LoadConfiguration(config *viper.Viper) {
|
||||
|
||||
StorageBackendPrefix := "storage.backend"
|
||||
|
||||
backendSub := config.Sub(StorageBackendPrefix)
|
||||
|
||||
for backendTypeName := range config.GetStringMap(StorageBackendPrefix) {
|
||||
backendStorageFactory, found := BackendStorageFactories[StorageType(backendTypeName)]
|
||||
if !found {
|
||||
glog.Fatalf("backend storage type %s not found", backendTypeName)
|
||||
}
|
||||
backendTypeSub := backendSub.Sub(backendTypeName)
|
||||
for backendStorageId := range backendSub.GetStringMap(backendTypeName) {
|
||||
if !backendTypeSub.GetBool(backendStorageId + ".enabled") {
|
||||
continue
|
||||
}
|
||||
backendStorage, buildErr := backendStorageFactory.BuildStorage(backendTypeSub.Sub(backendStorageId), backendStorageId)
|
||||
if buildErr != nil {
|
||||
glog.Fatalf("fail to create backend storage %s.%s", backendTypeName, backendStorageId)
|
||||
}
|
||||
BackendStorages[backendTypeName+"."+backendStorageId] = backendStorage
|
||||
if backendStorageId == "default" {
|
||||
BackendStorages[backendTypeName] = backendStorage
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
func LoadFromPbStorageBackends(storageBackends []*master_pb.StorageBackend) {
|
||||
|
||||
for _, storageBackend := range storageBackends {
|
||||
backendStorageFactory, found := BackendStorageFactories[StorageType(storageBackend.Type)]
|
||||
if !found {
|
||||
glog.Warningf("storage type %s not found", storageBackend.Type)
|
||||
continue
|
||||
}
|
||||
backendStorage, buildErr := backendStorageFactory.BuildStorage(newProperties(storageBackend.Properties), storageBackend.Id)
|
||||
if buildErr != nil {
|
||||
glog.Fatalf("fail to create backend storage %s.%s", storageBackend.Type, storageBackend.Id)
|
||||
}
|
||||
BackendStorages[storageBackend.Type+"."+storageBackend.Id] = backendStorage
|
||||
if storageBackend.Id == "default" {
|
||||
BackendStorages[storageBackend.Type] = backendStorage
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
type Properties struct {
|
||||
m map[string]string
|
||||
}
|
||||
|
||||
func newProperties(m map[string]string) *Properties {
|
||||
return &Properties{m: m}
|
||||
}
|
||||
|
||||
func (p *Properties) GetString(key string) string {
|
||||
if v, found := p.m[key]; found {
|
||||
return v
|
||||
}
|
||||
return ""
|
||||
}
|
||||
|
||||
func ToPbStorageBackends() (backends []*master_pb.StorageBackend) {
|
||||
for sName, s := range BackendStorages {
|
||||
sType, sId := BackendNameToTypeId(sName)
|
||||
if sType == "" {
|
||||
continue
|
||||
}
|
||||
backends = append(backends, &master_pb.StorageBackend{
|
||||
Type: sType,
|
||||
Id: sId,
|
||||
Properties: s.ToProperties(),
|
||||
})
|
||||
}
|
||||
return
|
||||
}
|
||||
|
||||
func BackendNameToTypeId(backendName string) (backendType, backendId string) {
|
||||
parts := strings.Split(backendName, ".")
|
||||
if len(parts) == 1 {
|
||||
return backendName, "default"
|
||||
}
|
||||
if len(parts) != 2 {
|
||||
return
|
||||
}
|
||||
|
||||
backendType, backendId = parts[0], parts[1]
|
||||
return
|
||||
}
|
||||
@@ -6,7 +6,7 @@ import (
|
||||
)
|
||||
|
||||
var (
|
||||
_ DataStorageBackend = &DiskFile{}
|
||||
_ BackendStorageFile = &DiskFile{}
|
||||
)
|
||||
|
||||
type DiskFile struct {
|
||||
@@ -45,6 +45,6 @@ func (df *DiskFile) GetStat() (datSize int64, modTime time.Time, err error) {
|
||||
return 0, time.Time{}, err
|
||||
}
|
||||
|
||||
func (df *DiskFile) String() string {
|
||||
func (df *DiskFile) Name() string {
|
||||
return df.fullFilePath
|
||||
}
|
||||
@@ -8,7 +8,7 @@ import (
|
||||
)
|
||||
|
||||
var (
|
||||
_ backend.DataStorageBackend = &MemoryMappedFile{}
|
||||
_ backend.BackendStorageFile = &MemoryMappedFile{}
|
||||
)
|
||||
|
||||
type MemoryMappedFile struct {
|
||||
@@ -55,6 +55,6 @@ func (mmf *MemoryMappedFile) GetStat() (datSize int64, modTime time.Time, err er
|
||||
return 0, time.Time{}, err
|
||||
}
|
||||
|
||||
func (mmf *MemoryMappedFile) String() string {
|
||||
func (mmf *MemoryMappedFile) Name() string {
|
||||
return mmf.mm.File.Name()
|
||||
}
|
||||
@@ -2,119 +2,157 @@ package s3_backend
|
||||
|
||||
import (
|
||||
"fmt"
|
||||
"io"
|
||||
"os"
|
||||
"strings"
|
||||
"time"
|
||||
|
||||
"github.com/aws/aws-sdk-go/service/s3"
|
||||
"github.com/aws/aws-sdk-go/service/s3/s3iface"
|
||||
"github.com/chrislusf/seaweedfs/weed/glog"
|
||||
"github.com/chrislusf/seaweedfs/weed/pb/volume_server_pb"
|
||||
"github.com/chrislusf/seaweedfs/weed/storage/backend"
|
||||
"github.com/chrislusf/seaweedfs/weed/storage/needle"
|
||||
"github.com/chrislusf/seaweedfs/weed/util"
|
||||
)
|
||||
|
||||
var (
|
||||
_ backend.DataStorageBackend = &S3Backend{}
|
||||
"github.com/google/uuid"
|
||||
)
|
||||
|
||||
func init() {
|
||||
backend.StorageBackends = append(backend.StorageBackends, &S3Backend{})
|
||||
backend.BackendStorageFactories["s3"] = &S3BackendFactory{}
|
||||
}
|
||||
|
||||
type S3Backend struct {
|
||||
conn s3iface.S3API
|
||||
region string
|
||||
bucket string
|
||||
dir string
|
||||
vid needle.VolumeId
|
||||
key string
|
||||
type S3BackendFactory struct {
|
||||
}
|
||||
|
||||
func (s3backend S3Backend) ReadAt(p []byte, off int64) (n int, err error) {
|
||||
bytesRange := fmt.Sprintf("bytes=%d-%d", off, off+int64(len(p))-1)
|
||||
getObjectOutput, getObjectErr := s3backend.conn.GetObject(&s3.GetObjectInput{
|
||||
Bucket: &s3backend.bucket,
|
||||
Key: &s3backend.key,
|
||||
Range: &bytesRange,
|
||||
})
|
||||
|
||||
if getObjectErr != nil {
|
||||
return 0, fmt.Errorf("bucket %s GetObject %s: %v", s3backend.bucket, s3backend.key, getObjectErr)
|
||||
}
|
||||
defer getObjectOutput.Body.Close()
|
||||
|
||||
return getObjectOutput.Body.Read(p)
|
||||
|
||||
func (factory *S3BackendFactory) StorageType() backend.StorageType {
|
||||
return backend.StorageType("s3")
|
||||
}
|
||||
func (factory *S3BackendFactory) BuildStorage(configuration backend.StringProperties, id string) (backend.BackendStorage, error) {
|
||||
return newS3BackendStorage(configuration, id)
|
||||
}
|
||||
|
||||
func (s3backend S3Backend) WriteAt(p []byte, off int64) (n int, err error) {
|
||||
panic("implement me")
|
||||
type S3BackendStorage struct {
|
||||
id string
|
||||
aws_access_key_id string
|
||||
aws_secret_access_key string
|
||||
region string
|
||||
bucket string
|
||||
conn s3iface.S3API
|
||||
}
|
||||
|
||||
func (s3backend S3Backend) Truncate(off int64) error {
|
||||
panic("implement me")
|
||||
func newS3BackendStorage(configuration backend.StringProperties, id string) (s *S3BackendStorage, err error) {
|
||||
s = &S3BackendStorage{}
|
||||
s.id = id
|
||||
s.aws_access_key_id = configuration.GetString("aws_access_key_id")
|
||||
s.aws_secret_access_key = configuration.GetString("aws_secret_access_key")
|
||||
s.region = configuration.GetString("region")
|
||||
s.bucket = configuration.GetString("bucket")
|
||||
s.conn, err = createSession(s.aws_access_key_id, s.aws_secret_access_key, s.region)
|
||||
|
||||
glog.V(0).Infof("created backend storage s3.%s for region %s bucket %s", s.id, s.region, s.bucket)
|
||||
return
|
||||
}
|
||||
|
||||
func (s3backend S3Backend) Close() error {
|
||||
return nil
|
||||
func (s *S3BackendStorage) ToProperties() map[string]string {
|
||||
m := make(map[string]string)
|
||||
m["aws_access_key_id"] = s.aws_access_key_id
|
||||
m["aws_secret_access_key"] = s.aws_secret_access_key
|
||||
m["region"] = s.region
|
||||
m["bucket"] = s.bucket
|
||||
return m
|
||||
}
|
||||
|
||||
func (s3backend S3Backend) GetStat() (datSize int64, modTime time.Time, err error) {
|
||||
|
||||
headObjectOutput, headObjectErr := s3backend.conn.HeadObject(&s3.HeadObjectInput{
|
||||
Bucket: &s3backend.bucket,
|
||||
Key: &s3backend.key,
|
||||
})
|
||||
|
||||
if headObjectErr != nil {
|
||||
return 0, time.Now(), fmt.Errorf("bucket %s HeadObject %s: %v", s3backend.bucket, s3backend.key, headObjectErr)
|
||||
func (s *S3BackendStorage) NewStorageFile(key string, tierInfo *volume_server_pb.VolumeTierInfo) backend.BackendStorageFile {
|
||||
if strings.HasPrefix(key, "/") {
|
||||
key = key[1:]
|
||||
}
|
||||
|
||||
datSize = int64(*headObjectOutput.ContentLength)
|
||||
modTime = *headObjectOutput.LastModified
|
||||
f := &S3BackendStorageFile{
|
||||
backendStorage: s,
|
||||
key: key,
|
||||
tierInfo: tierInfo,
|
||||
}
|
||||
|
||||
return f
|
||||
}
|
||||
|
||||
func (s *S3BackendStorage) CopyFile(f *os.File, fn func(progressed int64, percentage float32) error) (key string, size int64, err error) {
|
||||
randomUuid, _ := uuid.NewRandom()
|
||||
key = randomUuid.String()
|
||||
|
||||
glog.V(1).Infof("copying dat file of %s to remote s3.%s as %s", f.Name(), s.id, key)
|
||||
|
||||
size, err = uploadToS3(s.conn, f.Name(), s.bucket, key, fn)
|
||||
|
||||
return
|
||||
}
|
||||
|
||||
func (s3backend S3Backend) String() string {
|
||||
return fmt.Sprintf("%s/%s", s3backend.bucket, s3backend.key)
|
||||
type S3BackendStorageFile struct {
|
||||
backendStorage *S3BackendStorage
|
||||
key string
|
||||
tierInfo *volume_server_pb.VolumeTierInfo
|
||||
}
|
||||
|
||||
func (s3backend *S3Backend) GetName() string {
|
||||
return "s3"
|
||||
}
|
||||
func (s3backendStorageFile S3BackendStorageFile) ReadAt(p []byte, off int64) (n int, err error) {
|
||||
|
||||
func (s3backend *S3Backend) GetSinkToDirectory() string {
|
||||
return s3backend.dir
|
||||
}
|
||||
bytesRange := fmt.Sprintf("bytes=%d-%d", off, off+int64(len(p))-1)
|
||||
|
||||
func (s3backend *S3Backend) Initialize(configuration util.Configuration, vid needle.VolumeId) error {
|
||||
glog.V(0).Infof("storage.backend.s3.region: %v", configuration.GetString("region"))
|
||||
glog.V(0).Infof("storage.backend.s3.bucket: %v", configuration.GetString("bucket"))
|
||||
glog.V(0).Infof("storage.backend.s3.directory: %v", configuration.GetString("directory"))
|
||||
// glog.V(0).Infof("read %s %s", s3backendStorageFile.key, bytesRange)
|
||||
|
||||
return s3backend.initialize(
|
||||
configuration.GetString("aws_access_key_id"),
|
||||
configuration.GetString("aws_secret_access_key"),
|
||||
configuration.GetString("region"),
|
||||
configuration.GetString("bucket"),
|
||||
configuration.GetString("directory"),
|
||||
vid,
|
||||
)
|
||||
}
|
||||
getObjectOutput, getObjectErr := s3backendStorageFile.backendStorage.conn.GetObject(&s3.GetObjectInput{
|
||||
Bucket: &s3backendStorageFile.backendStorage.bucket,
|
||||
Key: &s3backendStorageFile.key,
|
||||
Range: &bytesRange,
|
||||
})
|
||||
|
||||
func (s3backend *S3Backend) initialize(awsAccessKeyId, awsSecretAccessKey, region, bucket, dir string,
|
||||
vid needle.VolumeId) (err error) {
|
||||
s3backend.region = region
|
||||
s3backend.bucket = bucket
|
||||
s3backend.dir = dir
|
||||
s3backend.conn, err = createSession(awsAccessKeyId, awsSecretAccessKey, region)
|
||||
if getObjectErr != nil {
|
||||
return 0, fmt.Errorf("bucket %s GetObject %s: %v", s3backendStorageFile.backendStorage.bucket, s3backendStorageFile.key, getObjectErr)
|
||||
}
|
||||
defer getObjectOutput.Body.Close()
|
||||
|
||||
s3backend.vid = vid
|
||||
s3backend.key = fmt.Sprintf("%s/%d.dat", dir, vid)
|
||||
if strings.HasPrefix(s3backend.key, "/") {
|
||||
s3backend.key = s3backend.key[1:]
|
||||
glog.V(4).Infof("read %s %s", s3backendStorageFile.key, bytesRange)
|
||||
glog.V(4).Infof("content range: %s, contentLength: %d", *getObjectOutput.ContentRange, *getObjectOutput.ContentLength)
|
||||
|
||||
for {
|
||||
if n, err = getObjectOutput.Body.Read(p); err == nil && n < len(p) {
|
||||
p = p[n:]
|
||||
} else {
|
||||
break
|
||||
}
|
||||
}
|
||||
|
||||
return err
|
||||
if err == io.EOF {
|
||||
err = nil
|
||||
}
|
||||
|
||||
return
|
||||
}
|
||||
|
||||
func (s3backendStorageFile S3BackendStorageFile) WriteAt(p []byte, off int64) (n int, err error) {
|
||||
panic("not implemented")
|
||||
}
|
||||
|
||||
func (s3backendStorageFile S3BackendStorageFile) Truncate(off int64) error {
|
||||
panic("not implemented")
|
||||
}
|
||||
|
||||
func (s3backendStorageFile S3BackendStorageFile) Close() error {
|
||||
return nil
|
||||
}
|
||||
|
||||
func (s3backendStorageFile S3BackendStorageFile) GetStat() (datSize int64, modTime time.Time, err error) {
|
||||
|
||||
files := s3backendStorageFile.tierInfo.GetFiles()
|
||||
|
||||
if len(files) == 0 {
|
||||
err = fmt.Errorf("remote file info not found")
|
||||
return
|
||||
}
|
||||
|
||||
datSize = int64(files[0].FileSize)
|
||||
modTime = time.Unix(int64(files[0].ModifiedTime), 0)
|
||||
|
||||
return
|
||||
}
|
||||
|
||||
func (s3backendStorageFile S3BackendStorageFile) Name() string {
|
||||
return s3backendStorageFile.key
|
||||
}
|
||||
@@ -0,0 +1,102 @@
|
||||
package s3_backend
|
||||
|
||||
import (
|
||||
"fmt"
|
||||
"os"
|
||||
"sync/atomic"
|
||||
|
||||
"github.com/aws/aws-sdk-go/aws"
|
||||
"github.com/aws/aws-sdk-go/service/s3/s3iface"
|
||||
"github.com/aws/aws-sdk-go/service/s3/s3manager"
|
||||
"github.com/chrislusf/seaweedfs/weed/glog"
|
||||
)
|
||||
|
||||
func uploadToS3(sess s3iface.S3API, filename string, destBucket string, destKey string,
|
||||
fn func(progressed int64, percentage float32) error) (fileSize int64, err error) {
|
||||
|
||||
//open the file
|
||||
f, err := os.Open(filename)
|
||||
if err != nil {
|
||||
return 0, fmt.Errorf("failed to open file %q, %v", filename, err)
|
||||
}
|
||||
defer f.Close()
|
||||
|
||||
info, err := f.Stat()
|
||||
if err != nil {
|
||||
return 0, fmt.Errorf("failed to stat file %q, %v", filename, err)
|
||||
}
|
||||
|
||||
fileSize = info.Size()
|
||||
|
||||
partSize := int64(64 * 1024 * 1024) // The minimum/default allowed part size is 5MB
|
||||
for partSize*1000 < fileSize {
|
||||
partSize *= 4
|
||||
}
|
||||
|
||||
// Create an uploader with the session and custom options
|
||||
uploader := s3manager.NewUploaderWithClient(sess, func(u *s3manager.Uploader) {
|
||||
u.PartSize = partSize
|
||||
u.Concurrency = 5
|
||||
})
|
||||
|
||||
fileReader := &s3UploadProgressedReader{
|
||||
fp: f,
|
||||
size: fileSize,
|
||||
read: -fileSize,
|
||||
fn: fn,
|
||||
}
|
||||
|
||||
// Upload the file to S3.
|
||||
var result *s3manager.UploadOutput
|
||||
result, err = uploader.Upload(&s3manager.UploadInput{
|
||||
Bucket: aws.String(destBucket),
|
||||
Key: aws.String(destKey),
|
||||
Body: fileReader,
|
||||
ACL: aws.String("private"),
|
||||
ServerSideEncryption: aws.String("AES256"),
|
||||
StorageClass: aws.String("STANDARD_IA"),
|
||||
})
|
||||
|
||||
//in case it fails to upload
|
||||
if err != nil {
|
||||
return 0, fmt.Errorf("failed to upload file %s: %v", filename, err)
|
||||
}
|
||||
glog.V(1).Infof("file %s uploaded to %s\n", filename, result.Location)
|
||||
|
||||
return
|
||||
}
|
||||
|
||||
// adapted from https://github.com/aws/aws-sdk-go/pull/1868
|
||||
type s3UploadProgressedReader struct {
|
||||
fp *os.File
|
||||
size int64
|
||||
read int64
|
||||
fn func(progressed int64, percentage float32) error
|
||||
}
|
||||
|
||||
func (r *s3UploadProgressedReader) Read(p []byte) (int, error) {
|
||||
return r.fp.Read(p)
|
||||
}
|
||||
|
||||
func (r *s3UploadProgressedReader) ReadAt(p []byte, off int64) (int, error) {
|
||||
n, err := r.fp.ReadAt(p, off)
|
||||
if err != nil {
|
||||
return n, err
|
||||
}
|
||||
|
||||
// Got the length have read( or means has uploaded), and you can construct your message
|
||||
atomic.AddInt64(&r.read, int64(n))
|
||||
|
||||
if r.fn != nil {
|
||||
read := r.read
|
||||
if err := r.fn(read, float32(read*100)/float32(r.size)); err != nil {
|
||||
return n, err
|
||||
}
|
||||
}
|
||||
|
||||
return n, err
|
||||
}
|
||||
|
||||
func (r *s3UploadProgressedReader) Seek(offset int64, whence int) (int64, error) {
|
||||
return r.fp.Seek(offset, whence)
|
||||
}
|
||||
@@ -17,7 +17,7 @@ type DiskLocation struct {
|
||||
Directory string
|
||||
MaxVolumeCount int
|
||||
volumes map[needle.VolumeId]*Volume
|
||||
sync.RWMutex
|
||||
volumesLock sync.RWMutex
|
||||
|
||||
// erasure coding
|
||||
ecVolumes map[needle.VolumeId]*erasure_coding.EcVolume
|
||||
@@ -33,8 +33,8 @@ func NewDiskLocation(dir string, maxVolumeCount int) *DiskLocation {
|
||||
|
||||
func (l *DiskLocation) volumeIdFromPath(dir os.FileInfo) (needle.VolumeId, string, error) {
|
||||
name := dir.Name()
|
||||
if !dir.IsDir() && strings.HasSuffix(name, ".dat") {
|
||||
base := name[:len(name)-len(".dat")]
|
||||
if !dir.IsDir() && strings.HasSuffix(name, ".idx") {
|
||||
base := name[:len(name)-len(".idx")]
|
||||
collection, volumeId, err := parseCollectionVolumeId(base)
|
||||
return volumeId, collection, err
|
||||
}
|
||||
@@ -53,17 +53,17 @@ func parseCollectionVolumeId(base string) (collection string, vid needle.VolumeI
|
||||
|
||||
func (l *DiskLocation) loadExistingVolume(fileInfo os.FileInfo, needleMapKind NeedleMapType) {
|
||||
name := fileInfo.Name()
|
||||
if !fileInfo.IsDir() && strings.HasSuffix(name, ".dat") {
|
||||
if !fileInfo.IsDir() && strings.HasSuffix(name, ".idx") {
|
||||
vid, collection, err := l.volumeIdFromPath(fileInfo)
|
||||
if err == nil {
|
||||
l.RLock()
|
||||
l.volumesLock.RLock()
|
||||
_, found := l.volumes[vid]
|
||||
l.RUnlock()
|
||||
l.volumesLock.RUnlock()
|
||||
if !found {
|
||||
if v, e := NewVolume(l.Directory, collection, vid, needleMapKind, nil, nil, 0, 0); e == nil {
|
||||
l.Lock()
|
||||
l.volumesLock.Lock()
|
||||
l.volumes[vid] = v
|
||||
l.Unlock()
|
||||
l.volumesLock.Unlock()
|
||||
size, _, _ := v.FileStat()
|
||||
glog.V(0).Infof("data file %s, replicaPlacement=%s v=%d size=%d ttl=%s",
|
||||
l.Directory+"/"+name, v.ReplicaPlacement, v.Version(), size, v.Ttl.String())
|
||||
@@ -115,17 +115,17 @@ func (l *DiskLocation) loadExistingVolumes(needleMapKind NeedleMapType) {
|
||||
|
||||
func (l *DiskLocation) DeleteCollectionFromDiskLocation(collection string) (e error) {
|
||||
|
||||
l.Lock()
|
||||
l.volumesLock.Lock()
|
||||
for k, v := range l.volumes {
|
||||
if v.Collection == collection {
|
||||
e = l.deleteVolumeById(k)
|
||||
if e != nil {
|
||||
l.Unlock()
|
||||
l.volumesLock.Unlock()
|
||||
return
|
||||
}
|
||||
}
|
||||
}
|
||||
l.Unlock()
|
||||
l.volumesLock.Unlock()
|
||||
|
||||
l.ecVolumesLock.Lock()
|
||||
for k, v := range l.ecVolumes {
|
||||
@@ -170,8 +170,8 @@ func (l *DiskLocation) LoadVolume(vid needle.VolumeId, needleMapKind NeedleMapTy
|
||||
}
|
||||
|
||||
func (l *DiskLocation) DeleteVolume(vid needle.VolumeId) error {
|
||||
l.Lock()
|
||||
defer l.Unlock()
|
||||
l.volumesLock.Lock()
|
||||
defer l.volumesLock.Unlock()
|
||||
|
||||
_, ok := l.volumes[vid]
|
||||
if !ok {
|
||||
@@ -181,8 +181,8 @@ func (l *DiskLocation) DeleteVolume(vid needle.VolumeId) error {
|
||||
}
|
||||
|
||||
func (l *DiskLocation) UnloadVolume(vid needle.VolumeId) error {
|
||||
l.Lock()
|
||||
defer l.Unlock()
|
||||
l.volumesLock.Lock()
|
||||
defer l.volumesLock.Unlock()
|
||||
|
||||
v, ok := l.volumes[vid]
|
||||
if !ok {
|
||||
@@ -194,33 +194,33 @@ func (l *DiskLocation) UnloadVolume(vid needle.VolumeId) error {
|
||||
}
|
||||
|
||||
func (l *DiskLocation) SetVolume(vid needle.VolumeId, volume *Volume) {
|
||||
l.Lock()
|
||||
defer l.Unlock()
|
||||
l.volumesLock.Lock()
|
||||
defer l.volumesLock.Unlock()
|
||||
|
||||
l.volumes[vid] = volume
|
||||
}
|
||||
|
||||
func (l *DiskLocation) FindVolume(vid needle.VolumeId) (*Volume, bool) {
|
||||
l.RLock()
|
||||
defer l.RUnlock()
|
||||
l.volumesLock.RLock()
|
||||
defer l.volumesLock.RUnlock()
|
||||
|
||||
v, ok := l.volumes[vid]
|
||||
return v, ok
|
||||
}
|
||||
|
||||
func (l *DiskLocation) VolumesLen() int {
|
||||
l.RLock()
|
||||
defer l.RUnlock()
|
||||
l.volumesLock.RLock()
|
||||
defer l.volumesLock.RUnlock()
|
||||
|
||||
return len(l.volumes)
|
||||
}
|
||||
|
||||
func (l *DiskLocation) Close() {
|
||||
l.Lock()
|
||||
l.volumesLock.Lock()
|
||||
for _, v := range l.volumes {
|
||||
v.Close()
|
||||
}
|
||||
l.Unlock()
|
||||
l.volumesLock.Unlock()
|
||||
|
||||
l.ecVolumesLock.Lock()
|
||||
for _, ecVolume := range l.ecVolumes {
|
||||
|
||||
@@ -125,13 +125,13 @@ func (n *Needle) prepareWriteBuffer(version Version) ([]byte, uint32, int64, err
|
||||
return writeBytes, 0, 0, fmt.Errorf("Unsupported Version! (%d)", version)
|
||||
}
|
||||
|
||||
func (n *Needle) Append(w backend.DataStorageBackend, version Version) (offset uint64, size uint32, actualSize int64, err error) {
|
||||
func (n *Needle) Append(w backend.BackendStorageFile, version Version) (offset uint64, size uint32, actualSize int64, err error) {
|
||||
|
||||
if end, _, e := w.GetStat(); e == nil {
|
||||
defer func(w backend.DataStorageBackend, off int64) {
|
||||
defer func(w backend.BackendStorageFile, off int64) {
|
||||
if err != nil {
|
||||
if te := w.Truncate(end); te != nil {
|
||||
glog.V(0).Infof("Failed to truncate %s back to %d with error: %v", w.String(), end, te)
|
||||
glog.V(0).Infof("Failed to truncate %s back to %d with error: %v", w.Name(), end, te)
|
||||
}
|
||||
}
|
||||
}(w, end)
|
||||
@@ -150,7 +150,7 @@ func (n *Needle) Append(w backend.DataStorageBackend, version Version) (offset u
|
||||
return offset, size, actualSize, err
|
||||
}
|
||||
|
||||
func ReadNeedleBlob(r backend.DataStorageBackend, offset int64, size uint32, version Version) (dataSlice []byte, err error) {
|
||||
func ReadNeedleBlob(r backend.BackendStorageFile, offset int64, size uint32, version Version) (dataSlice []byte, err error) {
|
||||
|
||||
dataSize := GetActualSize(size, version)
|
||||
dataSlice = make([]byte, int(dataSize))
|
||||
@@ -191,7 +191,7 @@ func (n *Needle) ReadBytes(bytes []byte, offset int64, size uint32, version Vers
|
||||
}
|
||||
|
||||
// ReadData hydrates the needle from the file, with only n.Id is set.
|
||||
func (n *Needle) ReadData(r backend.DataStorageBackend, offset int64, size uint32, version Version) (err error) {
|
||||
func (n *Needle) ReadData(r backend.BackendStorageFile, offset int64, size uint32, version Version) (err error) {
|
||||
bytes, err := ReadNeedleBlob(r, offset, size, version)
|
||||
if err != nil {
|
||||
return err
|
||||
@@ -266,7 +266,7 @@ func (n *Needle) readNeedleDataVersion2(bytes []byte) (err error) {
|
||||
return nil
|
||||
}
|
||||
|
||||
func ReadNeedleHeader(r backend.DataStorageBackend, version Version, offset int64) (n *Needle, bytes []byte, bodyLength int64, err error) {
|
||||
func ReadNeedleHeader(r backend.BackendStorageFile, version Version, offset int64) (n *Needle, bytes []byte, bodyLength int64, err error) {
|
||||
n = new(Needle)
|
||||
if version == Version1 || version == Version2 || version == Version3 {
|
||||
bytes = make([]byte, NeedleHeaderSize)
|
||||
@@ -301,7 +301,7 @@ func NeedleBodyLength(needleSize uint32, version Version) int64 {
|
||||
|
||||
//n should be a needle already read the header
|
||||
//the input stream will read until next file entry
|
||||
func (n *Needle) ReadNeedleBody(r backend.DataStorageBackend, version Version, offset int64, bodyLength int64) (bytes []byte, err error) {
|
||||
func (n *Needle) ReadNeedleBody(r backend.BackendStorageFile, version Version, offset int64, bodyLength int64) (bytes []byte, err error) {
|
||||
|
||||
if bodyLength <= 0 {
|
||||
return nil, nil
|
||||
|
||||
@@ -126,10 +126,10 @@ func (s *Store) addVolume(vid needle.VolumeId, collection string, needleMapKind
|
||||
return fmt.Errorf("No more free space left")
|
||||
}
|
||||
|
||||
func (s *Store) Status() []*VolumeInfo {
|
||||
func (s *Store) VolumeInfos() []*VolumeInfo {
|
||||
var stats []*VolumeInfo
|
||||
for _, location := range s.Locations {
|
||||
location.RLock()
|
||||
location.volumesLock.RLock()
|
||||
for k, v := range location.volumes {
|
||||
s := &VolumeInfo{
|
||||
Id: needle.VolumeId(k),
|
||||
@@ -144,9 +144,10 @@ func (s *Store) Status() []*VolumeInfo {
|
||||
Ttl: v.Ttl,
|
||||
CompactRevision: uint32(v.CompactionRevision),
|
||||
}
|
||||
s.RemoteStorageName, s.RemoteStorageKey = v.RemoteStorageNameKey()
|
||||
stats = append(stats, s)
|
||||
}
|
||||
location.RUnlock()
|
||||
location.volumesLock.RUnlock()
|
||||
}
|
||||
sortVolumeInfos(stats)
|
||||
return stats
|
||||
@@ -167,7 +168,7 @@ func (s *Store) CollectHeartbeat() *master_pb.Heartbeat {
|
||||
for _, location := range s.Locations {
|
||||
var deleteVids []needle.VolumeId
|
||||
maxVolumeCount = maxVolumeCount + location.MaxVolumeCount
|
||||
location.RLock()
|
||||
location.volumesLock.RLock()
|
||||
for _, v := range location.volumes {
|
||||
if maxFileKey < v.MaxFileKey() {
|
||||
maxFileKey = v.MaxFileKey()
|
||||
@@ -184,16 +185,16 @@ func (s *Store) CollectHeartbeat() *master_pb.Heartbeat {
|
||||
fileSize, _, _ := v.FileStat()
|
||||
collectionVolumeSize[v.Collection] += fileSize
|
||||
}
|
||||
location.RUnlock()
|
||||
location.volumesLock.RUnlock()
|
||||
|
||||
if len(deleteVids) > 0 {
|
||||
// delete expired volumes.
|
||||
location.Lock()
|
||||
location.volumesLock.Lock()
|
||||
for _, vid := range deleteVids {
|
||||
location.deleteVolumeById(vid)
|
||||
glog.V(0).Infoln("volume", vid, "is deleted.")
|
||||
}
|
||||
location.Unlock()
|
||||
location.volumesLock.Unlock()
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
@@ -120,8 +120,13 @@ func (s *Store) ReadEcShardNeedle(ctx context.Context, vid needle.VolumeId, n *n
|
||||
if localEcVolume, found := location.FindEcVolume(vid); found {
|
||||
|
||||
// read the volume version
|
||||
readCounter := 0
|
||||
for localEcVolume.Version == 0 {
|
||||
err := s.readEcVolumeVersion(ctx, vid, localEcVolume)
|
||||
readCounter++
|
||||
if readCounter > 10 && err != nil {
|
||||
return 0, fmt.Errorf("fail to read ec volume %d: %v", vid, err)
|
||||
}
|
||||
time.Sleep(1357 * time.Millisecond)
|
||||
glog.V(0).Infof("ReadEcShardNeedle vid %d version:%v: %v", vid, localEcVolume.Version, err)
|
||||
}
|
||||
|
||||
+32
-18
@@ -4,6 +4,7 @@ import (
|
||||
"fmt"
|
||||
|
||||
"github.com/chrislusf/seaweedfs/weed/pb/master_pb"
|
||||
"github.com/chrislusf/seaweedfs/weed/pb/volume_server_pb"
|
||||
"github.com/chrislusf/seaweedfs/weed/stats"
|
||||
"github.com/chrislusf/seaweedfs/weed/storage/backend"
|
||||
"github.com/chrislusf/seaweedfs/weed/storage/needle"
|
||||
@@ -21,7 +22,7 @@ type Volume struct {
|
||||
Id needle.VolumeId
|
||||
dir string
|
||||
Collection string
|
||||
DataBackend backend.DataStorageBackend
|
||||
DataBackend backend.BackendStorageFile
|
||||
nm NeedleMapper
|
||||
needleMapKind NeedleMapType
|
||||
readOnly bool
|
||||
@@ -29,7 +30,7 @@ type Volume struct {
|
||||
|
||||
SuperBlock
|
||||
|
||||
dataFileAccessLock sync.Mutex
|
||||
dataFileAccessLock sync.RWMutex
|
||||
lastModifiedTsSeconds uint64 //unix time in seconds
|
||||
lastAppendAtNs uint64 //unix time in nanoseconds
|
||||
|
||||
@@ -37,6 +38,8 @@ type Volume struct {
|
||||
lastCompactRevision uint16
|
||||
|
||||
isCompacting bool
|
||||
|
||||
volumeTierInfo *volume_server_pb.VolumeTierInfo
|
||||
}
|
||||
|
||||
func NewVolume(dirname string, collection string, id needle.VolumeId, needleMapKind NeedleMapType, replicaPlacement *ReplicaPlacement, ttl *needle.TTL, preallocate int64, memoryMapMaxSizeMb uint32) (v *Volume, e error) {
|
||||
@@ -69,8 +72,8 @@ func (v *Volume) Version() needle.Version {
|
||||
}
|
||||
|
||||
func (v *Volume) FileStat() (datSize uint64, idxSize uint64, modTime time.Time) {
|
||||
v.dataFileAccessLock.Lock()
|
||||
defer v.dataFileAccessLock.Unlock()
|
||||
v.dataFileAccessLock.RLock()
|
||||
defer v.dataFileAccessLock.RUnlock()
|
||||
|
||||
if v.DataBackend == nil {
|
||||
return
|
||||
@@ -80,13 +83,13 @@ func (v *Volume) FileStat() (datSize uint64, idxSize uint64, modTime time.Time)
|
||||
if e == nil {
|
||||
return uint64(datFileSize), v.nm.IndexFileSize(), modTime
|
||||
}
|
||||
glog.V(0).Infof("Failed to read file size %s %v", v.DataBackend.String(), e)
|
||||
glog.V(0).Infof("Failed to read file size %s %v", v.DataBackend.Name(), e)
|
||||
return // -1 causes integer overflow and the volume to become unwritable.
|
||||
}
|
||||
|
||||
func (v *Volume) ContentSize() uint64 {
|
||||
v.dataFileAccessLock.Lock()
|
||||
defer v.dataFileAccessLock.Unlock()
|
||||
v.dataFileAccessLock.RLock()
|
||||
defer v.dataFileAccessLock.RUnlock()
|
||||
if v.nm == nil {
|
||||
return 0
|
||||
}
|
||||
@@ -94,8 +97,8 @@ func (v *Volume) ContentSize() uint64 {
|
||||
}
|
||||
|
||||
func (v *Volume) DeletedSize() uint64 {
|
||||
v.dataFileAccessLock.Lock()
|
||||
defer v.dataFileAccessLock.Unlock()
|
||||
v.dataFileAccessLock.RLock()
|
||||
defer v.dataFileAccessLock.RUnlock()
|
||||
if v.nm == nil {
|
||||
return 0
|
||||
}
|
||||
@@ -103,8 +106,8 @@ func (v *Volume) DeletedSize() uint64 {
|
||||
}
|
||||
|
||||
func (v *Volume) FileCount() uint64 {
|
||||
v.dataFileAccessLock.Lock()
|
||||
defer v.dataFileAccessLock.Unlock()
|
||||
v.dataFileAccessLock.RLock()
|
||||
defer v.dataFileAccessLock.RUnlock()
|
||||
if v.nm == nil {
|
||||
return 0
|
||||
}
|
||||
@@ -112,8 +115,8 @@ func (v *Volume) FileCount() uint64 {
|
||||
}
|
||||
|
||||
func (v *Volume) DeletedCount() uint64 {
|
||||
v.dataFileAccessLock.Lock()
|
||||
defer v.dataFileAccessLock.Unlock()
|
||||
v.dataFileAccessLock.RLock()
|
||||
defer v.dataFileAccessLock.RUnlock()
|
||||
if v.nm == nil {
|
||||
return 0
|
||||
}
|
||||
@@ -121,8 +124,8 @@ func (v *Volume) DeletedCount() uint64 {
|
||||
}
|
||||
|
||||
func (v *Volume) MaxFileKey() types.NeedleId {
|
||||
v.dataFileAccessLock.Lock()
|
||||
defer v.dataFileAccessLock.Unlock()
|
||||
v.dataFileAccessLock.RLock()
|
||||
defer v.dataFileAccessLock.RUnlock()
|
||||
if v.nm == nil {
|
||||
return 0
|
||||
}
|
||||
@@ -130,8 +133,8 @@ func (v *Volume) MaxFileKey() types.NeedleId {
|
||||
}
|
||||
|
||||
func (v *Volume) IndexFileSize() uint64 {
|
||||
v.dataFileAccessLock.Lock()
|
||||
defer v.dataFileAccessLock.Unlock()
|
||||
v.dataFileAccessLock.RLock()
|
||||
defer v.dataFileAccessLock.RUnlock()
|
||||
if v.nm == nil {
|
||||
return 0
|
||||
}
|
||||
@@ -200,7 +203,7 @@ func (v *Volume) expiredLongEnough(maxDelayMinutes uint32) bool {
|
||||
func (v *Volume) ToVolumeInformationMessage() *master_pb.VolumeInformationMessage {
|
||||
size, _, modTime := v.FileStat()
|
||||
|
||||
return &master_pb.VolumeInformationMessage{
|
||||
volumInfo := &master_pb.VolumeInformationMessage{
|
||||
Id: uint32(v.Id),
|
||||
Size: size,
|
||||
Collection: v.Collection,
|
||||
@@ -214,4 +217,15 @@ func (v *Volume) ToVolumeInformationMessage() *master_pb.VolumeInformationMessag
|
||||
CompactRevision: uint32(v.SuperBlock.CompactionRevision),
|
||||
ModifiedAtSecond: modTime.Unix(),
|
||||
}
|
||||
|
||||
volumInfo.RemoteStorageName, volumInfo.RemoteStorageKey = v.RemoteStorageNameKey()
|
||||
|
||||
return volumInfo
|
||||
}
|
||||
|
||||
func (v *Volume) RemoteStorageNameKey() (storageName, storageKey string) {
|
||||
if len(v.volumeTierInfo.GetFiles()) == 0 {
|
||||
return
|
||||
}
|
||||
return v.volumeTierInfo.GetFiles()[0].BackendName(), v.volumeTierInfo.GetFiles()[0].GetKey()
|
||||
}
|
||||
@@ -15,8 +15,8 @@ import (
|
||||
)
|
||||
|
||||
func (v *Volume) GetVolumeSyncStatus() *volume_server_pb.VolumeSyncStatusResponse {
|
||||
v.dataFileAccessLock.Lock()
|
||||
defer v.dataFileAccessLock.Unlock()
|
||||
v.dataFileAccessLock.RLock()
|
||||
defer v.dataFileAccessLock.RUnlock()
|
||||
|
||||
var syncStatus = &volume_server_pb.VolumeSyncStatusResponse{}
|
||||
if datSize, _, err := v.DataBackend.GetStat(); err == nil {
|
||||
|
||||
@@ -55,7 +55,7 @@ func readIndexEntryAtOffset(indexFile *os.File, offset int64) (bytes []byte, err
|
||||
return
|
||||
}
|
||||
|
||||
func verifyNeedleIntegrity(datFile backend.DataStorageBackend, v needle.Version, offset int64, key NeedleId, size uint32) (lastAppendAtNs uint64, err error) {
|
||||
func verifyNeedleIntegrity(datFile backend.BackendStorageFile, v needle.Version, offset int64, key NeedleId, size uint32) (lastAppendAtNs uint64, err error) {
|
||||
n := new(needle.Needle)
|
||||
if err = n.ReadData(datFile, offset, size, v); err != nil {
|
||||
return n.AppendAtNs, err
|
||||
|
||||
@@ -9,7 +9,7 @@ import (
|
||||
"github.com/chrislusf/seaweedfs/weed/storage/backend"
|
||||
)
|
||||
|
||||
func createVolumeFile(fileName string, preallocate int64, memoryMapSizeMB uint32) (backend.DataStorageBackend, error) {
|
||||
func createVolumeFile(fileName string, preallocate int64, memoryMapSizeMB uint32) (backend.BackendStorageFile, error) {
|
||||
file, e := os.OpenFile(fileName, os.O_RDWR|os.O_CREATE|os.O_TRUNC, 0644)
|
||||
if preallocate > 0 {
|
||||
glog.V(0).Infof("Preallocated disk space for %s is not supported", fileName)
|
||||
|
||||
@@ -10,7 +10,7 @@ import (
|
||||
"github.com/chrislusf/seaweedfs/weed/storage/backend"
|
||||
)
|
||||
|
||||
func createVolumeFile(fileName string, preallocate int64, memoryMapSizeMB uint32) (backend.DataStorageBackend, error) {
|
||||
func createVolumeFile(fileName string, preallocate int64, memoryMapSizeMB uint32) (backend.BackendStorageFile, error) {
|
||||
file, e := os.OpenFile(fileName, os.O_RDWR|os.O_CREATE|os.O_TRUNC, 0644)
|
||||
if preallocate != 0 {
|
||||
syscall.Fallocate(int(file.Fd()), 1, 0, preallocate)
|
||||
|
||||
Loaded 100 of 120 files, more files were not shown because too many files have changed in this diff.
Show more
Reference in new issue
Block a user