mirror of
https://github.com/seaweedfs/seaweedfs.git
synced 2026-11-25 05:37:12 +01:00
Compare commits
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
11b33c0760 | ||
|
|
ac48c899e8 | ||
|
|
0c856e8387 | ||
|
|
2bfd810912 | ||
|
|
85aeead3d2 | ||
|
|
8005786d9a | ||
|
|
75179544c3 | ||
|
|
91b91d6cb7 | ||
|
|
d3925d086c | ||
|
|
e0e31e67a8 | ||
|
|
081ee6fe34 | ||
|
|
bff09fb74f | ||
|
|
f5684839a2 | ||
|
|
3a57aef7a9 | ||
|
|
95ca9dd8a2 | ||
|
|
f11233cd49 | ||
|
|
1ea9bc66d9 | ||
|
|
85b53ac510 | ||
|
|
759cda0fe2 | ||
|
|
b0de01ff3b | ||
|
|
7aafb9e3f8 | ||
|
|
e02a8c67da | ||
|
|
b4e02ec525 | ||
|
|
725f8d35dd | ||
|
|
f8aed8a7f5 | ||
|
|
09aef55839 | ||
|
|
10d12c676e | ||
|
|
e02053375a | ||
|
|
e495d5b6e5 | ||
|
|
d4db0db220 | ||
|
|
3fbf635308 | ||
|
|
3a5e4769cf | ||
|
|
ca4017dd87 | ||
|
|
25257acd51 | ||
|
|
a7959c1c48 | ||
|
|
2f243f5b0b | ||
|
|
4b7fa31468 | ||
|
|
d5a8297a1c | ||
|
|
d58371c5cd | ||
|
|
015dd3a147 | ||
|
|
39e72fb23c | ||
|
|
6bf3eb69cb | ||
|
|
78afb8bf46 | ||
|
|
d693e77418 | ||
|
|
07d7abe428 | ||
|
|
dfccc3c263 | ||
|
|
20b8f2e5b4 | ||
|
|
b161baa3f0 | ||
|
|
a8bc8eb351 | ||
|
|
73087f59b1 | ||
|
|
be1d9f324f | ||
|
|
0952eb2854 | ||
|
|
5568395edd | ||
|
|
3703c7e176 | ||
|
|
1e3e4b3072 | ||
|
|
afb6a1dbb4 | ||
|
|
9016fa19ba | ||
|
|
f9e8702bb4 | ||
|
|
47234760f4 | ||
|
|
97a504b0bb | ||
|
|
78422c2f69 | ||
|
|
871efa4fc1 | ||
|
|
17d5ac4cd3 | ||
|
|
d819865fe7 | ||
|
|
ea809a45ab | ||
|
|
f9b6178b8f | ||
|
|
8c73410a51 | ||
|
|
4e16a90454 | ||
|
|
a25a8d8822 | ||
|
|
e93588ec78 | ||
|
|
9e72e9e4b8 | ||
|
|
ed3cf811f5 | ||
|
|
7c10602b49 | ||
|
|
f9da859720 | ||
|
|
d57559d3f7 | ||
|
|
5a0986dca0 | ||
|
|
8d42a1263b | ||
|
|
31583b5d6c | ||
|
|
98edec7c3e | ||
|
|
8ed490164e | ||
|
|
66effaed9e | ||
|
|
eab4c9219c | ||
|
|
fb81f12686 | ||
|
|
5c57297bd1 | ||
|
|
47c4a62c5d | ||
|
|
6850d28d6b | ||
|
|
2a7957b4ca | ||
|
|
6190fd665d | ||
|
|
725e47dcc3 | ||
|
|
508ec01ab0 | ||
|
|
f4fcde05b6 | ||
|
|
972f437225 | ||
|
|
b52b8ec685 | ||
|
|
0c2248f83a | ||
|
|
913aa0f14e | ||
|
|
662b5d0cf7 | ||
|
|
73564e6a01 | ||
|
|
bdc337a719 | ||
|
|
57ec7f2ba9 | ||
|
|
eab9701823 | ||
|
|
842e3301ee | ||
|
|
69f336e59f | ||
|
|
ff0a7c1d18 | ||
|
|
30ee4f3291 | ||
|
|
77873b832b | ||
|
|
369aa8a10a | ||
|
|
69eda558ef | ||
|
|
aebe39a803 | ||
|
|
5d0e1d8d74 | ||
|
|
1a34fd0b44 |
No files matched your search
@@ -8,6 +8,7 @@ assignees: ''
|
||||
---
|
||||
|
||||
Sponsors SeaweedFS via Patreon https://www.patreon.com/seaweedfs
|
||||
Report issues here. Ask questions here https://stackoverflow.com/questions/tagged/seaweedfs
|
||||
|
||||
example of a good issue report:
|
||||
https://github.com/chrislusf/seaweedfs/issues/1005
|
||||
|
||||
@@ -90,7 +90,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)
|
||||
|
||||
On top of the object store, optional [Filer] can 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, TiKV, CockroachDB, etc.
|
||||
On top of the object store, optional [Filer] can support directories and POSIX attributes. Filer is a separate linearly-scalable stateless server with customizable metadata stores, e.g., MySql, Postgres, Mongodb, Redis, Etcd, Cassandra, LevelDB, MemSql, TiDB, TiKV, CockroachDB, etc.
|
||||
|
||||
[Back to TOC](#table-of-contents)
|
||||
|
||||
@@ -100,9 +100,9 @@ On top of the object store, optional [Filer] can support directories and POSIX a
|
||||
* Automatic Gzip compression depending on file mime type.
|
||||
* Automatic compaction to reclaim disk space after deletion or update.
|
||||
* [Automatic entry TTL expiration][VolumeServerTTL].
|
||||
* Servers in the same cluster can have different disk spaces, file systems, OS etc.
|
||||
* Any server with some disk spaces can add to the total storage space.
|
||||
* Adding/Removing servers does **not** cause any data re-balancing.
|
||||
* Optionally fix the orientation for jpeg pictures.
|
||||
* Optional picture resizing.
|
||||
* Support ETag, Accept-Range, Last-Modified, etc.
|
||||
* Support in-memory/leveldb/readonly mode tuning for memory/performance balance.
|
||||
* Support rebalancing the writable and readonly volumes.
|
||||
@@ -361,7 +361,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, MemSql, TiDB, CockroachDB, etc, and is easy to customized.
|
||||
* SeaweedFS Filer metadata store can be any well-known and proven data stores, e.g., Cassandra, Mongodb, 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 |
|
||||
@@ -402,7 +402,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, MemSql, TiDB, CockroachCB, to manage file directories. These stores are proven, scalable, and easier to manage.
|
||||
SeaweedFS Filer uses off-the-shelf stores, such as MySql, Postgres, Mongodb, Redis, Etcd, Cassandra, MemSql, TiDB, CockroachCB, to manage file directories. These stores are proven, scalable, and easier to manage.
|
||||
|
||||
| SeaweedFS | comparable to Ceph | advantage |
|
||||
| ------------- | ------------- | ---------------- |
|
||||
|
||||
@@ -5,15 +5,15 @@ RUN mkdir -p /etc/seaweedfs
|
||||
COPY ./filer.toml /etc/seaweedfs/filer.toml
|
||||
COPY ./entrypoint.sh /entrypoint.sh
|
||||
|
||||
# volume server gprc port
|
||||
# volume server grpc port
|
||||
EXPOSE 18080
|
||||
# volume server http port
|
||||
EXPOSE 8080
|
||||
# filer server gprc port
|
||||
# filer server grpc port
|
||||
EXPOSE 18888
|
||||
# filer server http port
|
||||
EXPOSE 8888
|
||||
# master server shared gprc port
|
||||
# master server shared grpc port
|
||||
EXPOSE 19333
|
||||
# master server shared http port
|
||||
EXPOSE 9333
|
||||
|
||||
@@ -7,8 +7,11 @@ require (
|
||||
github.com/Azure/azure-pipeline-go v0.2.2 // indirect
|
||||
github.com/Azure/azure-storage-blob-go v0.8.0
|
||||
github.com/DataDog/zstd v1.4.1 // indirect
|
||||
github.com/OneOfOne/xxhash v1.2.2
|
||||
github.com/Shopify/sarama v1.23.1
|
||||
github.com/aws/aws-sdk-go v1.23.13
|
||||
github.com/buraksezer/consistent v0.0.0-20191006190839-693edf70fd72
|
||||
github.com/cespare/xxhash v1.1.0
|
||||
github.com/chrislusf/raft v0.0.0-20190225081310-10d6e2182d92
|
||||
github.com/coreos/bbolt v1.3.3 // indirect
|
||||
github.com/coreos/etcd v3.3.15+incompatible // indirect
|
||||
@@ -24,7 +27,6 @@ require (
|
||||
github.com/facebookgo/stats v0.0.0-20151006221625-1b76add642e4
|
||||
github.com/facebookgo/subset v0.0.0-20200203212716-c811ad88dec4 // indirect
|
||||
github.com/frankban/quicktest v1.7.2 // indirect
|
||||
github.com/gabriel-vasile/mimetype v1.0.0
|
||||
github.com/go-redis/redis v6.15.7+incompatible
|
||||
github.com/go-sql-driver/mysql v1.4.1
|
||||
github.com/gocql/gocql v0.0.0-20190829130954-e163eff7a8c6
|
||||
|
||||
@@ -35,6 +35,7 @@ github.com/DataDog/zstd v1.3.6-0.20190409195224-796139022798/go.mod h1:1jcaCB/uf
|
||||
github.com/DataDog/zstd v1.4.1 h1:3oxKN3wbHibqx897utPC2LTQU4J+IHWWJO+glkAkpFM=
|
||||
github.com/DataDog/zstd v1.4.1/go.mod h1:1jcaCB/ufaK+sKp1NBhlGmpz41jOoPQ35bpF36t7BBo=
|
||||
github.com/GoogleCloudPlatform/cloudsql-proxy v0.0.0-20190605020000-c4ba1fdf4d36/go.mod h1:aJ4qN3TfrelA6NZ6AXsXRfmEVaYin3EDbSPJrKS8OXo=
|
||||
github.com/OneOfOne/xxhash v1.2.2 h1:KMrpdQIwFcEqXDklaen+P1axHaj9BSKzvpUUfnHldSE=
|
||||
github.com/OneOfOne/xxhash v1.2.2/go.mod h1:HSdplMjZKSmBqAxg5vPj2TmRDmfkzw+cTzAElWljhcU=
|
||||
github.com/Shopify/sarama v1.23.1 h1:XxJBCZEoWJtoWjf/xRbmGUpAmTZGnuuF0ON0EvxxBrs=
|
||||
github.com/Shopify/sarama v1.23.1/go.mod h1:XLH1GYJnLVE0XCr6KdJGVJRTwY30moWNJ4sERjXX6fs=
|
||||
@@ -57,10 +58,13 @@ github.com/bitly/go-hostpool v0.0.0-20171023180738-a3a6125de932 h1:mXoPYz/Ul5HYE
|
||||
github.com/bitly/go-hostpool v0.0.0-20171023180738-a3a6125de932/go.mod h1:NOuUCSz6Q9T7+igc/hlvDOUdtWKryOrtFyIVABv/p7k=
|
||||
github.com/bmizerany/assert v0.0.0-20160611221934-b7ed37b82869 h1:DDGfHa7BWjL4YnC6+E63dPcxHo2sUxDIu8g3QgEJdRY=
|
||||
github.com/bmizerany/assert v0.0.0-20160611221934-b7ed37b82869/go.mod h1:Ekp36dRnpXw/yCqJaO+ZrUyxD+3VXMFFr56k5XYrpB4=
|
||||
github.com/buraksezer/consistent v0.0.0-20191006190839-693edf70fd72 h1:fUmDBbSvv1uOzo/t8WaxZMVb7BxJ8JECo5lGoR9c5bA=
|
||||
github.com/buraksezer/consistent v0.0.0-20191006190839-693edf70fd72/go.mod h1:OEE5igu/CDjGegM1Jn6ZMo7R6LlV/JChAkjfQQIRLpg=
|
||||
github.com/census-instrumentation/opencensus-proto v0.2.0 h1:LzQXZOgg4CQfE6bFvXGM30YZL1WW/M337pXml+GrcZ4=
|
||||
github.com/census-instrumentation/opencensus-proto v0.2.0/go.mod h1:f6KPmirojxKA12rnyqOA5BBL4O983OfeGPqjHWSTneU=
|
||||
github.com/census-instrumentation/opencensus-proto v0.2.1 h1:glEXhBS5PSLLv4IXzLA5yPRVX4bilULVyxxbrfOtDAk=
|
||||
github.com/census-instrumentation/opencensus-proto v0.2.1/go.mod h1:f6KPmirojxKA12rnyqOA5BBL4O983OfeGPqjHWSTneU=
|
||||
github.com/cespare/xxhash v1.1.0 h1:a6HrQnmkObjyL+Gs60czilIUGqrzKutQD6XZog3p+ko=
|
||||
github.com/cespare/xxhash v1.1.0/go.mod h1:XrSqR1VqqWfGrhpAt58auRo0WTKS1nRRg3ghfAqPWnc=
|
||||
github.com/chrislusf/raft v0.0.0-20190225081310-10d6e2182d92 h1:lM9SFsh0EPXkyJyrTJqLZPAIJBtNFP6LNkYXu2MnSZI=
|
||||
github.com/chrislusf/raft v0.0.0-20190225081310-10d6e2182d92/go.mod h1:4jyiUCD5y548+yKW+oiHtccBiMaLCCbFBpK2t7X4eUo=
|
||||
@@ -91,8 +95,6 @@ github.com/dgrijalva/jwt-go v3.2.0+incompatible h1:7qlOGliEKZXTDg6OTjfoBKDXWrumC
|
||||
github.com/dgrijalva/jwt-go v3.2.0+incompatible/go.mod h1:E3ru+11k8xSBh+hMPgOLZmtrrCbhqsmaPHjLKYnJCaQ=
|
||||
github.com/dgryski/go-sip13 v0.0.0-20181026042036-e10d5fee7954/go.mod h1:vAd38F8PWV+bWy6jNmig1y/TA+kYO4g3RSRF0IAv0no=
|
||||
github.com/dimchansky/utfbom v1.1.0/go.mod h1:rO41eb7gLfo8SF1jd9F8HplJm1Fewwi4mQvIirEdv+8=
|
||||
github.com/disintegration/imaging v1.6.1 h1:JnBbK6ECIZb1NsWIikP9pd8gIlTIRx7fuDNpU9fsxOE=
|
||||
github.com/disintegration/imaging v1.6.1/go.mod h1:xuIt+sRxDFrHS0drzXUlCJthkJ8k7lkkUojDSR247MQ=
|
||||
github.com/disintegration/imaging v1.6.2 h1:w1LecBlG2Lnp8B3jk5zSuNqd7b4DXhcjwek1ei82L+c=
|
||||
github.com/disintegration/imaging v1.6.2/go.mod h1:44/5580QXChDfwIclfc/PCwrr44amcmDAg8hxG0Ewe4=
|
||||
github.com/dustin/go-humanize v1.0.0 h1:VSnTsYCnlFHaM2/igO1h6X3HA71jcobQuxemgkq4zYo=
|
||||
@@ -124,8 +126,6 @@ github.com/frankban/quicktest v1.7.2 h1:2QxQoC1TS09S7fhCPsrvqYdvP1H5M1P1ih5ABm3B
|
||||
github.com/frankban/quicktest v1.7.2/go.mod h1:jaStnuzAqU1AJdCO0l53JDCJrVDKcS03DbaAcR7Ks/o=
|
||||
github.com/fsnotify/fsnotify v1.4.7 h1:IXs+QLmnXW2CcXuY+8Mzv/fWEsPGWxqefPtCP5CnV9I=
|
||||
github.com/fsnotify/fsnotify v1.4.7/go.mod h1:jwhsz4b93w/PPRr/qN1Yymfu8t87LnFCMoQvtojpjFo=
|
||||
github.com/gabriel-vasile/mimetype v1.0.0 h1:0QKnAQQhG6oOsb4GK7iPlet7RtjHi9us8RF/nXoTxhI=
|
||||
github.com/gabriel-vasile/mimetype v1.0.0/go.mod h1:6CDPel/o/3/s4+bp6kIbsWATq8pmgOisOPG40CJa6To=
|
||||
github.com/ghodss/yaml v1.0.0 h1:wQHKEahhL6wmXdzwWG11gIVCkOv05bNOh+Rxn0yngAk=
|
||||
github.com/ghodss/yaml v1.0.0/go.mod h1:4dBDuWmgqj2HViK6kFavaiC9ZROes6MMH2rRYeMEF04=
|
||||
github.com/go-ini/ini v1.25.4/go.mod h1:ByCAeIL28uOIIG0E3PJtZPDL8WnHpFKFOtgjp+3Ies8=
|
||||
@@ -246,8 +246,6 @@ github.com/hashicorp/hcl v1.0.0/go.mod h1:E5yfLk+7swimpb2L/Alb/PJmXilQ/rhwaUYs4T
|
||||
github.com/hpcloud/tail v1.0.0 h1:nfCOvKYfkgYP8hkirhJocXT2+zOD8yUNjXaWfTlyFKI=
|
||||
github.com/hpcloud/tail v1.0.0/go.mod h1:ab1qPbhIpdTxEkNHXyeSf5vhxWSCs/tWer42PpOxQnU=
|
||||
github.com/inconshreveable/mousetrap v1.0.0/go.mod h1:PxqpIevigyE2G7u3NXJIT2ANytuPF1OarO4DADm73n8=
|
||||
github.com/jacobsa/daemonize v0.0.0-20160101105449-e460293e890f h1:X+tnaqoCcBgAwSTJtoYW6p0qKiuPyMfofEHEFUf2kdU=
|
||||
github.com/jacobsa/daemonize v0.0.0-20160101105449-e460293e890f/go.mod h1:Ip4fOwzCrnDVuluHBd7FXIMb7SHOKfkt9/UDrYSZvqI=
|
||||
github.com/jcmturner/gofork v0.0.0-20190328161633-dc7c13fece03 h1:FUwcHNlEqkqLjLBdCp5PRlCFijNjvcYANOZXzCfXwCM=
|
||||
github.com/jcmturner/gofork v0.0.0-20190328161633-dc7c13fece03/go.mod h1:MK8+TM0La+2rjBD4jE12Kj1pCCxK7d2LK/UM3ncEo0o=
|
||||
github.com/jcmturner/gofork v1.0.0 h1:J7uCkflzTEhUZ64xqKnkDxq3kzc96ajM1Gli5ktUem8=
|
||||
@@ -389,8 +387,6 @@ github.com/prometheus/procfs v0.0.3/go.mod h1:4A/X28fw3Fc593LaREMrKMqOKvUAntwMDa
|
||||
github.com/prometheus/procfs v0.0.4 h1:w8DjqFMJDjuVwdZBQoOozr4MVWOnwF7RcL/7uxBjY78=
|
||||
github.com/prometheus/procfs v0.0.4/go.mod h1:4A/X28fw3Fc593LaREMrKMqOKvUAntwMDaekg4FpcdQ=
|
||||
github.com/prometheus/tsdb v0.7.1/go.mod h1:qhTCs0VvXwvX/y3TZrWD7rabWM+ijKTux40TwIPHuXU=
|
||||
github.com/rakyll/statik v0.1.6 h1:uICcfUXpgqtw2VopbIncslhAmE5hwc4g20TEyEENBNs=
|
||||
github.com/rakyll/statik v0.1.6/go.mod h1:OEi9wJV/fMUAGx1eNjq75DKDsJVuEv1U0oYdX6GX8Zs=
|
||||
github.com/rakyll/statik v0.1.7 h1:OF3QCZUuyPxuGEP7B4ypUa7sB/iHtqOTDYZXGM8KOdQ=
|
||||
github.com/rakyll/statik v0.1.7/go.mod h1:AlZONWzMtEnMs7W4e/1LURLiI49pIMmp6V9Unghqrcc=
|
||||
github.com/rcrowley/go-metrics v0.0.0-20181016184325-3113b8401b8a h1:9ZKAASQSHhDYGoxY8uLVpewe1GDZ2vu2Tr/vTdVAkFQ=
|
||||
@@ -401,8 +397,6 @@ github.com/rogpeppe/fastuuid v0.0.0-20150106093220-6724a57986af/go.mod h1:XWv6So
|
||||
github.com/rogpeppe/go-internal v1.1.0/go.mod h1:M8bDsm7K2OlrFYOpmOWEs/qY81heoFRclV5y23lUDJ4=
|
||||
github.com/rogpeppe/go-internal v1.2.2/go.mod h1:M8bDsm7K2OlrFYOpmOWEs/qY81heoFRclV5y23lUDJ4=
|
||||
github.com/rogpeppe/go-internal v1.3.0/go.mod h1:M8bDsm7K2OlrFYOpmOWEs/qY81heoFRclV5y23lUDJ4=
|
||||
github.com/rwcarlsen/goexif v0.0.0-20190401172101-9e8deecbddbd h1:CmH9+J6ZSsIjUK3dcGsnCnO41eRBOnY12zwkn5qVwgc=
|
||||
github.com/rwcarlsen/goexif v0.0.0-20190401172101-9e8deecbddbd/go.mod h1:hPqNNc0+uJM6H+SuU8sEs5K5IQeKccPqeSjfgcKGgPk=
|
||||
github.com/seaweedfs/fuse v0.0.0-20190510212405-310228904eff h1:uLd5zBvf5OA67wcVRePHrFt60bR4LSskaVhgVwyk0Jg=
|
||||
github.com/seaweedfs/fuse v0.0.0-20190510212405-310228904eff/go.mod h1:cubdLmQFqEUZ9vNJrznhgc3m3VMAJi/nY2Ix2axXkG0=
|
||||
github.com/seaweedfs/goexif v1.0.2 h1:p+rTXYdQ2mgxd+1JaTrQ9N8DvYuw9UH9xgYmJ+Bb29E=
|
||||
@@ -510,11 +504,8 @@ golang.org/x/crypto v0.0.0-20190911031432-227b76d455e7 h1:0hQKqeLdqlt5iIwVOBErRi
|
||||
golang.org/x/crypto v0.0.0-20190911031432-227b76d455e7/go.mod h1:yigFU9vqHzYiE8UmvKecakEJjdnWj3jj499lnFckfCI=
|
||||
golang.org/x/exp v0.0.0-20190121172915-509febef88a4/go.mod h1:CJ0aWSM057203Lf6IL+f9T1iT9GByDxfZKAQTCR3kQA=
|
||||
golang.org/x/exp v0.0.0-20190510132918-efd6b22b2522/go.mod h1:ZjyILWgesfNpC6sMxTJOJm9Kp84zZh5NQWvqDGG3Qr8=
|
||||
golang.org/x/image v0.0.0-20180708004352-c73c2afc3b81/go.mod h1:ux5Hcp/YLpHSI86hEcLt0YII63i6oz57MZXIpbrjZUs=
|
||||
golang.org/x/image v0.0.0-20190227222117-0694c2d4d067 h1:KYGJGHOQy8oSi1fDlSpcZF0+juKwk/hEMv5SiwHogR0=
|
||||
golang.org/x/image v0.0.0-20190227222117-0694c2d4d067/go.mod h1:kZ7UVZpmo3dzQBMxlp+ypCbDeSB+sBbTgSJuh5dn5js=
|
||||
golang.org/x/image v0.0.0-20190829233526-b3c06291d021 h1:j6QOxNFMpEL1wIQX6TUdBPNfGZKmBOJS/vfSm8a7tdM=
|
||||
golang.org/x/image v0.0.0-20190829233526-b3c06291d021/go.mod h1:FeLwcggjj3mMvU+oOTbSwawSJRM1uh48EjtB4UJZlP0=
|
||||
golang.org/x/image v0.0.0-20191009234506-e7c1f5e7dbb8/go.mod h1:FeLwcggjj3mMvU+oOTbSwawSJRM1uh48EjtB4UJZlP0=
|
||||
golang.org/x/image v0.0.0-20200119044424-58c23975cae1 h1:5h3ngYt7+vXCDZCup/HkCQgW5XwmSvR/nA2JmJ0RErg=
|
||||
golang.org/x/image v0.0.0-20200119044424-58c23975cae1/go.mod h1:FeLwcggjj3mMvU+oOTbSwawSJRM1uh48EjtB4UJZlP0=
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
apiVersion: v1
|
||||
description: SeaweedFS
|
||||
name: seaweedfs
|
||||
version: 1.75
|
||||
version: 1.78
|
||||
@@ -4,7 +4,7 @@ global:
|
||||
registry: ""
|
||||
repository: ""
|
||||
imageName: chrislusf/seaweedfs
|
||||
imageTag: "1.75"
|
||||
imageTag: "1.78"
|
||||
imagePullPolicy: IfNotPresent
|
||||
imagePullSecrets: imagepullsecret
|
||||
restartPolicy: Always
|
||||
|
||||
@@ -5,7 +5,7 @@
|
||||
|
||||
<groupId>com.github.chrislusf</groupId>
|
||||
<artifactId>seaweedfs-client</artifactId>
|
||||
<version>1.2.6</version>
|
||||
<version>1.2.7</version>
|
||||
|
||||
<parent>
|
||||
<groupId>org.sonatype.oss</groupId>
|
||||
|
||||
@@ -14,7 +14,7 @@ public class FilerClient {
|
||||
|
||||
private static final Logger LOG = LoggerFactory.getLogger(FilerClient.class);
|
||||
|
||||
private FilerGrpcClient filerGrpcClient;
|
||||
private final FilerGrpcClient filerGrpcClient;
|
||||
|
||||
public FilerClient(String host, int grpcPort) {
|
||||
filerGrpcClient = new FilerGrpcClient(host, grpcPort);
|
||||
@@ -181,7 +181,7 @@ public class FilerClient {
|
||||
.setLimit(limit)
|
||||
.build());
|
||||
List<FilerProto.Entry> entries = new ArrayList<>();
|
||||
while (iter.hasNext()){
|
||||
while (iter.hasNext()) {
|
||||
FilerProto.ListEntriesResponse resp = iter.next();
|
||||
entries.add(fixEntryAfterReading(resp.getEntry()));
|
||||
}
|
||||
@@ -195,9 +195,12 @@ public class FilerClient {
|
||||
.setDirectory(directory)
|
||||
.setName(entryName)
|
||||
.build()).getEntry();
|
||||
if (entry == null) {
|
||||
return null;
|
||||
}
|
||||
return fixEntryAfterReading(entry);
|
||||
} catch (Exception e) {
|
||||
if (e.getMessage().indexOf("filer: no entry is found in filer store")>0){
|
||||
if (e.getMessage().indexOf("filer: no entry is found in filer store") > 0) {
|
||||
return null;
|
||||
}
|
||||
LOG.warn("lookupEntry {}/{}: {}", directory, entryName, e);
|
||||
|
||||
@@ -99,10 +99,12 @@ public class SeaweedRead {
|
||||
data = Gzip.decompress(data);
|
||||
}
|
||||
|
||||
try {
|
||||
data = SeaweedCipher.decrypt(data, chunkView.cipherKey);
|
||||
} catch (Exception e) {
|
||||
throw new IOException("fail to decrypt", e);
|
||||
if (chunkView.cipherKey != null && chunkView.cipherKey.length != 0) {
|
||||
try {
|
||||
data = SeaweedCipher.decrypt(data, chunkView.cipherKey);
|
||||
} catch (Exception e) {
|
||||
throw new IOException("fail to decrypt", e);
|
||||
}
|
||||
}
|
||||
|
||||
return data;
|
||||
|
||||
@@ -36,7 +36,7 @@ public class SeaweedWrite {
|
||||
String auth = response.getAuth();
|
||||
String targetUrl = String.format("http://%s/%s", url, fileId);
|
||||
|
||||
ByteString cipherKeyString = null;
|
||||
ByteString cipherKeyString = com.google.protobuf.ByteString.EMPTY;
|
||||
byte[] cipherKey = null;
|
||||
if (filerGrpcClient.isCipher()) {
|
||||
cipherKey = genCipherKey();
|
||||
@@ -78,7 +78,7 @@ public class SeaweedWrite {
|
||||
HttpClient client = new DefaultHttpClient();
|
||||
|
||||
InputStream inputStream = null;
|
||||
if (cipherKey == null) {
|
||||
if (cipherKey == null || cipherKey.length == 0) {
|
||||
inputStream = new ByteArrayInputStream(bytes, (int) bytesOffset, (int) bytesLength);
|
||||
} else {
|
||||
try {
|
||||
|
||||
@@ -48,6 +48,12 @@ service SeaweedFiler {
|
||||
rpc SubscribeMetadata (SubscribeMetadataRequest) returns (stream SubscribeMetadataResponse) {
|
||||
}
|
||||
|
||||
rpc KeepConnected (stream KeepConnectedRequest) returns (stream KeepConnectedResponse) {
|
||||
}
|
||||
|
||||
rpc LocateBroker (LocateBrokerRequest) returns (LocateBrokerResponse) {
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
//////////////////////////////////////////////////
|
||||
@@ -261,3 +267,25 @@ message LogEntry {
|
||||
int32 partition_key_hash = 2;
|
||||
bytes data = 3;
|
||||
}
|
||||
|
||||
message KeepConnectedRequest {
|
||||
string name = 1;
|
||||
uint32 grpc_port = 2;
|
||||
repeated string resources = 3;
|
||||
}
|
||||
message KeepConnectedResponse {
|
||||
}
|
||||
|
||||
message LocateBrokerRequest {
|
||||
string resource = 1;
|
||||
}
|
||||
message LocateBrokerResponse {
|
||||
bool found = 1;
|
||||
// if found, send the exact address
|
||||
// if not found, send the full list of existing brokers
|
||||
message Resource {
|
||||
string grpc_addresses = 1;
|
||||
int32 resource_count = 2;
|
||||
}
|
||||
repeated Resource resources = 2;
|
||||
}
|
||||
@@ -127,7 +127,7 @@
|
||||
</snapshotRepository>
|
||||
</distributionManagement>
|
||||
<properties>
|
||||
<seaweedfs.client.version>1.2.6</seaweedfs.client.version>
|
||||
<seaweedfs.client.version>1.2.7</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.6</seaweedfs.client.version>
|
||||
<seaweedfs.client.version>1.2.7</seaweedfs.client.version>
|
||||
<hadoop.version>2.9.2</hadoop.version>
|
||||
</properties>
|
||||
|
||||
|
||||
@@ -127,7 +127,7 @@
|
||||
</snapshotRepository>
|
||||
</distributionManagement>
|
||||
<properties>
|
||||
<seaweedfs.client.version>1.2.6</seaweedfs.client.version>
|
||||
<seaweedfs.client.version>1.2.7</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.6</seaweedfs.client.version>
|
||||
<seaweedfs.client.version>1.2.7</seaweedfs.client.version>
|
||||
<hadoop.version>3.1.1</hadoop.version>
|
||||
</properties>
|
||||
|
||||
|
||||
@@ -42,6 +42,7 @@ type BenchmarkOptions struct {
|
||||
grpcDialOption grpc.DialOption
|
||||
masterClient *wdclient.MasterClient
|
||||
grpcRead *bool
|
||||
fsync *bool
|
||||
}
|
||||
|
||||
var (
|
||||
@@ -67,6 +68,7 @@ func init() {
|
||||
b.cpuprofile = cmdBenchmark.Flag.String("cpuprofile", "", "cpu profile output file")
|
||||
b.maxCpu = cmdBenchmark.Flag.Int("maxCpu", 0, "maximum number of CPUs. 0 means all available CPUs")
|
||||
b.grpcRead = cmdBenchmark.Flag.Bool("grpcRead", false, "use grpc API to read")
|
||||
b.fsync = cmdBenchmark.Flag.Bool("fsync", false, "flush data to disk after write")
|
||||
sharedBytes = make([]byte, 1024)
|
||||
}
|
||||
|
||||
@@ -227,9 +229,10 @@ func writeFiles(idChan chan int, fileIdLineChan chan string, s *stat) {
|
||||
start := time.Now()
|
||||
fileSize := int64(*b.fileSize + random.Intn(64))
|
||||
fp := &operation.FilePart{
|
||||
Reader: &FakeReader{id: uint64(id), size: fileSize},
|
||||
Reader: &FakeReader{id: uint64(id), size: fileSize, random: random},
|
||||
FileSize: fileSize,
|
||||
MimeType: "image/bench", // prevent gzip benchmark content
|
||||
Fsync: *b.fsync,
|
||||
}
|
||||
ar := &operation.VolumeAssignRequest{
|
||||
Count: 1,
|
||||
@@ -550,8 +553,9 @@ func (s *stats) printStats() {
|
||||
|
||||
// a fake reader to generate content to upload
|
||||
type FakeReader struct {
|
||||
id uint64 // an id number
|
||||
size int64 // max bytes
|
||||
id uint64 // an id number
|
||||
size int64 // max bytes
|
||||
random *rand.Rand
|
||||
}
|
||||
|
||||
func (l *FakeReader) Read(p []byte) (n int, err error) {
|
||||
@@ -567,6 +571,7 @@ func (l *FakeReader) Read(p []byte) (n int, err error) {
|
||||
for i := 0; i < 8; i++ {
|
||||
p[i] = byte(l.id >> uint(i*8))
|
||||
}
|
||||
l.random.Read(p[8:])
|
||||
}
|
||||
l.size -= int64(n)
|
||||
return
|
||||
|
||||
@@ -16,6 +16,8 @@ import (
|
||||
|
||||
"google.golang.org/grpc"
|
||||
|
||||
"github.com/chrislusf/seaweedfs/weed/util/grace"
|
||||
|
||||
"github.com/chrislusf/seaweedfs/weed/operation"
|
||||
"github.com/chrislusf/seaweedfs/weed/pb"
|
||||
"github.com/chrislusf/seaweedfs/weed/pb/filer_pb"
|
||||
@@ -134,7 +136,7 @@ func runCopy(cmd *Command, args []string) bool {
|
||||
copy.ttlSec = int32(ttl.Minutes()) * 60
|
||||
|
||||
if *cmdCopy.IsDebug {
|
||||
util.SetupProfiling("filer.copy.cpu.pprof", "filer.copy.mem.pprof")
|
||||
grace.SetupProfiling("filer.copy.cpu.pprof", "filer.copy.mem.pprof")
|
||||
}
|
||||
|
||||
fileCopyTaskChan := make(chan FileCopyTask, *copy.concurrenctFiles)
|
||||
@@ -323,15 +325,7 @@ func (worker *FileCopyWorker) uploadFileAsOne(task FileCopyTask, f *os.File) err
|
||||
}
|
||||
fmt.Printf("uploaded %s to %s\n", fileName, targetUrl)
|
||||
|
||||
chunks = append(chunks, &filer_pb.FileChunk{
|
||||
FileId: assignResult.FileId,
|
||||
Offset: 0,
|
||||
Size: uint64(uploadResult.Size),
|
||||
Mtime: time.Now().UnixNano(),
|
||||
ETag: uploadResult.Md5,
|
||||
CipherKey: uploadResult.CipherKey,
|
||||
IsGzipped: uploadResult.Gzip > 0,
|
||||
})
|
||||
chunks = append(chunks, uploadResult.ToPbFileChunk(assignResult.FileId, 0))
|
||||
|
||||
fmt.Printf("copied %s => http://%s%s%s\n", fileName, worker.filerHost, task.destinationUrlPath, fileName)
|
||||
}
|
||||
@@ -434,15 +428,8 @@ func (worker *FileCopyWorker) uploadFileInChunks(task FileCopyTask, f *os.File,
|
||||
uploadError = fmt.Errorf("upload %v to %s result: %v\n", fileName, targetUrl, uploadResult.Error)
|
||||
return
|
||||
}
|
||||
chunksChan <- &filer_pb.FileChunk{
|
||||
FileId: assignResult.FileId,
|
||||
Offset: i * chunkSize,
|
||||
Size: uint64(uploadResult.Size),
|
||||
Mtime: time.Now().UnixNano(),
|
||||
ETag: uploadResult.ETag,
|
||||
CipherKey: uploadResult.CipherKey,
|
||||
IsGzipped: uploadResult.Gzip > 0,
|
||||
}
|
||||
chunksChan <- uploadResult.ToPbFileChunk(assignResult.FileId, i*chunkSize)
|
||||
|
||||
fmt.Printf("uploaded %s-%d to %s [%d,%d)\n", fileName, i+1, targetUrl, i*chunkSize, i*chunkSize+int64(uploadResult.Size))
|
||||
}(i)
|
||||
}
|
||||
|
||||
@@ -8,6 +8,7 @@ import (
|
||||
"strings"
|
||||
|
||||
"github.com/chrislusf/raft/protobuf"
|
||||
"github.com/chrislusf/seaweedfs/weed/util/grace"
|
||||
"github.com/gorilla/mux"
|
||||
"google.golang.org/grpc/reflection"
|
||||
|
||||
@@ -82,7 +83,7 @@ func runMaster(cmd *Command, args []string) bool {
|
||||
util.LoadConfiguration("master", false)
|
||||
|
||||
runtime.GOMAXPROCS(runtime.NumCPU())
|
||||
util.SetupProfiling(*masterCpuProfile, *masterMemProfile)
|
||||
grace.SetupProfiling(*masterCpuProfile, *masterMemProfile)
|
||||
|
||||
if err := util.TestFolderWritable(*m.metaFolder); err != nil {
|
||||
glog.Fatalf("Check Meta Folder (-mdir) Writable %s : %s", *m.metaFolder, err)
|
||||
|
||||
@@ -48,7 +48,7 @@ func init() {
|
||||
mountCpuProfile = cmdMount.Flag.String("cpuprofile", "", "cpu profile output file")
|
||||
mountMemProfile = cmdMount.Flag.String("memprofile", "", "memory profile output file")
|
||||
mountOptions.outsideContainerClusterMode = cmdMount.Flag.Bool("outsideContainerClusterMode", false, "allows other users to access the file system")
|
||||
mountOptions.asyncMetaDataCaching = cmdMount.Flag.Bool("asyncMetaDataCaching", false, "<wip> async meta data caching")
|
||||
mountOptions.asyncMetaDataCaching = cmdMount.Flag.Bool("asyncMetaDataCaching", true, "async meta data caching. this feature will be permanent and this option will be removed.")
|
||||
}
|
||||
|
||||
var cmdMount = &Command{
|
||||
|
||||
+24
-16
@@ -19,13 +19,14 @@ import (
|
||||
"github.com/chrislusf/seaweedfs/weed/pb/filer_pb"
|
||||
"github.com/chrislusf/seaweedfs/weed/security"
|
||||
"github.com/chrislusf/seaweedfs/weed/util"
|
||||
"github.com/chrislusf/seaweedfs/weed/util/grace"
|
||||
"github.com/seaweedfs/fuse"
|
||||
"github.com/seaweedfs/fuse/fs"
|
||||
)
|
||||
|
||||
func runMount(cmd *Command, args []string) bool {
|
||||
|
||||
util.SetupProfiling(*mountCpuProfile, *mountMemProfile)
|
||||
grace.SetupProfiling(*mountCpuProfile, *mountMemProfile)
|
||||
|
||||
umask, umaskErr := strconv.ParseUint(*mountOptions.umaskString, 8, 64)
|
||||
if umaskErr != nil {
|
||||
@@ -33,6 +34,10 @@ func runMount(cmd *Command, args []string) bool {
|
||||
return false
|
||||
}
|
||||
|
||||
if len(args)>0 {
|
||||
return false
|
||||
}
|
||||
|
||||
return RunMount(&mountOptions, os.FileMode(umask))
|
||||
}
|
||||
|
||||
@@ -136,26 +141,13 @@ func RunMount(option *MountOptions, umask os.FileMode) bool {
|
||||
options = append(options, fuse.AllowNonEmptyMount())
|
||||
}
|
||||
|
||||
// mount
|
||||
c, err := fuse.Mount(dir, options...)
|
||||
if err != nil {
|
||||
glog.V(0).Infof("mount: %v", err)
|
||||
return true
|
||||
}
|
||||
defer fuse.Unmount(dir)
|
||||
|
||||
util.OnInterrupt(func() {
|
||||
fuse.Unmount(dir)
|
||||
c.Close()
|
||||
})
|
||||
|
||||
// find mount point
|
||||
mountRoot := filerMountRootPath
|
||||
if mountRoot != "/" && strings.HasSuffix(mountRoot, "/") {
|
||||
mountRoot = mountRoot[0 : len(mountRoot)-1]
|
||||
}
|
||||
|
||||
err = fs.Serve(c, filesys.NewSeaweedFileSystem(&filesys.Option{
|
||||
seaweedFileSystem := filesys.NewSeaweedFileSystem(&filesys.Option{
|
||||
FilerGrpcAddress: filerGrpcAddress,
|
||||
GrpcDialOption: grpcDialOption,
|
||||
FilerMountRootPath: mountRoot,
|
||||
@@ -177,7 +169,23 @@ func RunMount(option *MountOptions, umask os.FileMode) bool {
|
||||
OutsideContainerClusterMode: *mountOptions.outsideContainerClusterMode,
|
||||
AsyncMetaDataCaching: *mountOptions.asyncMetaDataCaching,
|
||||
Cipher: cipher,
|
||||
}))
|
||||
})
|
||||
|
||||
// mount
|
||||
c, err := fuse.Mount(dir, options...)
|
||||
if err != nil {
|
||||
glog.V(0).Infof("mount: %v", err)
|
||||
return true
|
||||
}
|
||||
defer fuse.Unmount(dir)
|
||||
|
||||
grace.OnInterrupt(func() {
|
||||
fuse.Unmount(dir)
|
||||
c.Close()
|
||||
})
|
||||
|
||||
glog.V(0).Infof("mounted %s%s to %s", filer, mountRoot, dir)
|
||||
err = fs.Serve(c, seaweedFileSystem)
|
||||
|
||||
// check if the mount process has an error to report
|
||||
<-c.Ready
|
||||
|
||||
@@ -8,6 +8,8 @@ import (
|
||||
|
||||
"google.golang.org/grpc/reflection"
|
||||
|
||||
"github.com/chrislusf/seaweedfs/weed/util/grace"
|
||||
|
||||
"github.com/chrislusf/seaweedfs/weed/glog"
|
||||
"github.com/chrislusf/seaweedfs/weed/messaging/broker"
|
||||
"github.com/chrislusf/seaweedfs/weed/pb"
|
||||
@@ -18,11 +20,12 @@ import (
|
||||
)
|
||||
|
||||
var (
|
||||
messageBrokerStandaloneOptions QueueOptions
|
||||
messageBrokerStandaloneOptions MessageBrokerOptions
|
||||
)
|
||||
|
||||
type QueueOptions struct {
|
||||
type MessageBrokerOptions struct {
|
||||
filer *string
|
||||
ip *string
|
||||
port *int
|
||||
cpuprofile *string
|
||||
memprofile *string
|
||||
@@ -31,14 +34,15 @@ type QueueOptions struct {
|
||||
func init() {
|
||||
cmdMsgBroker.Run = runMsgBroker // break init cycle
|
||||
messageBrokerStandaloneOptions.filer = cmdMsgBroker.Flag.String("filer", "localhost:8888", "filer server address")
|
||||
messageBrokerStandaloneOptions.port = cmdMsgBroker.Flag.Int("port", 17777, "queue server gRPC listen port")
|
||||
messageBrokerStandaloneOptions.ip = cmdMsgBroker.Flag.String("ip", util.DetectedHostAddress(), "broker host address")
|
||||
messageBrokerStandaloneOptions.port = cmdMsgBroker.Flag.Int("port", 17777, "broker gRPC listen port")
|
||||
messageBrokerStandaloneOptions.cpuprofile = cmdMsgBroker.Flag.String("cpuprofile", "", "cpu profile output file")
|
||||
messageBrokerStandaloneOptions.memprofile = cmdMsgBroker.Flag.String("memprofile", "", "memory profile output file")
|
||||
}
|
||||
|
||||
var cmdMsgBroker = &Command{
|
||||
UsageLine: "msg.broker [-port=17777] [-filer=<ip:port>]",
|
||||
Short: "<WIP> start a message queue broker",
|
||||
UsageLine: "msgBroker [-port=17777] [-filer=<ip:port>]",
|
||||
Short: "start a message queue broker",
|
||||
Long: `start a message queue broker
|
||||
|
||||
The broker can accept gRPC calls to write or read messages. The messages are stored via filer.
|
||||
@@ -55,9 +59,9 @@ func runMsgBroker(cmd *Command, args []string) bool {
|
||||
|
||||
}
|
||||
|
||||
func (msgBrokerOpt *QueueOptions) startQueueServer() bool {
|
||||
func (msgBrokerOpt *MessageBrokerOptions) startQueueServer() bool {
|
||||
|
||||
util.SetupProfiling(*messageBrokerStandaloneOptions.cpuprofile, *messageBrokerStandaloneOptions.memprofile)
|
||||
grace.SetupProfiling(*messageBrokerStandaloneOptions.cpuprofile, *messageBrokerStandaloneOptions.memprofile)
|
||||
|
||||
filerGrpcAddress, err := pb.ParseFilerGrpcAddress(*msgBrokerOpt.filer)
|
||||
if err != nil {
|
||||
@@ -90,6 +94,7 @@ func (msgBrokerOpt *QueueOptions) startQueueServer() bool {
|
||||
Filers: []string{*msgBrokerOpt.filer},
|
||||
DefaultReplication: "",
|
||||
MaxMB: 0,
|
||||
Ip: *msgBrokerOpt.ip,
|
||||
Port: *msgBrokerOpt.port,
|
||||
Cipher: cipher,
|
||||
}, grpcDialOption)
|
||||
|
||||
@@ -362,11 +362,13 @@ key = ""
|
||||
[master.maintenance]
|
||||
# periodically run these scripts are the same as running them from 'weed shell'
|
||||
scripts = """
|
||||
lock
|
||||
ec.encode -fullPercent=95 -quietFor=1h
|
||||
ec.rebuild -force
|
||||
ec.balance -force
|
||||
volume.balance -force
|
||||
volume.fix.replication
|
||||
unlock
|
||||
"""
|
||||
sleep_minutes = 17 # sleep minutes between each script execution
|
||||
|
||||
|
||||
+20
-4
@@ -18,10 +18,11 @@ type ServerOptions struct {
|
||||
}
|
||||
|
||||
var (
|
||||
serverOptions ServerOptions
|
||||
masterOptions MasterOptions
|
||||
filerOptions FilerOptions
|
||||
s3Options S3Options
|
||||
serverOptions ServerOptions
|
||||
masterOptions MasterOptions
|
||||
filerOptions FilerOptions
|
||||
s3Options S3Options
|
||||
msgBrokerOptions MessageBrokerOptions
|
||||
)
|
||||
|
||||
func init() {
|
||||
@@ -57,6 +58,7 @@ var (
|
||||
pulseSeconds = cmdServer.Flag.Int("pulseSeconds", 5, "number of seconds between heartbeats")
|
||||
isStartingFiler = cmdServer.Flag.Bool("filer", false, "whether to start filer")
|
||||
isStartingS3 = cmdServer.Flag.Bool("s3", false, "whether to start S3 gateway")
|
||||
isStartingMsgBroker = cmdServer.Flag.Bool("msgBroker", false, "whether to start message broker")
|
||||
|
||||
serverWhiteList []string
|
||||
)
|
||||
@@ -98,6 +100,8 @@ func init() {
|
||||
s3Options.tlsCertificate = cmdServer.Flag.String("s3.cert.file", "", "path to the TLS certificate file")
|
||||
s3Options.config = cmdServer.Flag.String("s3.config", "", "path to the config file")
|
||||
|
||||
msgBrokerOptions.port = cmdServer.Flag.Int("msgBroker.port", 17777, "broker gRPC listen port")
|
||||
|
||||
}
|
||||
|
||||
func runServer(cmd *Command, args []string) bool {
|
||||
@@ -117,6 +121,9 @@ func runServer(cmd *Command, args []string) bool {
|
||||
if *isStartingS3 {
|
||||
*isStartingFiler = true
|
||||
}
|
||||
if *isStartingMsgBroker {
|
||||
*isStartingFiler = true
|
||||
}
|
||||
|
||||
_, peerList := checkPeers(*serverIp, *masterOptions.port, *masterOptions.peers)
|
||||
peers := strings.Join(peerList, ",")
|
||||
@@ -133,6 +140,7 @@ func runServer(cmd *Command, args []string) bool {
|
||||
serverOptions.v.idleConnectionTimeout = serverTimeout
|
||||
serverOptions.v.dataCenter = serverDataCenter
|
||||
serverOptions.v.rack = serverRack
|
||||
msgBrokerOptions.ip = serverIp
|
||||
|
||||
serverOptions.v.pulseSeconds = pulseSeconds
|
||||
masterOptions.pulseSeconds = pulseSeconds
|
||||
@@ -145,6 +153,7 @@ func runServer(cmd *Command, args []string) bool {
|
||||
|
||||
filerAddress := fmt.Sprintf("%s:%d", *serverIp, *filerOptions.port)
|
||||
s3Options.filer = &filerAddress
|
||||
msgBrokerOptions.filer = &filerAddress
|
||||
|
||||
if *filerOptions.defaultReplicaPlacement == "" {
|
||||
*filerOptions.defaultReplicaPlacement = *masterOptions.defaultReplication
|
||||
@@ -188,6 +197,13 @@ func runServer(cmd *Command, args []string) bool {
|
||||
}()
|
||||
}
|
||||
|
||||
if *isStartingMsgBroker {
|
||||
go func() {
|
||||
time.Sleep(2 * time.Second)
|
||||
msgBrokerOptions.startQueueServer()
|
||||
}()
|
||||
}
|
||||
|
||||
// start volume server
|
||||
{
|
||||
go serverOptions.v.startVolumeServer(*volumeDataFolders, *volumeMaxDataVolumeCounts, *serverWhiteListOption)
|
||||
|
||||
@@ -10,6 +10,7 @@ import (
|
||||
"strings"
|
||||
"time"
|
||||
|
||||
"github.com/chrislusf/seaweedfs/weed/util/grace"
|
||||
"github.com/spf13/viper"
|
||||
"google.golang.org/grpc"
|
||||
|
||||
@@ -93,7 +94,7 @@ func runVolume(cmd *Command, args []string) bool {
|
||||
util.LoadConfiguration("security", false)
|
||||
|
||||
runtime.GOMAXPROCS(runtime.NumCPU())
|
||||
util.SetupProfiling(*v.cpuProfile, *v.memProfile)
|
||||
grace.SetupProfiling(*v.cpuProfile, *v.memProfile)
|
||||
|
||||
v.startVolumeServer(*volumeFolders, *maxVolumeCounts, *volumeWhiteListOption)
|
||||
|
||||
@@ -183,7 +184,7 @@ func (v VolumeServerOptions) startVolumeServer(volumeFolders, maxVolumeCounts, v
|
||||
clusterHttpServer := v.startClusterHttpService(volumeMux)
|
||||
|
||||
stopChain := make(chan struct{})
|
||||
util.OnInterrupt(func() {
|
||||
grace.OnInterrupt(func() {
|
||||
fmt.Println("volume server has be killed")
|
||||
var startTime time.Time
|
||||
|
||||
|
||||
@@ -4,6 +4,7 @@ import (
|
||||
"context"
|
||||
"fmt"
|
||||
"io"
|
||||
"time"
|
||||
|
||||
"github.com/chrislusf/seaweedfs/weed/pb"
|
||||
"github.com/chrislusf/seaweedfs/weed/pb/filer_pb"
|
||||
@@ -26,6 +27,7 @@ var cmdWatch = &Command{
|
||||
var (
|
||||
watchFiler = cmdWatch.Flag.String("filer", "localhost:8888", "filer hostname:port")
|
||||
watchTarget = cmdWatch.Flag.String("pathPrefix", "/", "path to a folder or file, or common prefix for the folders or files on filer")
|
||||
watchStart = cmdWatch.Flag.Duration("timeAgo", 0, "start time before now. \"300ms\", \"1.5h\" or \"2h45m\". Valid time units are \"ns\", \"us\" (or \"µs\"), \"ms\", \"s\", \"m\", \"h\"")
|
||||
)
|
||||
|
||||
func runWatch(cmd *Command, args []string) bool {
|
||||
@@ -37,7 +39,7 @@ func runWatch(cmd *Command, args []string) bool {
|
||||
stream, err := client.SubscribeMetadata(context.Background(), &filer_pb.SubscribeMetadataRequest{
|
||||
ClientName: "watch",
|
||||
PathPrefix: *watchTarget,
|
||||
SinceNs: 0,
|
||||
SinceNs: time.Now().Add(-*watchStart).UnixNano(),
|
||||
})
|
||||
if err != nil {
|
||||
return fmt.Errorf("listen: %v", err)
|
||||
|
||||
@@ -122,11 +122,13 @@ func (f *Filer) CreateEntry(ctx context.Context, entry *Entry, o_excl bool) erro
|
||||
Attr: Attr{
|
||||
Mtime: now,
|
||||
Crtime: now,
|
||||
Mode: os.ModeDir | 0770,
|
||||
Mode: os.ModeDir | entry.Mode | 0110,
|
||||
Uid: entry.Uid,
|
||||
Gid: entry.Gid,
|
||||
Collection: entry.Collection,
|
||||
Replication: entry.Replication,
|
||||
UserName: entry.UserName,
|
||||
GroupNames: entry.GroupNames,
|
||||
},
|
||||
}
|
||||
|
||||
|
||||
@@ -34,19 +34,31 @@ func (f *Filer) loopProcessingDeletion() {
|
||||
|
||||
lookupFunc := LookupByMasterClientFn(f.MasterClient)
|
||||
|
||||
DeletionBatchSize := 100000 // roughly 20 bytes cost per file id.
|
||||
|
||||
var deletionCount int
|
||||
for {
|
||||
deletionCount = 0
|
||||
f.fileIdDeletionQueue.Consume(func(fileIds []string) {
|
||||
deletionCount = len(fileIds)
|
||||
deleteResults, err := operation.DeleteFilesWithLookupVolumeId(f.GrpcDialOption, fileIds, lookupFunc)
|
||||
if err != nil {
|
||||
glog.V(0).Infof("deleting fileIds len=%d error: %v", deletionCount, err)
|
||||
} else {
|
||||
glog.V(1).Infof("deleting fileIds len=%d", deletionCount)
|
||||
}
|
||||
if len(deleteResults) != deletionCount {
|
||||
glog.V(0).Infof("delete %d fileIds actual %d", deletionCount, len(deleteResults))
|
||||
for len(fileIds) > 0 {
|
||||
var toDeleteFileIds []string
|
||||
if len(fileIds) > DeletionBatchSize {
|
||||
toDeleteFileIds = fileIds[:DeletionBatchSize]
|
||||
fileIds = fileIds[DeletionBatchSize:]
|
||||
} else {
|
||||
toDeleteFileIds = fileIds
|
||||
fileIds = fileIds[:0]
|
||||
}
|
||||
deletionCount = len(toDeleteFileIds)
|
||||
deleteResults, err := operation.DeleteFilesWithLookupVolumeId(f.GrpcDialOption, toDeleteFileIds, lookupFunc)
|
||||
if err != nil {
|
||||
glog.V(0).Infof("deleting fileIds len=%d error: %v", deletionCount, err)
|
||||
} else {
|
||||
glog.V(1).Infof("deleting fileIds len=%d", deletionCount)
|
||||
}
|
||||
if len(deleteResults) != deletionCount {
|
||||
glog.V(0).Infof("delete %d fileIds actual %d", deletionCount, len(deleteResults))
|
||||
}
|
||||
}
|
||||
})
|
||||
|
||||
|
||||
@@ -1,7 +1,9 @@
|
||||
package filer2
|
||||
|
||||
import (
|
||||
"context"
|
||||
"fmt"
|
||||
"io"
|
||||
"strings"
|
||||
"time"
|
||||
|
||||
@@ -79,3 +81,77 @@ func (f *Filer) logFlushFunc(startTime, stopTime time.Time, buf []byte) {
|
||||
glog.V(0).Infof("log write failed %s: %v", targetFile, err)
|
||||
}
|
||||
}
|
||||
|
||||
func (f *Filer) ReadPersistedLogBuffer(startTime time.Time, eachLogEntryFn func(logEntry *filer_pb.LogEntry) error) error {
|
||||
|
||||
startDate := fmt.Sprintf("%04d-%02d-%02d", startTime.Year(), startTime.Month(), startTime.Day())
|
||||
startHourMinute := fmt.Sprintf("%02d-%02d.segment", startTime.Hour(), startTime.Minute())
|
||||
|
||||
sizeBuf := make([]byte, 4)
|
||||
startTsNs := startTime.UnixNano()
|
||||
|
||||
dayEntries, listDayErr := f.ListDirectoryEntries(context.Background(), SystemLogDir, startDate, true, 366)
|
||||
if listDayErr != nil {
|
||||
return fmt.Errorf("fail to list log by day: %v", listDayErr)
|
||||
}
|
||||
for _, dayEntry := range dayEntries {
|
||||
// println("checking day", dayEntry.FullPath)
|
||||
hourMinuteEntries, listHourMinuteErr := f.ListDirectoryEntries(context.Background(), util.NewFullPath(SystemLogDir, dayEntry.Name()), "", false, 24*60)
|
||||
if listHourMinuteErr != nil {
|
||||
return fmt.Errorf("fail to list log %s by day: %v", dayEntry.Name(), listHourMinuteErr)
|
||||
}
|
||||
for _, hourMinuteEntry := range hourMinuteEntries {
|
||||
// println("checking hh-mm", hourMinuteEntry.FullPath)
|
||||
if dayEntry.Name() == startDate {
|
||||
if strings.Compare(hourMinuteEntry.Name(), startHourMinute) < 0 {
|
||||
continue
|
||||
}
|
||||
}
|
||||
// println("processing", hourMinuteEntry.FullPath)
|
||||
chunkedFileReader := NewChunkStreamReaderFromFiler(f.MasterClient, hourMinuteEntry.Chunks)
|
||||
if err := ReadEachLogEntry(chunkedFileReader, sizeBuf, startTsNs, eachLogEntryFn); err != nil {
|
||||
chunkedFileReader.Close()
|
||||
if err == io.EOF {
|
||||
break
|
||||
}
|
||||
return fmt.Errorf("reading %s: %v", hourMinuteEntry.FullPath, err)
|
||||
}
|
||||
chunkedFileReader.Close()
|
||||
}
|
||||
}
|
||||
|
||||
return nil
|
||||
}
|
||||
|
||||
func ReadEachLogEntry(r io.Reader, sizeBuf []byte, ns int64, eachLogEntryFn func(logEntry *filer_pb.LogEntry) error) error {
|
||||
for {
|
||||
n, err := r.Read(sizeBuf)
|
||||
if err != nil {
|
||||
return err
|
||||
}
|
||||
if n != 4 {
|
||||
return fmt.Errorf("size %d bytes, expected 4 bytes", n)
|
||||
}
|
||||
size := util.BytesToUint32(sizeBuf)
|
||||
// println("entry size", size)
|
||||
entryData := make([]byte, size)
|
||||
n, err = r.Read(entryData)
|
||||
if err != nil {
|
||||
return err
|
||||
}
|
||||
if n != int(size) {
|
||||
return fmt.Errorf("entry data %d bytes, expected %d bytes", n, size)
|
||||
}
|
||||
logEntry := &filer_pb.LogEntry{}
|
||||
if err = proto.Unmarshal(entryData, logEntry); err != nil {
|
||||
return err
|
||||
}
|
||||
if logEntry.TsNs <= ns {
|
||||
return nil
|
||||
}
|
||||
// println("each log: ", logEntry.TsNs)
|
||||
if err := eachLogEntryFn(logEntry); err != nil {
|
||||
return err
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -38,15 +38,7 @@ func (f *Filer) appendToFile(targetFile string, data []byte) error {
|
||||
}
|
||||
|
||||
// append to existing chunks
|
||||
chunk := &filer_pb.FileChunk{
|
||||
FileId: assignResult.Fid,
|
||||
Offset: offset,
|
||||
Size: uint64(uploadResult.Size),
|
||||
Mtime: time.Now().UnixNano(),
|
||||
ETag: uploadResult.ETag,
|
||||
IsGzipped: uploadResult.Gzip > 0,
|
||||
}
|
||||
entry.Chunks = append(entry.Chunks, chunk)
|
||||
entry.Chunks = append(entry.Chunks, uploadResult.ToPbFileChunk(assignResult.Fid, offset))
|
||||
|
||||
// update the entry
|
||||
err = f.CreateEntry(context.Background(), entry, false)
|
||||
|
||||
@@ -159,7 +159,7 @@ func (store *MongodbStore) DeleteEntry(ctx context.Context, fullpath util.FullPa
|
||||
func (store *MongodbStore) DeleteFolderChildren(ctx context.Context, fullpath util.FullPath) error {
|
||||
|
||||
where := bson.M{"directory": fullpath}
|
||||
_, err := store.connect.Database(store.database).Collection(store.collectionName).DeleteOne(ctx, where)
|
||||
_, err := store.connect.Database(store.database).Collection(store.collectionName).DeleteMany(ctx, where)
|
||||
if err != nil {
|
||||
return fmt.Errorf("delete %s : %v", fullpath, err)
|
||||
}
|
||||
|
||||
+31
-25
@@ -27,34 +27,40 @@ type ChunkReadAt struct {
|
||||
|
||||
// var _ = io.ReaderAt(&ChunkReadAt{})
|
||||
|
||||
type LookupFileIdFunctionType func(fileId string) (targetUrl string, err error)
|
||||
|
||||
func LookupFn(filerClient filer_pb.FilerClient) LookupFileIdFunctionType {
|
||||
return func(fileId string) (targetUrl string, err error) {
|
||||
err = filerClient.WithFilerClient(func(client filer_pb.SeaweedFilerClient) error {
|
||||
vid := VolumeId(fileId)
|
||||
resp, err := client.LookupVolume(context.Background(), &filer_pb.LookupVolumeRequest{
|
||||
VolumeIds: []string{vid},
|
||||
})
|
||||
if err != nil {
|
||||
return err
|
||||
}
|
||||
|
||||
locations := resp.LocationsMap[vid]
|
||||
if locations == nil || len(locations.Locations) == 0 {
|
||||
glog.V(0).Infof("failed to locate %s", fileId)
|
||||
return fmt.Errorf("failed to locate %s", fileId)
|
||||
}
|
||||
|
||||
volumeServerAddress := filerClient.AdjustedUrl(locations.Locations[0].Url)
|
||||
|
||||
targetUrl = fmt.Sprintf("http://%s/%s", volumeServerAddress, fileId)
|
||||
|
||||
return nil
|
||||
})
|
||||
return
|
||||
}
|
||||
}
|
||||
|
||||
func NewChunkReaderAtFromClient(filerClient filer_pb.FilerClient, chunkViews []*ChunkView, chunkCache *chunk_cache.ChunkCache) *ChunkReadAt {
|
||||
|
||||
return &ChunkReadAt{
|
||||
chunkViews: chunkViews,
|
||||
lookupFileId: func(fileId string) (targetUrl string, err error) {
|
||||
err = filerClient.WithFilerClient(func(client filer_pb.SeaweedFilerClient) error {
|
||||
vid := VolumeId(fileId)
|
||||
resp, err := client.LookupVolume(context.Background(), &filer_pb.LookupVolumeRequest{
|
||||
VolumeIds: []string{vid},
|
||||
})
|
||||
if err != nil {
|
||||
return err
|
||||
}
|
||||
|
||||
locations := resp.LocationsMap[vid]
|
||||
if locations == nil || len(locations.Locations) == 0 {
|
||||
glog.V(0).Infof("failed to locate %s", fileId)
|
||||
return fmt.Errorf("failed to locate %s", fileId)
|
||||
}
|
||||
|
||||
volumeServerAddress := filerClient.AdjustedUrl(locations.Locations[0].Url)
|
||||
|
||||
targetUrl = fmt.Sprintf("http://%s/%s", volumeServerAddress, fileId)
|
||||
|
||||
return nil
|
||||
})
|
||||
return
|
||||
},
|
||||
chunkViews: chunkViews,
|
||||
lookupFileId: LookupFn(filerClient),
|
||||
bufferOffset: -1,
|
||||
chunkCache: chunkCache,
|
||||
}
|
||||
|
||||
+56
-10
@@ -44,15 +44,44 @@ func StreamContent(masterClient *wdclient.MasterClient, w io.Writer, chunks []*f
|
||||
|
||||
}
|
||||
|
||||
// ---------------- ReadAllReader ----------------------------------
|
||||
|
||||
func ReadAll(masterClient *wdclient.MasterClient, chunks []*filer_pb.FileChunk) ([]byte, error) {
|
||||
|
||||
buffer := bytes.Buffer{}
|
||||
|
||||
chunkViews := ViewFromChunks(chunks, 0, math.MaxInt32)
|
||||
|
||||
lookupFileId := func(fileId string) (targetUrl string, err error) {
|
||||
return masterClient.LookupFileId(fileId)
|
||||
}
|
||||
|
||||
for _, chunkView := range chunkViews {
|
||||
urlString, err := lookupFileId(chunkView.FileId)
|
||||
if err != nil {
|
||||
glog.V(1).Infof("operation LookupFileId %s failed, err: %v", chunkView.FileId, err)
|
||||
return nil, err
|
||||
}
|
||||
err = util.ReadUrlAsStream(urlString, chunkView.CipherKey, chunkView.IsGzipped, chunkView.IsFullChunk(), chunkView.Offset, int(chunkView.Size), func(data []byte) {
|
||||
buffer.Write(data)
|
||||
})
|
||||
if err != nil {
|
||||
glog.V(1).Infof("read %s failed, err: %v", chunkView.FileId, err)
|
||||
return nil, err
|
||||
}
|
||||
}
|
||||
return buffer.Bytes(), nil
|
||||
}
|
||||
|
||||
// ---------------- ChunkStreamReader ----------------------------------
|
||||
type ChunkStreamReader struct {
|
||||
masterClient *wdclient.MasterClient
|
||||
chunkViews []*ChunkView
|
||||
logicOffset int64
|
||||
buffer []byte
|
||||
bufferOffset int64
|
||||
bufferPos int
|
||||
chunkIndex int
|
||||
lookupFileId func(fileId string) (targetUrl string, err error)
|
||||
lookupFileId LookupFileIdFunctionType
|
||||
}
|
||||
|
||||
var _ = io.ReadSeeker(&ChunkStreamReader{})
|
||||
@@ -69,17 +98,30 @@ func NewChunkStreamReaderFromFiler(masterClient *wdclient.MasterClient, chunks [
|
||||
}
|
||||
}
|
||||
|
||||
func NewChunkStreamReader(filerClient filer_pb.FilerClient, chunks []*filer_pb.FileChunk) *ChunkStreamReader {
|
||||
|
||||
chunkViews := ViewFromChunks(chunks, 0, math.MaxInt32)
|
||||
|
||||
return &ChunkStreamReader{
|
||||
chunkViews: chunkViews,
|
||||
lookupFileId: LookupFn(filerClient),
|
||||
}
|
||||
}
|
||||
|
||||
func (c *ChunkStreamReader) Read(p []byte) (n int, err error) {
|
||||
if c.isBufferEmpty() {
|
||||
if c.chunkIndex >= len(c.chunkViews) {
|
||||
return 0, io.EOF
|
||||
for n < len(p) {
|
||||
if c.isBufferEmpty() {
|
||||
if c.chunkIndex >= len(c.chunkViews) {
|
||||
return n, io.EOF
|
||||
}
|
||||
chunkView := c.chunkViews[c.chunkIndex]
|
||||
c.fetchChunkToBuffer(chunkView)
|
||||
c.chunkIndex++
|
||||
}
|
||||
chunkView := c.chunkViews[c.chunkIndex]
|
||||
c.fetchChunkToBuffer(chunkView)
|
||||
c.chunkIndex++
|
||||
t := copy(p[n:], c.buffer[c.bufferPos:])
|
||||
c.bufferPos += t
|
||||
n += t
|
||||
}
|
||||
n = copy(p, c.buffer[c.bufferPos:])
|
||||
c.bufferPos += n
|
||||
return
|
||||
}
|
||||
|
||||
@@ -144,6 +186,10 @@ func (c *ChunkStreamReader) fetchChunkToBuffer(chunkView *ChunkView) error {
|
||||
return nil
|
||||
}
|
||||
|
||||
func (c *ChunkStreamReader) Close() {
|
||||
// TODO try to release and reuse buffer
|
||||
}
|
||||
|
||||
func VolumeId(fileId string) string {
|
||||
lastCommaIndex := strings.LastIndex(fileId, ",")
|
||||
if lastCommaIndex > 0 {
|
||||
|
||||
+25
-1
@@ -7,6 +7,7 @@ import (
|
||||
"strings"
|
||||
"time"
|
||||
|
||||
"github.com/chrislusf/seaweedfs/weed/filer2"
|
||||
"github.com/chrislusf/seaweedfs/weed/glog"
|
||||
"github.com/chrislusf/seaweedfs/weed/pb/filer_pb"
|
||||
"github.com/chrislusf/seaweedfs/weed/util"
|
||||
@@ -137,6 +138,11 @@ func (dir *Dir) Create(ctx context.Context, req *fuse.CreateRequest,
|
||||
}
|
||||
return fuse.EIO
|
||||
}
|
||||
|
||||
if dir.wfs.option.AsyncMetaDataCaching {
|
||||
dir.wfs.metaCache.InsertEntry(context.Background(), filer2.FromPbEntry(request.Directory, request.Entry))
|
||||
}
|
||||
|
||||
return nil
|
||||
}); err != nil {
|
||||
return nil, nil, err
|
||||
@@ -184,6 +190,10 @@ func (dir *Dir) Mkdir(ctx context.Context, req *fuse.MkdirRequest) (fs.Node, err
|
||||
return err
|
||||
}
|
||||
|
||||
if dir.wfs.option.AsyncMetaDataCaching {
|
||||
dir.wfs.metaCache.InsertEntry(context.Background(), filer2.FromPbEntry(request.Directory, request.Entry))
|
||||
}
|
||||
|
||||
return nil
|
||||
})
|
||||
|
||||
@@ -253,7 +263,7 @@ func (dir *Dir) ReadDirAll(ctx context.Context) (ret []fuse.Dirent, err error) {
|
||||
glog.V(3).Infof("dir ReadDirAll %s", dir.FullPath())
|
||||
|
||||
cacheTtl := 5 * time.Minute
|
||||
processEachEntryFn := func(entry *filer_pb.Entry, isLast bool) {
|
||||
processEachEntryFn := func(entry *filer_pb.Entry, isLast bool) error {
|
||||
fullpath := util.NewFullPath(dir.FullPath(), entry.Name)
|
||||
inode := fullpath.AsInode()
|
||||
if entry.IsDirectory {
|
||||
@@ -264,6 +274,7 @@ func (dir *Dir) ReadDirAll(ctx context.Context) (ret []fuse.Dirent, err error) {
|
||||
ret = append(ret, dirent)
|
||||
}
|
||||
dir.wfs.cacheSet(fullpath, entry, cacheTtl)
|
||||
return nil
|
||||
}
|
||||
|
||||
if dir.wfs.option.AsyncMetaDataCaching {
|
||||
@@ -313,6 +324,10 @@ func (dir *Dir) removeOneFile(req *fuse.RemoveRequest) error {
|
||||
dir.wfs.cacheDelete(filePath)
|
||||
dir.wfs.fsNodeCache.DeleteFsNode(filePath)
|
||||
|
||||
if dir.wfs.option.AsyncMetaDataCaching {
|
||||
dir.wfs.metaCache.DeleteEntry(context.Background(), filePath)
|
||||
}
|
||||
|
||||
glog.V(3).Infof("remove file: %v", req)
|
||||
err = filer_pb.Remove(dir.wfs, dir.FullPath(), req.Name, false, false, false)
|
||||
if err != nil {
|
||||
@@ -330,12 +345,17 @@ func (dir *Dir) removeFolder(req *fuse.RemoveRequest) error {
|
||||
dir.wfs.cacheDelete(t)
|
||||
dir.wfs.fsNodeCache.DeleteFsNode(t)
|
||||
|
||||
if dir.wfs.option.AsyncMetaDataCaching {
|
||||
dir.wfs.metaCache.DeleteEntry(context.Background(), t)
|
||||
}
|
||||
|
||||
glog.V(3).Infof("remove directory entry: %v", req)
|
||||
err := filer_pb.Remove(dir.wfs, dir.FullPath(), req.Name, true, false, false)
|
||||
if err != nil {
|
||||
glog.V(3).Infof("not found remove %s/%s: %v", dir.FullPath(), req.Name, err)
|
||||
return fuse.ENOENT
|
||||
}
|
||||
|
||||
return nil
|
||||
|
||||
}
|
||||
@@ -458,6 +478,10 @@ func (dir *Dir) saveEntry() error {
|
||||
return fuse.EIO
|
||||
}
|
||||
|
||||
if dir.wfs.option.AsyncMetaDataCaching {
|
||||
dir.wfs.metaCache.UpdateEntry(context.Background(), filer2.FromPbEntry(request.Directory, request.Entry))
|
||||
}
|
||||
|
||||
return nil
|
||||
})
|
||||
}
|
||||
|
||||
@@ -6,6 +6,7 @@ import (
|
||||
"syscall"
|
||||
"time"
|
||||
|
||||
"github.com/chrislusf/seaweedfs/weed/filer2"
|
||||
"github.com/chrislusf/seaweedfs/weed/glog"
|
||||
"github.com/chrislusf/seaweedfs/weed/pb/filer_pb"
|
||||
"github.com/seaweedfs/fuse"
|
||||
@@ -40,6 +41,11 @@ func (dir *Dir) Symlink(ctx context.Context, req *fuse.SymlinkRequest) (fs.Node,
|
||||
glog.V(0).Infof("symlink %s/%s: %v", dir.FullPath(), req.NewName, err)
|
||||
return fuse.EIO
|
||||
}
|
||||
|
||||
if dir.wfs.option.AsyncMetaDataCaching {
|
||||
dir.wfs.metaCache.InsertEntry(context.Background(), filer2.FromPbEntry(request.Directory, request.Entry))
|
||||
}
|
||||
|
||||
return nil
|
||||
})
|
||||
|
||||
|
||||
@@ -187,15 +187,7 @@ func (pages *ContinuousDirtyPages) saveToStorage(reader io.Reader, offset int64,
|
||||
}
|
||||
pages.f.wfs.chunkCache.SetChunk(fileId, data)
|
||||
|
||||
return &filer_pb.FileChunk{
|
||||
FileId: fileId,
|
||||
Offset: offset,
|
||||
Size: uint64(size),
|
||||
Mtime: time.Now().UnixNano(),
|
||||
ETag: uploadResult.ETag,
|
||||
CipherKey: uploadResult.CipherKey,
|
||||
IsGzipped: uploadResult.Gzip > 0,
|
||||
}, nil
|
||||
return uploadResult.ToPbFileChunk(fileId, offset), nil
|
||||
|
||||
}
|
||||
|
||||
|
||||
@@ -217,10 +217,9 @@ func (file *File) Fsync(ctx context.Context, req *fuse.FsyncRequest) error {
|
||||
}
|
||||
|
||||
func (file *File) Forget() {
|
||||
glog.V(3).Infof("Forget file %s/%s", file.dir.FullPath(), file.Name)
|
||||
|
||||
file.wfs.fsNodeCache.DeleteFsNode(util.NewFullPath(file.dir.FullPath(), file.Name))
|
||||
|
||||
t := util.NewFullPath(file.dir.FullPath(), file.Name)
|
||||
glog.V(3).Infof("Forget file %s", t)
|
||||
file.wfs.fsNodeCache.DeleteFsNode(t)
|
||||
}
|
||||
|
||||
func (file *File) maybeLoadEntry(ctx context.Context) error {
|
||||
@@ -279,6 +278,10 @@ func (file *File) saveEntry() error {
|
||||
return fuse.EIO
|
||||
}
|
||||
|
||||
if file.wfs.option.AsyncMetaDataCaching {
|
||||
file.wfs.metaCache.UpdateEntry(context.Background(), filer2.FromPbEntry(request.Directory, request.Entry))
|
||||
}
|
||||
|
||||
return nil
|
||||
})
|
||||
}
|
||||
@@ -209,6 +209,10 @@ func (fh *FileHandle) Flush(ctx context.Context, req *fuse.FlushRequest) error {
|
||||
return fmt.Errorf("fh flush create %s: %v", fh.f.fullpath(), err)
|
||||
}
|
||||
|
||||
if fh.f.wfs.option.AsyncMetaDataCaching {
|
||||
fh.f.wfs.metaCache.InsertEntry(context.Background(), filer2.FromPbEntry(request.Directory, request.Entry))
|
||||
}
|
||||
|
||||
fh.f.wfs.deleteFileChunks(garbages)
|
||||
for i, chunk := range garbages {
|
||||
glog.V(3).Infof("garbage %s chunks %d: %v [%d,%d)", fh.f.fullpath(), i, chunk.FileId, chunk.Offset, chunk.Offset+int64(chunk.Size))
|
||||
|
||||
@@ -1,20 +1,24 @@
|
||||
package meta_cache
|
||||
|
||||
import (
|
||||
"context"
|
||||
"os"
|
||||
"sync"
|
||||
|
||||
"github.com/chrislusf/seaweedfs/weed/filer2"
|
||||
"github.com/chrislusf/seaweedfs/weed/filer2/leveldb"
|
||||
"github.com/chrislusf/seaweedfs/weed/glog"
|
||||
"github.com/chrislusf/seaweedfs/weed/util"
|
||||
)
|
||||
|
||||
type MetaCache struct {
|
||||
filer2.FilerStore
|
||||
actualStore filer2.FilerStore
|
||||
sync.RWMutex
|
||||
}
|
||||
|
||||
func NewMetaCache(dbFolder string) *MetaCache {
|
||||
return &MetaCache{
|
||||
FilerStore: openMetaStore(dbFolder),
|
||||
actualStore: openMetaStore(dbFolder),
|
||||
}
|
||||
}
|
||||
|
||||
@@ -34,4 +38,56 @@ func openMetaStore(dbFolder string) filer2.FilerStore {
|
||||
|
||||
return store
|
||||
|
||||
}
|
||||
}
|
||||
|
||||
func (mc *MetaCache) InsertEntry(ctx context.Context, entry *filer2.Entry) error {
|
||||
mc.Lock()
|
||||
defer mc.Unlock()
|
||||
return mc.actualStore.InsertEntry(ctx, entry)
|
||||
}
|
||||
|
||||
func (mc *MetaCache) AtomicUpdateEntry(ctx context.Context, oldPath util.FullPath, newEntry *filer2.Entry) error {
|
||||
mc.Lock()
|
||||
defer mc.Unlock()
|
||||
if oldPath != "" {
|
||||
if err := mc.actualStore.DeleteEntry(ctx, oldPath); err != nil {
|
||||
return err
|
||||
}
|
||||
}
|
||||
if newEntry != nil {
|
||||
if err := mc.actualStore.InsertEntry(ctx, newEntry); err != nil {
|
||||
return err
|
||||
}
|
||||
}
|
||||
return nil
|
||||
}
|
||||
|
||||
func (mc *MetaCache) UpdateEntry(ctx context.Context, entry *filer2.Entry) error {
|
||||
mc.Lock()
|
||||
defer mc.Unlock()
|
||||
return mc.actualStore.UpdateEntry(ctx, entry)
|
||||
}
|
||||
|
||||
func (mc *MetaCache) FindEntry(ctx context.Context, fp util.FullPath) (entry *filer2.Entry, err error) {
|
||||
mc.RLock()
|
||||
defer mc.RUnlock()
|
||||
return mc.actualStore.FindEntry(ctx, fp)
|
||||
}
|
||||
|
||||
func (mc *MetaCache) DeleteEntry(ctx context.Context, fp util.FullPath) (err error) {
|
||||
mc.Lock()
|
||||
defer mc.Unlock()
|
||||
return mc.actualStore.DeleteEntry(ctx, fp)
|
||||
}
|
||||
|
||||
func (mc *MetaCache) ListDirectoryEntries(ctx context.Context, dirPath util.FullPath, startFileName string, includeStartFile bool, limit int) ([]*filer2.Entry, error) {
|
||||
mc.RLock()
|
||||
defer mc.RUnlock()
|
||||
return mc.actualStore.ListDirectoryEntries(ctx, dirPath, startFileName, includeStartFile, limit)
|
||||
}
|
||||
|
||||
func (mc *MetaCache) Shutdown() {
|
||||
mc.Lock()
|
||||
defer mc.Unlock()
|
||||
mc.actualStore.Shutdown()
|
||||
}
|
||||
@@ -10,6 +10,7 @@ import (
|
||||
)
|
||||
|
||||
func InitMetaCache(mc *MetaCache, client filer_pb.FilerClient, path string) error {
|
||||
glog.V(0).Infof("synchronizing meta data ...")
|
||||
filer_pb.TraverseBfs(client, util.FullPath(path), func(parentPath util.FullPath, pbEntry *filer_pb.Entry) {
|
||||
entry := filer2.FromPbEntry(string(parentPath), pbEntry)
|
||||
if err := mc.InsertEntry(context.Background(), entry); err != nil {
|
||||
|
||||
@@ -12,16 +12,15 @@ import (
|
||||
"github.com/chrislusf/seaweedfs/weed/util"
|
||||
)
|
||||
|
||||
func SubscribeMetaEvents(mc *MetaCache, client filer_pb.FilerClient, dir string) error {
|
||||
func SubscribeMetaEvents(mc *MetaCache, client filer_pb.FilerClient, dir string, lastTsNs int64) error {
|
||||
|
||||
processEventFn := func(resp *filer_pb.SubscribeMetadataResponse) error {
|
||||
message := resp.EventNotification
|
||||
ctx := context.Background()
|
||||
var err error
|
||||
var oldPath util.FullPath
|
||||
var newEntry *filer2.Entry
|
||||
if message.OldEntry != nil {
|
||||
key := util.NewFullPath(resp.Directory, message.OldEntry.Name)
|
||||
glog.V(4).Infof("deleting %v", key)
|
||||
err = mc.DeleteEntry(ctx, key)
|
||||
oldPath = util.NewFullPath(resp.Directory, message.OldEntry.Name)
|
||||
glog.V(4).Infof("deleting %v", oldPath)
|
||||
}
|
||||
|
||||
if message.NewEntry != nil {
|
||||
@@ -31,12 +30,11 @@ func SubscribeMetaEvents(mc *MetaCache, client filer_pb.FilerClient, dir string)
|
||||
}
|
||||
key := util.NewFullPath(dir, message.NewEntry.Name)
|
||||
glog.V(4).Infof("creating %v", key)
|
||||
err = mc.InsertEntry(ctx, filer2.FromPbEntry(dir, message.NewEntry))
|
||||
newEntry = filer2.FromPbEntry(dir, message.NewEntry)
|
||||
}
|
||||
return err
|
||||
return mc.AtomicUpdateEntry(context.Background(), oldPath, newEntry)
|
||||
}
|
||||
|
||||
var lastTsNs int64
|
||||
for {
|
||||
err := client.WithFilerClient(func(client filer_pb.SeaweedFilerClient) error {
|
||||
stream, err := client.SubscribeMetadata(context.Background(), &filer_pb.SubscribeMetadataRequest{
|
||||
|
||||
+8
-4
@@ -10,6 +10,7 @@ import (
|
||||
"sync"
|
||||
"time"
|
||||
|
||||
"github.com/chrislusf/seaweedfs/weed/util/grace"
|
||||
"github.com/karlseguin/ccache"
|
||||
"google.golang.org/grpc"
|
||||
|
||||
@@ -89,17 +90,18 @@ func NewSeaweedFileSystem(option *Option) *WFS {
|
||||
}
|
||||
if option.CacheSizeMB > 0 {
|
||||
wfs.chunkCache = chunk_cache.NewChunkCache(256, option.CacheDir, option.CacheSizeMB)
|
||||
util.OnInterrupt(func() {
|
||||
grace.OnInterrupt(func() {
|
||||
wfs.chunkCache.Shutdown()
|
||||
})
|
||||
}
|
||||
if wfs.option.AsyncMetaDataCaching {
|
||||
wfs.metaCache = meta_cache.NewMetaCache(path.Join(option.CacheDir, "meta"))
|
||||
if err := meta_cache.InitMetaCache(wfs.metaCache, wfs, wfs.option.FilerMountRootPath); err != nil{
|
||||
startTime := time.Now()
|
||||
if err := meta_cache.InitMetaCache(wfs.metaCache, wfs, wfs.option.FilerMountRootPath); err != nil {
|
||||
glog.V(0).Infof("failed to init meta cache: %v", err)
|
||||
} else {
|
||||
go meta_cache.SubscribeMetaEvents(wfs.metaCache, wfs, wfs.option.FilerMountRootPath)
|
||||
util.OnInterrupt(func() {
|
||||
go meta_cache.SubscribeMetaEvents(wfs.metaCache, wfs, wfs.option.FilerMountRootPath, startTime.UnixNano())
|
||||
grace.OnInterrupt(func() {
|
||||
wfs.metaCache.Shutdown()
|
||||
})
|
||||
}
|
||||
@@ -115,6 +117,8 @@ func (wfs *WFS) Root() (fs.Node, error) {
|
||||
return wfs.root, nil
|
||||
}
|
||||
|
||||
var _ = filer_pb.FilerClient(&WFS{})
|
||||
|
||||
func (wfs *WFS) WithFilerClient(fn func(filer_pb.SeaweedFilerClient) error) error {
|
||||
|
||||
err := pb.WithCachedGrpcClient(func(grpcConnection *grpc.ClientConn) error {
|
||||
|
||||
@@ -3,7 +3,7 @@ package broker
|
||||
import (
|
||||
"context"
|
||||
"fmt"
|
||||
"time"
|
||||
"io"
|
||||
|
||||
"github.com/chrislusf/seaweedfs/weed/glog"
|
||||
"github.com/chrislusf/seaweedfs/weed/operation"
|
||||
@@ -23,22 +23,13 @@ func (broker *MessageBroker) appendToFile(targetFile string, topicConfig *messag
|
||||
|
||||
dir, name := util.FullPath(targetFile).DirAndName()
|
||||
|
||||
chunk := &filer_pb.FileChunk{
|
||||
FileId: assignResult.Fid,
|
||||
Offset: 0, // needs to be fixed during appending
|
||||
Size: uint64(uploadResult.Size),
|
||||
Mtime: time.Now().UnixNano(),
|
||||
ETag: uploadResult.ETag,
|
||||
IsGzipped: uploadResult.Gzip > 0,
|
||||
}
|
||||
|
||||
// append the chunk
|
||||
if err := broker.WithFilerClient(func(client filer_pb.SeaweedFilerClient) error {
|
||||
|
||||
request := &filer_pb.AppendToEntryRequest{
|
||||
Directory: dir,
|
||||
EntryName: name,
|
||||
Chunks: []*filer_pb.FileChunk{chunk},
|
||||
Chunks: []*filer_pb.FileChunk{uploadResult.ToPbFileChunk(assignResult.Fid, 0)},
|
||||
}
|
||||
|
||||
_, err := client.AppendToEntry(context.Background(), request)
|
||||
@@ -98,10 +89,15 @@ func (broker *MessageBroker) assignAndUpload(topicConfig *messaging_pb.TopicConf
|
||||
return assignResult, uploadResult, nil
|
||||
}
|
||||
|
||||
var _ = filer_pb.FilerClient(&MessageBroker{})
|
||||
|
||||
func (broker *MessageBroker) WithFilerClient(fn func(filer_pb.SeaweedFilerClient) error) (err error) {
|
||||
|
||||
for _, filer := range broker.option.Filers {
|
||||
if err = pb.WithFilerClient(filer, broker.grpcDialOption, fn); err != nil {
|
||||
if err == io.EOF {
|
||||
return
|
||||
}
|
||||
glog.V(0).Infof("fail to connect to %s: %v", filer, err)
|
||||
} else {
|
||||
break
|
||||
@@ -111,3 +107,7 @@ func (broker *MessageBroker) WithFilerClient(fn func(filer_pb.SeaweedFilerClient
|
||||
return
|
||||
|
||||
}
|
||||
|
||||
func (broker *MessageBroker) AdjustedUrl(hostAndPort string) string {
|
||||
return hostAndPort
|
||||
}
|
||||
@@ -2,7 +2,10 @@ package broker
|
||||
|
||||
import (
|
||||
"context"
|
||||
"fmt"
|
||||
|
||||
"github.com/chrislusf/seaweedfs/weed/filer2"
|
||||
"github.com/chrislusf/seaweedfs/weed/pb/filer_pb"
|
||||
"github.com/chrislusf/seaweedfs/weed/pb/messaging_pb"
|
||||
)
|
||||
|
||||
@@ -10,6 +13,25 @@ func (broker *MessageBroker) ConfigureTopic(c context.Context, request *messagin
|
||||
panic("implement me")
|
||||
}
|
||||
|
||||
func (broker *MessageBroker) DeleteTopic(c context.Context, request *messaging_pb.DeleteTopicRequest) (*messaging_pb.DeleteTopicResponse, error) {
|
||||
resp := &messaging_pb.DeleteTopicResponse{}
|
||||
dir, entry := genTopicDirEntry(request.Namespace, request.Topic)
|
||||
if exists, err := filer_pb.Exists(broker, dir, entry, true); err != nil {
|
||||
return nil, err
|
||||
} else if exists {
|
||||
err = filer_pb.Remove(broker, dir, entry, true, true, true)
|
||||
}
|
||||
return resp, nil
|
||||
}
|
||||
|
||||
func (broker *MessageBroker) GetTopicConfiguration(c context.Context, request *messaging_pb.GetTopicConfigurationRequest) (*messaging_pb.GetTopicConfigurationResponse, error) {
|
||||
panic("implement me")
|
||||
}
|
||||
|
||||
func genTopicDir(namespace, topic string) string {
|
||||
return fmt.Sprintf("%s/%s/%s", filer2.TopicsDir, namespace, topic)
|
||||
}
|
||||
|
||||
func genTopicDirEntry(namespace, topic string) (dir, entry string) {
|
||||
return fmt.Sprintf("%s/%s", filer2.TopicsDir, namespace), topic
|
||||
}
|
||||
@@ -0,0 +1,116 @@
|
||||
package broker
|
||||
|
||||
import (
|
||||
"context"
|
||||
"fmt"
|
||||
"time"
|
||||
|
||||
"github.com/chrislusf/seaweedfs/weed/glog"
|
||||
"github.com/chrislusf/seaweedfs/weed/pb/filer_pb"
|
||||
"github.com/chrislusf/seaweedfs/weed/pb/master_pb"
|
||||
"github.com/chrislusf/seaweedfs/weed/pb/messaging_pb"
|
||||
)
|
||||
|
||||
/*
|
||||
Topic discovery:
|
||||
|
||||
When pub or sub connects, it ask for the whole broker list, and run consistent hashing to find the broker.
|
||||
|
||||
The broker will check peers whether it is already hosted by some other broker, if that broker is alive and acknowledged alive, redirect to it.
|
||||
Otherwise, just host the topic.
|
||||
|
||||
So, if the pub or sub connects around the same time, they would connect to the same broker. Everyone is happy.
|
||||
If one of the pub or sub connects very late, and the system topo changed quite a bit with new servers added or old servers died, checking peers will help.
|
||||
|
||||
*/
|
||||
|
||||
func (broker *MessageBroker) FindBroker(c context.Context, request *messaging_pb.FindBrokerRequest) (*messaging_pb.FindBrokerResponse, error) {
|
||||
|
||||
t := &messaging_pb.FindBrokerResponse{}
|
||||
var peers []string
|
||||
|
||||
targetTopicPartition := fmt.Sprintf(TopicPartitionFmt, request.Namespace, request.Topic, request.Parition)
|
||||
|
||||
for _, filer := range broker.option.Filers {
|
||||
err := broker.withFilerClient(filer, func(client filer_pb.SeaweedFilerClient) error {
|
||||
resp, err := client.LocateBroker(context.Background(), &filer_pb.LocateBrokerRequest{
|
||||
Resource: targetTopicPartition,
|
||||
})
|
||||
if err != nil {
|
||||
return err
|
||||
}
|
||||
if resp.Found && len(resp.Resources) > 0 {
|
||||
t.Broker = resp.Resources[0].GrpcAddresses
|
||||
return nil
|
||||
}
|
||||
for _, b := range resp.Resources {
|
||||
peers = append(peers, b.GrpcAddresses)
|
||||
}
|
||||
return nil
|
||||
})
|
||||
if err != nil {
|
||||
return nil, err
|
||||
}
|
||||
}
|
||||
|
||||
t.Broker = PickMember(peers, []byte(targetTopicPartition))
|
||||
|
||||
return t, nil
|
||||
|
||||
}
|
||||
|
||||
func (broker *MessageBroker) checkFilers() {
|
||||
|
||||
// contact a filer about masters
|
||||
var masters []string
|
||||
found := false
|
||||
for !found {
|
||||
for _, filer := range broker.option.Filers {
|
||||
err := broker.withFilerClient(filer, func(client filer_pb.SeaweedFilerClient) error {
|
||||
resp, err := client.GetFilerConfiguration(context.Background(), &filer_pb.GetFilerConfigurationRequest{})
|
||||
if err != nil {
|
||||
return err
|
||||
}
|
||||
masters = append(masters, resp.Masters...)
|
||||
return nil
|
||||
})
|
||||
if err == nil {
|
||||
found = true
|
||||
break
|
||||
}
|
||||
glog.V(0).Infof("failed to read masters from %+v: %v", broker.option.Filers, err)
|
||||
time.Sleep(time.Second)
|
||||
}
|
||||
}
|
||||
glog.V(0).Infof("received master list: %s", masters)
|
||||
|
||||
// contact each masters for filers
|
||||
var filers []string
|
||||
found = false
|
||||
for !found {
|
||||
for _, master := range masters {
|
||||
err := broker.withMasterClient(master, func(client master_pb.SeaweedClient) error {
|
||||
resp, err := client.ListMasterClients(context.Background(), &master_pb.ListMasterClientsRequest{
|
||||
ClientType: "filer",
|
||||
})
|
||||
if err != nil {
|
||||
return err
|
||||
}
|
||||
|
||||
filers = append(filers, resp.GrpcAddresses...)
|
||||
|
||||
return nil
|
||||
})
|
||||
if err == nil {
|
||||
found = true
|
||||
break
|
||||
}
|
||||
glog.V(0).Infof("failed to list filers: %v", err)
|
||||
time.Sleep(time.Second)
|
||||
}
|
||||
}
|
||||
glog.V(0).Infof("received filer list: %s", filers)
|
||||
|
||||
broker.option.Filers = filers
|
||||
|
||||
}
|
||||
@@ -1,11 +1,15 @@
|
||||
package broker
|
||||
|
||||
import (
|
||||
"crypto/md5"
|
||||
"fmt"
|
||||
"io"
|
||||
|
||||
"github.com/golang/protobuf/proto"
|
||||
|
||||
"github.com/chrislusf/seaweedfs/weed/filer2"
|
||||
"github.com/chrislusf/seaweedfs/weed/glog"
|
||||
"github.com/chrislusf/seaweedfs/weed/pb/filer_pb"
|
||||
"github.com/chrislusf/seaweedfs/weed/pb/messaging_pb"
|
||||
)
|
||||
|
||||
@@ -22,7 +26,7 @@ func (broker *MessageBroker) Publish(stream messaging_pb.SeaweedMessaging_Publis
|
||||
|
||||
// TODO look it up
|
||||
topicConfig := &messaging_pb.TopicConfiguration{
|
||||
IsTransient: true,
|
||||
// IsTransient: true,
|
||||
}
|
||||
|
||||
// send init response
|
||||
@@ -44,27 +48,24 @@ func (broker *MessageBroker) Publish(stream messaging_pb.SeaweedMessaging_Publis
|
||||
Topic: in.Init.Topic,
|
||||
Partition: in.Init.Partition,
|
||||
}
|
||||
tl := broker.topicLocks.RequestLock(tp, topicConfig, true)
|
||||
defer broker.topicLocks.ReleaseLock(tp, true)
|
||||
|
||||
updatesChan := make(chan int32)
|
||||
tpDir := fmt.Sprintf("%s/%s/%s", filer2.TopicsDir, tp.Namespace, tp.Topic)
|
||||
md5File := fmt.Sprintf("p%02d.md5", tp.Partition)
|
||||
// println("chan data stored under", tpDir, "as", md5File)
|
||||
|
||||
go func() {
|
||||
for update := range updatesChan {
|
||||
if err := stream.Send(&messaging_pb.PublishResponse{
|
||||
Config: &messaging_pb.PublishResponse_ConfigMessage{
|
||||
PartitionCount: update,
|
||||
},
|
||||
}); err != nil {
|
||||
glog.V(0).Infof("err sending publish response: %v", err)
|
||||
return
|
||||
}
|
||||
}
|
||||
}()
|
||||
if exists, err := filer_pb.Exists(broker, tpDir, md5File, false); err == nil && exists {
|
||||
return fmt.Errorf("channel is already closed")
|
||||
}
|
||||
|
||||
tl := broker.topicManager.RequestLock(tp, topicConfig, true)
|
||||
defer broker.topicManager.ReleaseLock(tp, true)
|
||||
|
||||
md5hash := md5.New()
|
||||
// process each message
|
||||
for {
|
||||
// println("recv")
|
||||
in, err := stream.Recv()
|
||||
// glog.V(0).Infof("recieved %v err: %v", in, err)
|
||||
if err == io.EOF {
|
||||
return nil
|
||||
}
|
||||
@@ -86,5 +87,26 @@ func (broker *MessageBroker) Publish(stream messaging_pb.SeaweedMessaging_Publis
|
||||
|
||||
tl.logBuffer.AddToBuffer(in.Data.Key, data)
|
||||
|
||||
if in.Data.IsClose {
|
||||
// println("server received closing")
|
||||
break
|
||||
}
|
||||
|
||||
md5hash.Write(in.Data.Value)
|
||||
|
||||
}
|
||||
|
||||
if err := broker.appendToFile(tpDir+"/"+md5File, topicConfig, md5hash.Sum(nil)); err != nil {
|
||||
glog.V(0).Infof("err writing %s: %v", md5File, err)
|
||||
}
|
||||
|
||||
// fmt.Printf("received md5 %X\n", md5hash.Sum(nil))
|
||||
|
||||
// send the close ack
|
||||
// println("server send ack closing")
|
||||
if err := stream.Send(&messaging_pb.PublishResponse{IsClosed: true}); err != nil {
|
||||
glog.V(0).Infof("err sending close response: %v", err)
|
||||
}
|
||||
return nil
|
||||
|
||||
}
|
||||
@@ -3,10 +3,12 @@ package broker
|
||||
import (
|
||||
"fmt"
|
||||
"io"
|
||||
"strings"
|
||||
"time"
|
||||
|
||||
"github.com/golang/protobuf/proto"
|
||||
|
||||
"github.com/chrislusf/seaweedfs/weed/filer2"
|
||||
"github.com/chrislusf/seaweedfs/weed/glog"
|
||||
"github.com/chrislusf/seaweedfs/weed/pb/filer_pb"
|
||||
"github.com/chrislusf/seaweedfs/weed/pb/messaging_pb"
|
||||
@@ -23,22 +25,13 @@ func (broker *MessageBroker) Subscribe(stream messaging_pb.SeaweedMessaging_Subs
|
||||
return err
|
||||
}
|
||||
|
||||
var processedTsNs int64
|
||||
var messageCount int64
|
||||
subscriberId := in.Init.SubscriberId
|
||||
fmt.Printf("+ subscriber %s\n", subscriberId)
|
||||
defer func() {
|
||||
fmt.Printf("- subscriber %s: %d messages\n", subscriberId, messageCount)
|
||||
}()
|
||||
|
||||
// TODO look it up
|
||||
topicConfig := &messaging_pb.TopicConfiguration{
|
||||
IsTransient: true,
|
||||
}
|
||||
|
||||
if err = stream.Send(&messaging_pb.BrokerMessage{
|
||||
Redirect: nil,
|
||||
}); err != nil {
|
||||
return err
|
||||
// IsTransient: true,
|
||||
}
|
||||
|
||||
// get lock
|
||||
@@ -47,8 +40,24 @@ func (broker *MessageBroker) Subscribe(stream messaging_pb.SeaweedMessaging_Subs
|
||||
Topic: in.Init.Topic,
|
||||
Partition: in.Init.Partition,
|
||||
}
|
||||
lock := broker.topicLocks.RequestLock(tp, topicConfig, false)
|
||||
defer broker.topicLocks.ReleaseLock(tp, false)
|
||||
fmt.Printf("+ subscriber %s for %s\n", subscriberId, tp.String())
|
||||
defer func() {
|
||||
fmt.Printf("- subscriber %s for %s %d messages last %v\n", subscriberId, tp.String(), messageCount, time.Unix(0, processedTsNs))
|
||||
}()
|
||||
|
||||
lock := broker.topicManager.RequestLock(tp, topicConfig, false)
|
||||
defer broker.topicManager.ReleaseLock(tp, false)
|
||||
|
||||
isConnected := true
|
||||
go func() {
|
||||
for isConnected {
|
||||
if _, err := stream.Recv(); err != nil {
|
||||
// println("disconnecting connection to", subscriberId, tp.String())
|
||||
isConnected = false
|
||||
lock.cond.Signal()
|
||||
}
|
||||
}
|
||||
}()
|
||||
|
||||
lastReadTime := time.Now()
|
||||
switch in.Init.StartPosition {
|
||||
@@ -56,6 +65,7 @@ func (broker *MessageBroker) Subscribe(stream messaging_pb.SeaweedMessaging_Subs
|
||||
lastReadTime = time.Unix(0, in.Init.TimestampNs)
|
||||
case messaging_pb.SubscriberMessage_InitMessage_LATEST:
|
||||
case messaging_pb.SubscriberMessage_InitMessage_EARLIEST:
|
||||
lastReadTime = time.Unix(0, 0)
|
||||
}
|
||||
|
||||
// how to process each message
|
||||
@@ -70,25 +80,83 @@ func (broker *MessageBroker) Subscribe(stream messaging_pb.SeaweedMessaging_Subs
|
||||
return err
|
||||
}
|
||||
|
||||
messageCount, err = lock.logBuffer.LoopProcessLogData(lastReadTime, func() bool {
|
||||
lock.Mutex.Lock()
|
||||
lock.cond.Wait()
|
||||
lock.Mutex.Unlock()
|
||||
return true
|
||||
}, func(logEntry *filer_pb.LogEntry) error {
|
||||
eachLogEntryFn := func(logEntry *filer_pb.LogEntry) error {
|
||||
m := &messaging_pb.Message{}
|
||||
if err = proto.Unmarshal(logEntry.Data, m); err != nil {
|
||||
glog.Errorf("unexpected unmarshal messaging_pb.Message: %v", err)
|
||||
return err
|
||||
}
|
||||
// fmt.Printf("sending : %d bytes\n", len(m.Value))
|
||||
// fmt.Printf("sending : %d bytes ts %d\n", len(m.Value), logEntry.TsNs)
|
||||
if err = eachMessageFn(m); err != nil {
|
||||
glog.Errorf("sending %d bytes to %s: %s", len(m.Value), subscriberId, err)
|
||||
return err
|
||||
}
|
||||
if m.IsClose {
|
||||
// println("processed EOF")
|
||||
return io.EOF
|
||||
}
|
||||
processedTsNs = logEntry.TsNs
|
||||
messageCount++
|
||||
return nil
|
||||
})
|
||||
}
|
||||
|
||||
if err := broker.readPersistedLogBuffer(&tp, lastReadTime, eachLogEntryFn); err != nil {
|
||||
if err != io.EOF {
|
||||
// println("stopping from persisted logs", err.Error())
|
||||
return err
|
||||
}
|
||||
}
|
||||
|
||||
if processedTsNs != 0 {
|
||||
lastReadTime = time.Unix(0, processedTsNs)
|
||||
}
|
||||
|
||||
// fmt.Printf("subscriber %s read %d on disk log %v\n", subscriberId, messageCount, lastReadTime)
|
||||
|
||||
err = lock.logBuffer.LoopProcessLogData(lastReadTime, func() bool {
|
||||
lock.Mutex.Lock()
|
||||
lock.cond.Wait()
|
||||
lock.Mutex.Unlock()
|
||||
return isConnected
|
||||
}, eachLogEntryFn)
|
||||
|
||||
return err
|
||||
|
||||
}
|
||||
|
||||
func (broker *MessageBroker) readPersistedLogBuffer(tp *TopicPartition, startTime time.Time, eachLogEntryFn func(logEntry *filer_pb.LogEntry) error) (err error) {
|
||||
startDate := fmt.Sprintf("%04d-%02d-%02d", startTime.Year(), startTime.Month(), startTime.Day())
|
||||
startHourMinute := fmt.Sprintf("%02d-%02d.segment", startTime.Hour(), startTime.Minute())
|
||||
|
||||
sizeBuf := make([]byte, 4)
|
||||
startTsNs := startTime.UnixNano()
|
||||
|
||||
topicDir := genTopicDir(tp.Namespace, tp.Topic)
|
||||
partitionSuffix := fmt.Sprintf(".part%02d", tp.Partition)
|
||||
|
||||
return filer_pb.List(broker, topicDir, "", func(dayEntry *filer_pb.Entry, isLast bool) error {
|
||||
dayDir := fmt.Sprintf("%s/%s", topicDir, dayEntry.Name)
|
||||
return filer_pb.List(broker, dayDir, "", func(hourMinuteEntry *filer_pb.Entry, isLast bool) error {
|
||||
if dayEntry.Name == startDate {
|
||||
if strings.Compare(hourMinuteEntry.Name, startHourMinute) < 0 {
|
||||
return nil
|
||||
}
|
||||
}
|
||||
if !strings.HasSuffix(hourMinuteEntry.Name, partitionSuffix) {
|
||||
return nil
|
||||
}
|
||||
// println("partition", tp.Partition, "processing", dayDir, "/", hourMinuteEntry.Name)
|
||||
chunkedFileReader := filer2.NewChunkStreamReader(broker, hourMinuteEntry.Chunks)
|
||||
defer chunkedFileReader.Close()
|
||||
if err := filer2.ReadEachLogEntry(chunkedFileReader, sizeBuf, startTsNs, eachLogEntryFn); err != nil {
|
||||
chunkedFileReader.Close()
|
||||
if err == io.EOF {
|
||||
return err
|
||||
}
|
||||
return fmt.Errorf("reading %s/%s: %v", dayDir, hourMinuteEntry.Name, err)
|
||||
}
|
||||
return nil
|
||||
}, "", false, 24*60)
|
||||
}, startDate, true, 366)
|
||||
|
||||
}
|
||||
@@ -16,6 +16,7 @@ type MessageBrokerOption struct {
|
||||
Filers []string
|
||||
DefaultReplication string
|
||||
MaxMB int
|
||||
Ip string
|
||||
Port int
|
||||
Cipher bool
|
||||
}
|
||||
@@ -23,7 +24,7 @@ type MessageBrokerOption struct {
|
||||
type MessageBroker struct {
|
||||
option *MessageBrokerOption
|
||||
grpcDialOption grpc.DialOption
|
||||
topicLocks *TopicLocks
|
||||
topicManager *TopicManager
|
||||
}
|
||||
|
||||
func NewMessageBroker(option *MessageBrokerOption, grpcDialOption grpc.DialOption) (messageBroker *MessageBroker, err error) {
|
||||
@@ -33,77 +34,66 @@ func NewMessageBroker(option *MessageBrokerOption, grpcDialOption grpc.DialOptio
|
||||
grpcDialOption: grpcDialOption,
|
||||
}
|
||||
|
||||
messageBroker.topicLocks = NewTopicLocks(messageBroker)
|
||||
messageBroker.topicManager = NewTopicManager(messageBroker)
|
||||
|
||||
messageBroker.checkPeers()
|
||||
messageBroker.checkFilers()
|
||||
|
||||
// go messageBroker.loopForEver()
|
||||
go messageBroker.keepConnectedToOneFiler()
|
||||
|
||||
return messageBroker, nil
|
||||
}
|
||||
|
||||
func (broker *MessageBroker) loopForEver() {
|
||||
func (broker *MessageBroker) keepConnectedToOneFiler() {
|
||||
|
||||
for {
|
||||
broker.checkPeers()
|
||||
time.Sleep(3 * time.Second)
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
func (broker *MessageBroker) checkPeers() {
|
||||
|
||||
// contact a filer about masters
|
||||
var masters []string
|
||||
found := false
|
||||
for !found {
|
||||
for _, filer := range broker.option.Filers {
|
||||
err := broker.withFilerClient(filer, func(client filer_pb.SeaweedFilerClient) error {
|
||||
resp, err := client.GetFilerConfiguration(context.Background(), &filer_pb.GetFilerConfigurationRequest{})
|
||||
if err != nil {
|
||||
return err
|
||||
}
|
||||
masters = append(masters, resp.Masters...)
|
||||
return nil
|
||||
})
|
||||
if err == nil {
|
||||
found = true
|
||||
break
|
||||
}
|
||||
glog.V(0).Infof("failed to read masters from %+v: %v", broker.option.Filers, err)
|
||||
time.Sleep(time.Second)
|
||||
}
|
||||
}
|
||||
glog.V(0).Infof("received master list: %s", masters)
|
||||
|
||||
// contact each masters for filers
|
||||
var filers []string
|
||||
found = false
|
||||
for !found {
|
||||
for _, master := range masters {
|
||||
err := broker.withMasterClient(master, func(client master_pb.SeaweedClient) error {
|
||||
resp, err := client.ListMasterClients(context.Background(), &master_pb.ListMasterClientsRequest{
|
||||
ClientType: "filer",
|
||||
})
|
||||
broker.withFilerClient(filer, func(client filer_pb.SeaweedFilerClient) error {
|
||||
stream, err := client.KeepConnected(context.Background())
|
||||
if err != nil {
|
||||
glog.V(0).Infof("%s:%d failed to keep connected to %s: %v", broker.option.Ip, broker.option.Port, filer, err)
|
||||
return err
|
||||
}
|
||||
|
||||
filers = append(filers, resp.GrpcAddresses...)
|
||||
initRequest := &filer_pb.KeepConnectedRequest{
|
||||
Name: broker.option.Ip,
|
||||
GrpcPort: uint32(broker.option.Port),
|
||||
}
|
||||
for _, tp := range broker.topicManager.ListTopicPartitions() {
|
||||
initRequest.Resources = append(initRequest.Resources, tp.String())
|
||||
}
|
||||
if err := stream.Send(&filer_pb.KeepConnectedRequest{
|
||||
Name: broker.option.Ip,
|
||||
GrpcPort: uint32(broker.option.Port),
|
||||
}); err != nil {
|
||||
glog.V(0).Infof("broker %s:%d failed to init at %s: %v", broker.option.Ip, broker.option.Port, filer, err)
|
||||
return err
|
||||
}
|
||||
|
||||
// TODO send events of adding/removing topics
|
||||
|
||||
glog.V(0).Infof("conntected with filer: %v", filer)
|
||||
for {
|
||||
if err := stream.Send(&filer_pb.KeepConnectedRequest{
|
||||
Name: broker.option.Ip,
|
||||
GrpcPort: uint32(broker.option.Port),
|
||||
}); err != nil {
|
||||
glog.V(0).Infof("%s:%d failed to sendto %s: %v", broker.option.Ip, broker.option.Port, filer, err)
|
||||
return err
|
||||
}
|
||||
// println("send heartbeat")
|
||||
if _, err := stream.Recv(); err != nil {
|
||||
glog.V(0).Infof("%s:%d failed to receive from %s: %v", broker.option.Ip, broker.option.Port, filer, err)
|
||||
return err
|
||||
}
|
||||
// println("received reply")
|
||||
time.Sleep(11 * time.Second)
|
||||
// println("woke up")
|
||||
}
|
||||
return nil
|
||||
})
|
||||
if err == nil {
|
||||
found = true
|
||||
break
|
||||
}
|
||||
glog.V(0).Infof("failed to list filers: %v", err)
|
||||
time.Sleep(time.Second)
|
||||
time.Sleep(3 * time.Second)
|
||||
}
|
||||
}
|
||||
glog.V(0).Infof("received filer list: %s", filers)
|
||||
|
||||
broker.option.Filers = filers
|
||||
|
||||
}
|
||||
|
||||
|
||||
@@ -0,0 +1,38 @@
|
||||
package broker
|
||||
|
||||
import (
|
||||
"github.com/buraksezer/consistent"
|
||||
"github.com/cespare/xxhash"
|
||||
)
|
||||
|
||||
type Member string
|
||||
|
||||
func (m Member) String() string {
|
||||
return string(m)
|
||||
}
|
||||
|
||||
type hasher struct{}
|
||||
|
||||
func (h hasher) Sum64(data []byte) uint64 {
|
||||
return xxhash.Sum64(data)
|
||||
}
|
||||
|
||||
func PickMember(members []string, key []byte) string {
|
||||
cfg := consistent.Config{
|
||||
PartitionCount: 9791,
|
||||
ReplicationFactor: 2,
|
||||
Load: 1.25,
|
||||
Hasher: hasher{},
|
||||
}
|
||||
|
||||
cmembers := []consistent.Member{}
|
||||
for _, m := range members {
|
||||
cmembers = append(cmembers, Member(m))
|
||||
}
|
||||
|
||||
c := consistent.New(cmembers, cfg)
|
||||
|
||||
m := c.LocateKey(key)
|
||||
|
||||
return m.String()
|
||||
}
|
||||
@@ -0,0 +1,32 @@
|
||||
package broker
|
||||
|
||||
import (
|
||||
"fmt"
|
||||
"testing"
|
||||
)
|
||||
|
||||
func TestPickMember(t *testing.T) {
|
||||
|
||||
servers := []string{
|
||||
"s1:port",
|
||||
"s2:port",
|
||||
"s3:port",
|
||||
"s5:port",
|
||||
"s4:port",
|
||||
}
|
||||
|
||||
total := 1000
|
||||
|
||||
distribution := make(map[string]int)
|
||||
for i := 0; i < total; i++ {
|
||||
tp := fmt.Sprintf("tp:%2d", i)
|
||||
m := PickMember(servers, []byte(tp))
|
||||
// println(tp, "=>", m)
|
||||
distribution[m]++
|
||||
}
|
||||
|
||||
for member, count := range distribution {
|
||||
fmt.Printf("member: %s, key count: %d load=%.2f\n", member, count, float64(count*100)/float64(total/len(servers)))
|
||||
}
|
||||
|
||||
}
|
||||
@@ -1,103 +0,0 @@
|
||||
package broker
|
||||
|
||||
import (
|
||||
"fmt"
|
||||
"sync"
|
||||
"time"
|
||||
|
||||
"github.com/chrislusf/seaweedfs/weed/filer2"
|
||||
"github.com/chrislusf/seaweedfs/weed/glog"
|
||||
"github.com/chrislusf/seaweedfs/weed/pb/messaging_pb"
|
||||
"github.com/chrislusf/seaweedfs/weed/util/log_buffer"
|
||||
)
|
||||
|
||||
type TopicPartition struct {
|
||||
Namespace string
|
||||
Topic string
|
||||
Partition int32
|
||||
}
|
||||
type TopicLock struct {
|
||||
sync.Mutex
|
||||
cond *sync.Cond
|
||||
subscriberCount int
|
||||
publisherCount int
|
||||
logBuffer *log_buffer.LogBuffer
|
||||
}
|
||||
|
||||
type TopicLocks struct {
|
||||
sync.Mutex
|
||||
locks map[TopicPartition]*TopicLock
|
||||
broker *MessageBroker
|
||||
}
|
||||
|
||||
func NewTopicLocks(messageBroker *MessageBroker) *TopicLocks {
|
||||
return &TopicLocks{
|
||||
locks: make(map[TopicPartition]*TopicLock),
|
||||
broker: messageBroker,
|
||||
}
|
||||
}
|
||||
|
||||
func (locks *TopicLocks) buildLogBuffer(tl *TopicLock, tp TopicPartition, topicConfig *messaging_pb.TopicConfiguration) *log_buffer.LogBuffer {
|
||||
|
||||
flushFn := func(startTime, stopTime time.Time, buf []byte) {
|
||||
|
||||
if topicConfig.IsTransient {
|
||||
return
|
||||
}
|
||||
|
||||
// fmt.Printf("flushing with topic config %+v\n", topicConfig)
|
||||
|
||||
targetFile := fmt.Sprintf(
|
||||
"%s/%s/%s/%04d-%02d-%02d/%02d-%02d.part%02d",
|
||||
filer2.TopicsDir, tp.Namespace, tp.Topic,
|
||||
startTime.Year(), startTime.Month(), startTime.Day(), startTime.Hour(), startTime.Minute(),
|
||||
tp.Partition,
|
||||
)
|
||||
|
||||
if err := locks.broker.appendToFile(targetFile, topicConfig, buf); err != nil {
|
||||
glog.V(0).Infof("log write failed %s: %v", targetFile, err)
|
||||
}
|
||||
}
|
||||
logBuffer := log_buffer.NewLogBuffer(time.Minute, flushFn, func() {
|
||||
tl.cond.Broadcast()
|
||||
})
|
||||
|
||||
return logBuffer
|
||||
}
|
||||
|
||||
func (tl *TopicLocks) RequestLock(partition TopicPartition, topicConfig *messaging_pb.TopicConfiguration, isPublisher bool) *TopicLock {
|
||||
tl.Lock()
|
||||
defer tl.Unlock()
|
||||
|
||||
lock, found := tl.locks[partition]
|
||||
if !found {
|
||||
lock = &TopicLock{}
|
||||
lock.cond = sync.NewCond(&lock.Mutex)
|
||||
tl.locks[partition] = lock
|
||||
lock.logBuffer = tl.buildLogBuffer(lock, partition, topicConfig)
|
||||
}
|
||||
if isPublisher {
|
||||
lock.publisherCount++
|
||||
} else {
|
||||
lock.subscriberCount++
|
||||
}
|
||||
return lock
|
||||
}
|
||||
|
||||
func (tl *TopicLocks) ReleaseLock(partition TopicPartition, isPublisher bool) {
|
||||
tl.Lock()
|
||||
defer tl.Unlock()
|
||||
|
||||
lock, found := tl.locks[partition]
|
||||
if !found {
|
||||
return
|
||||
}
|
||||
if isPublisher {
|
||||
lock.publisherCount--
|
||||
} else {
|
||||
lock.subscriberCount--
|
||||
}
|
||||
if lock.subscriberCount <= 0 && lock.publisherCount <= 0 {
|
||||
delete(tl.locks, partition)
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,123 @@
|
||||
package broker
|
||||
|
||||
import (
|
||||
"fmt"
|
||||
"sync"
|
||||
"time"
|
||||
|
||||
"github.com/chrislusf/seaweedfs/weed/filer2"
|
||||
"github.com/chrislusf/seaweedfs/weed/glog"
|
||||
"github.com/chrislusf/seaweedfs/weed/pb/messaging_pb"
|
||||
"github.com/chrislusf/seaweedfs/weed/util/log_buffer"
|
||||
)
|
||||
|
||||
type TopicPartition struct {
|
||||
Namespace string
|
||||
Topic string
|
||||
Partition int32
|
||||
}
|
||||
|
||||
const (
|
||||
TopicPartitionFmt = "%s/%s_%02d"
|
||||
)
|
||||
|
||||
func (tp *TopicPartition) String() string {
|
||||
return fmt.Sprintf(TopicPartitionFmt, tp.Namespace, tp.Topic, tp.Partition)
|
||||
}
|
||||
|
||||
type TopicControl struct {
|
||||
sync.Mutex
|
||||
cond *sync.Cond
|
||||
subscriberCount int
|
||||
publisherCount int
|
||||
logBuffer *log_buffer.LogBuffer
|
||||
}
|
||||
|
||||
type TopicManager struct {
|
||||
sync.Mutex
|
||||
topicControls map[TopicPartition]*TopicControl
|
||||
broker *MessageBroker
|
||||
}
|
||||
|
||||
func NewTopicManager(messageBroker *MessageBroker) *TopicManager {
|
||||
return &TopicManager{
|
||||
topicControls: make(map[TopicPartition]*TopicControl),
|
||||
broker: messageBroker,
|
||||
}
|
||||
}
|
||||
|
||||
func (tm *TopicManager) buildLogBuffer(tl *TopicControl, tp TopicPartition, topicConfig *messaging_pb.TopicConfiguration) *log_buffer.LogBuffer {
|
||||
|
||||
flushFn := func(startTime, stopTime time.Time, buf []byte) {
|
||||
|
||||
if topicConfig.IsTransient {
|
||||
// return
|
||||
}
|
||||
|
||||
// fmt.Printf("flushing with topic config %+v\n", topicConfig)
|
||||
|
||||
targetFile := fmt.Sprintf(
|
||||
"%s/%s/%s/%04d-%02d-%02d/%02d-%02d.part%02d",
|
||||
filer2.TopicsDir, tp.Namespace, tp.Topic,
|
||||
startTime.Year(), startTime.Month(), startTime.Day(), startTime.Hour(), startTime.Minute(),
|
||||
tp.Partition,
|
||||
)
|
||||
|
||||
if err := tm.broker.appendToFile(targetFile, topicConfig, buf); err != nil {
|
||||
glog.V(0).Infof("log write failed %s: %v", targetFile, err)
|
||||
}
|
||||
}
|
||||
logBuffer := log_buffer.NewLogBuffer(time.Minute, flushFn, func() {
|
||||
tl.cond.Broadcast()
|
||||
})
|
||||
|
||||
return logBuffer
|
||||
}
|
||||
|
||||
func (tm *TopicManager) RequestLock(partition TopicPartition, topicConfig *messaging_pb.TopicConfiguration, isPublisher bool) *TopicControl {
|
||||
tm.Lock()
|
||||
defer tm.Unlock()
|
||||
|
||||
tc, found := tm.topicControls[partition]
|
||||
if !found {
|
||||
tc = &TopicControl{}
|
||||
tc.cond = sync.NewCond(&tc.Mutex)
|
||||
tm.topicControls[partition] = tc
|
||||
tc.logBuffer = tm.buildLogBuffer(tc, partition, topicConfig)
|
||||
}
|
||||
if isPublisher {
|
||||
tc.publisherCount++
|
||||
} else {
|
||||
tc.subscriberCount++
|
||||
}
|
||||
return tc
|
||||
}
|
||||
|
||||
func (tm *TopicManager) ReleaseLock(partition TopicPartition, isPublisher bool) {
|
||||
tm.Lock()
|
||||
defer tm.Unlock()
|
||||
|
||||
lock, found := tm.topicControls[partition]
|
||||
if !found {
|
||||
return
|
||||
}
|
||||
if isPublisher {
|
||||
lock.publisherCount--
|
||||
} else {
|
||||
lock.subscriberCount--
|
||||
}
|
||||
if lock.subscriberCount <= 0 && lock.publisherCount <= 0 {
|
||||
delete(tm.topicControls, partition)
|
||||
lock.logBuffer.Shutdown()
|
||||
}
|
||||
}
|
||||
|
||||
func (tm *TopicManager) ListTopicPartitions() (tps []TopicPartition) {
|
||||
tm.Lock()
|
||||
defer tm.Unlock()
|
||||
|
||||
for k := range tm.topicControls {
|
||||
tps = append(tps, k)
|
||||
}
|
||||
return
|
||||
}
|
||||
@@ -1,34 +0,0 @@
|
||||
package client
|
||||
|
||||
import (
|
||||
"context"
|
||||
|
||||
"google.golang.org/grpc"
|
||||
|
||||
"github.com/chrislusf/seaweedfs/weed/pb"
|
||||
"github.com/chrislusf/seaweedfs/weed/security"
|
||||
"github.com/chrislusf/seaweedfs/weed/util"
|
||||
)
|
||||
|
||||
type MessagingClient struct {
|
||||
bootstrapBrokers []string
|
||||
grpcConnection *grpc.ClientConn
|
||||
}
|
||||
|
||||
func NewMessagingClient(bootstrapBrokers []string) (*MessagingClient, error) {
|
||||
grpcDialOption := security.LoadClientTLS(util.GetViper(), "grpc.msg_client")
|
||||
|
||||
grpcConnection, err := pb.GrpcDial(context.Background(), "localhost:17777", grpcDialOption)
|
||||
if err != nil {
|
||||
return nil, err
|
||||
}
|
||||
|
||||
util.OnInterrupt(func() {
|
||||
grpcConnection.Close()
|
||||
})
|
||||
|
||||
return &MessagingClient{
|
||||
bootstrapBrokers: bootstrapBrokers,
|
||||
grpcConnection: grpcConnection,
|
||||
}, nil
|
||||
}
|
||||
@@ -1,91 +0,0 @@
|
||||
package client
|
||||
|
||||
import (
|
||||
"context"
|
||||
"io"
|
||||
"time"
|
||||
|
||||
"github.com/chrislusf/seaweedfs/weed/pb/messaging_pb"
|
||||
)
|
||||
|
||||
type Subscriber struct {
|
||||
subscriberClients []messaging_pb.SeaweedMessaging_SubscribeClient
|
||||
subscriberId string
|
||||
}
|
||||
|
||||
func (mc *MessagingClient) NewSubscriber(subscriberId, namespace, topic string) (*Subscriber, error) {
|
||||
// read topic configuration
|
||||
topicConfiguration := &messaging_pb.TopicConfiguration{
|
||||
PartitionCount: 4,
|
||||
}
|
||||
subscriberClients := make([]messaging_pb.SeaweedMessaging_SubscribeClient, topicConfiguration.PartitionCount)
|
||||
|
||||
for i := 0; i < int(topicConfiguration.PartitionCount); i++ {
|
||||
client, err := mc.setupSubscriberClient(subscriberId, namespace, topic, int32(i))
|
||||
if err != nil {
|
||||
return nil, err
|
||||
}
|
||||
subscriberClients[i] = client
|
||||
}
|
||||
|
||||
return &Subscriber{
|
||||
subscriberClients: subscriberClients,
|
||||
subscriberId: subscriberId,
|
||||
}, nil
|
||||
}
|
||||
|
||||
func (mc *MessagingClient) setupSubscriberClient(subscriberId, namespace, topic string, partition int32) (messaging_pb.SeaweedMessaging_SubscribeClient, error) {
|
||||
|
||||
stream, err := messaging_pb.NewSeaweedMessagingClient(mc.grpcConnection).Subscribe(context.Background())
|
||||
if err != nil {
|
||||
return nil, err
|
||||
}
|
||||
|
||||
// send init message
|
||||
err = stream.Send(&messaging_pb.SubscriberMessage{
|
||||
Init: &messaging_pb.SubscriberMessage_InitMessage{
|
||||
Namespace: namespace,
|
||||
Topic: topic,
|
||||
Partition: partition,
|
||||
StartPosition: messaging_pb.SubscriberMessage_InitMessage_TIMESTAMP,
|
||||
TimestampNs: time.Now().UnixNano(),
|
||||
SubscriberId: subscriberId,
|
||||
},
|
||||
})
|
||||
if err != nil {
|
||||
return nil, err
|
||||
}
|
||||
|
||||
// process init response
|
||||
initResponse, err := stream.Recv()
|
||||
if err != nil {
|
||||
return nil, err
|
||||
}
|
||||
if initResponse.Redirect != nil {
|
||||
// TODO follow redirection
|
||||
}
|
||||
|
||||
return stream, nil
|
||||
|
||||
}
|
||||
|
||||
func (s *Subscriber) doSubscribe(partition int, processFn func(m *messaging_pb.Message)) error {
|
||||
for {
|
||||
resp, listenErr := s.subscriberClients[partition].Recv()
|
||||
if listenErr == io.EOF {
|
||||
return nil
|
||||
}
|
||||
if listenErr != nil {
|
||||
println(listenErr.Error())
|
||||
return listenErr
|
||||
}
|
||||
processFn(resp.Data)
|
||||
}
|
||||
}
|
||||
|
||||
// Subscribe starts goroutines to process the messages
|
||||
func (s *Subscriber) Subscribe(processFn func(m *messaging_pb.Message)) {
|
||||
for i:=0;i<len(s.subscriberClients);i++{
|
||||
go s.doSubscribe(i, processFn)
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,5 @@
|
||||
package msgclient
|
||||
|
||||
func (mc *MessagingClient) DeleteChannel(chanName string) error {
|
||||
return mc.DeleteTopic("chan", chanName)
|
||||
}
|
||||
@@ -0,0 +1,76 @@
|
||||
package msgclient
|
||||
|
||||
import (
|
||||
"crypto/md5"
|
||||
"hash"
|
||||
"io"
|
||||
"log"
|
||||
|
||||
"google.golang.org/grpc"
|
||||
|
||||
"github.com/chrislusf/seaweedfs/weed/messaging/broker"
|
||||
"github.com/chrislusf/seaweedfs/weed/pb/messaging_pb"
|
||||
)
|
||||
|
||||
type PubChannel struct {
|
||||
client messaging_pb.SeaweedMessaging_PublishClient
|
||||
grpcConnection *grpc.ClientConn
|
||||
md5hash hash.Hash
|
||||
}
|
||||
|
||||
func (mc *MessagingClient) NewPubChannel(chanName string) (*PubChannel, error) {
|
||||
tp := broker.TopicPartition{
|
||||
Namespace: "chan",
|
||||
Topic: chanName,
|
||||
Partition: 0,
|
||||
}
|
||||
grpcConnection, err := mc.findBroker(tp)
|
||||
if err != nil {
|
||||
return nil, err
|
||||
}
|
||||
pc, err := setupPublisherClient(grpcConnection, tp)
|
||||
if err != nil {
|
||||
return nil, err
|
||||
}
|
||||
return &PubChannel{
|
||||
client: pc,
|
||||
grpcConnection: grpcConnection,
|
||||
md5hash: md5.New(),
|
||||
}, nil
|
||||
}
|
||||
|
||||
func (pc *PubChannel) Publish(m []byte) error {
|
||||
err := pc.client.Send(&messaging_pb.PublishRequest{
|
||||
Data: &messaging_pb.Message{
|
||||
Value: m,
|
||||
},
|
||||
})
|
||||
if err == nil {
|
||||
pc.md5hash.Write(m)
|
||||
}
|
||||
return err
|
||||
}
|
||||
func (pc *PubChannel) Close() error {
|
||||
|
||||
// println("send closing")
|
||||
if err := pc.client.Send(&messaging_pb.PublishRequest{
|
||||
Data: &messaging_pb.Message{
|
||||
IsClose: true,
|
||||
},
|
||||
}); err != nil {
|
||||
log.Printf("err send close: %v", err)
|
||||
}
|
||||
// println("receive closing")
|
||||
if _, err := pc.client.Recv(); err != nil && err != io.EOF {
|
||||
log.Printf("err receive close: %v", err)
|
||||
}
|
||||
// println("close connection")
|
||||
if err := pc.grpcConnection.Close(); err != nil {
|
||||
log.Printf("err connection close: %v", err)
|
||||
}
|
||||
return nil
|
||||
}
|
||||
|
||||
func (pc *PubChannel) Md5() []byte {
|
||||
return pc.md5hash.Sum(nil)
|
||||
}
|
||||
@@ -0,0 +1,85 @@
|
||||
package msgclient
|
||||
|
||||
import (
|
||||
"context"
|
||||
"crypto/md5"
|
||||
"hash"
|
||||
"io"
|
||||
"log"
|
||||
"time"
|
||||
|
||||
"github.com/chrislusf/seaweedfs/weed/messaging/broker"
|
||||
"github.com/chrislusf/seaweedfs/weed/pb/messaging_pb"
|
||||
)
|
||||
|
||||
type SubChannel struct {
|
||||
ch chan []byte
|
||||
stream messaging_pb.SeaweedMessaging_SubscribeClient
|
||||
md5hash hash.Hash
|
||||
cancel context.CancelFunc
|
||||
}
|
||||
|
||||
func (mc *MessagingClient) NewSubChannel(subscriberId, chanName string) (*SubChannel, error) {
|
||||
tp := broker.TopicPartition{
|
||||
Namespace: "chan",
|
||||
Topic: chanName,
|
||||
Partition: 0,
|
||||
}
|
||||
grpcConnection, err := mc.findBroker(tp)
|
||||
if err != nil {
|
||||
return nil, err
|
||||
}
|
||||
ctx, cancel := context.WithCancel(context.Background())
|
||||
sc, err := setupSubscriberClient(ctx, grpcConnection, tp, subscriberId, time.Unix(0, 0))
|
||||
if err != nil {
|
||||
return nil, err
|
||||
}
|
||||
|
||||
t := &SubChannel{
|
||||
ch: make(chan []byte),
|
||||
stream: sc,
|
||||
md5hash: md5.New(),
|
||||
cancel: cancel,
|
||||
}
|
||||
|
||||
go func() {
|
||||
for {
|
||||
resp, subErr := t.stream.Recv()
|
||||
if subErr == io.EOF {
|
||||
return
|
||||
}
|
||||
if subErr != nil {
|
||||
log.Printf("fail to receive from netchan %s: %v", chanName, subErr)
|
||||
return
|
||||
}
|
||||
if resp.Data == nil {
|
||||
// this could be heartbeat from broker
|
||||
continue
|
||||
}
|
||||
if resp.Data.IsClose {
|
||||
t.stream.Send(&messaging_pb.SubscriberMessage{
|
||||
IsClose: true,
|
||||
})
|
||||
close(t.ch)
|
||||
cancel()
|
||||
return
|
||||
}
|
||||
t.ch <- resp.Data.Value
|
||||
t.md5hash.Write(resp.Data.Value)
|
||||
}
|
||||
}()
|
||||
|
||||
return t, nil
|
||||
}
|
||||
|
||||
func (sc *SubChannel) Channel() chan []byte {
|
||||
return sc.ch
|
||||
}
|
||||
|
||||
func (sc *SubChannel) Md5() []byte {
|
||||
return sc.md5hash.Sum(nil)
|
||||
}
|
||||
|
||||
func (sc *SubChannel) Cancel() {
|
||||
sc.cancel()
|
||||
}
|
||||
@@ -0,0 +1,55 @@
|
||||
package msgclient
|
||||
|
||||
import (
|
||||
"context"
|
||||
"fmt"
|
||||
"log"
|
||||
|
||||
"google.golang.org/grpc"
|
||||
|
||||
"github.com/chrislusf/seaweedfs/weed/messaging/broker"
|
||||
"github.com/chrislusf/seaweedfs/weed/pb"
|
||||
"github.com/chrislusf/seaweedfs/weed/pb/messaging_pb"
|
||||
"github.com/chrislusf/seaweedfs/weed/security"
|
||||
"github.com/chrislusf/seaweedfs/weed/util"
|
||||
)
|
||||
|
||||
type MessagingClient struct {
|
||||
bootstrapBrokers []string
|
||||
grpcConnections map[broker.TopicPartition]*grpc.ClientConn
|
||||
grpcDialOption grpc.DialOption
|
||||
}
|
||||
|
||||
func NewMessagingClient(bootstrapBrokers ...string) *MessagingClient {
|
||||
return &MessagingClient{
|
||||
bootstrapBrokers: bootstrapBrokers,
|
||||
grpcConnections: make(map[broker.TopicPartition]*grpc.ClientConn),
|
||||
grpcDialOption: security.LoadClientTLS(util.GetViper(), "grpc.msg_client"),
|
||||
}
|
||||
}
|
||||
|
||||
func (mc *MessagingClient) findBroker(tp broker.TopicPartition) (*grpc.ClientConn, error) {
|
||||
|
||||
for _, broker := range mc.bootstrapBrokers {
|
||||
grpcConnection, err := pb.GrpcDial(context.Background(), broker, mc.grpcDialOption)
|
||||
if err != nil {
|
||||
log.Printf("dial broker %s: %v", broker, err)
|
||||
continue
|
||||
}
|
||||
defer grpcConnection.Close()
|
||||
|
||||
resp, err := messaging_pb.NewSeaweedMessagingClient(grpcConnection).FindBroker(context.Background(),
|
||||
&messaging_pb.FindBrokerRequest{
|
||||
Namespace: tp.Namespace,
|
||||
Topic: tp.Topic,
|
||||
Parition: tp.Partition,
|
||||
})
|
||||
if err != nil {
|
||||
return nil, err
|
||||
}
|
||||
|
||||
targetBroker := resp.Broker
|
||||
return pb.GrpcDial(context.Background(), targetBroker, mc.grpcDialOption)
|
||||
}
|
||||
return nil, fmt.Errorf("no broker found for %+v", tp)
|
||||
}
|
||||
@@ -0,0 +1,63 @@
|
||||
package msgclient
|
||||
|
||||
import (
|
||||
"context"
|
||||
"log"
|
||||
|
||||
"github.com/chrislusf/seaweedfs/weed/messaging/broker"
|
||||
"github.com/chrislusf/seaweedfs/weed/pb"
|
||||
"github.com/chrislusf/seaweedfs/weed/pb/messaging_pb"
|
||||
)
|
||||
|
||||
func (mc *MessagingClient) configureTopic(tp broker.TopicPartition) error {
|
||||
|
||||
return mc.withAnyBroker(func(client messaging_pb.SeaweedMessagingClient) error {
|
||||
_, err := client.ConfigureTopic(context.Background(),
|
||||
&messaging_pb.ConfigureTopicRequest{
|
||||
Namespace: tp.Namespace,
|
||||
Topic: tp.Topic,
|
||||
Configuration: &messaging_pb.TopicConfiguration{
|
||||
PartitionCount: 0,
|
||||
Collection: "",
|
||||
Replication: "",
|
||||
IsTransient: false,
|
||||
Partitoning: 0,
|
||||
},
|
||||
})
|
||||
return err
|
||||
})
|
||||
|
||||
}
|
||||
|
||||
func (mc *MessagingClient) DeleteTopic(namespace, topic string) error {
|
||||
|
||||
return mc.withAnyBroker(func(client messaging_pb.SeaweedMessagingClient) error {
|
||||
_, err := client.DeleteTopic(context.Background(),
|
||||
&messaging_pb.DeleteTopicRequest{
|
||||
Namespace: namespace,
|
||||
Topic: topic,
|
||||
})
|
||||
return err
|
||||
})
|
||||
}
|
||||
|
||||
func (mc *MessagingClient) withAnyBroker(fn func(client messaging_pb.SeaweedMessagingClient) error) error {
|
||||
|
||||
var lastErr error
|
||||
for _, broker := range mc.bootstrapBrokers {
|
||||
grpcConnection, err := pb.GrpcDial(context.Background(), broker, mc.grpcDialOption)
|
||||
if err != nil {
|
||||
log.Printf("dial broker %s: %v", broker, err)
|
||||
continue
|
||||
}
|
||||
defer grpcConnection.Close()
|
||||
|
||||
err = fn(messaging_pb.NewSeaweedMessagingClient(grpcConnection))
|
||||
if err == nil {
|
||||
return nil
|
||||
}
|
||||
lastErr = err
|
||||
}
|
||||
|
||||
return lastErr
|
||||
}
|
||||
@@ -1,10 +1,12 @@
|
||||
package client
|
||||
package msgclient
|
||||
|
||||
import (
|
||||
"context"
|
||||
|
||||
"github.com/OneOfOne/xxhash"
|
||||
"google.golang.org/grpc"
|
||||
|
||||
"github.com/chrislusf/seaweedfs/weed/messaging/broker"
|
||||
"github.com/chrislusf/seaweedfs/weed/pb/messaging_pb"
|
||||
)
|
||||
|
||||
@@ -22,7 +24,16 @@ func (mc *MessagingClient) NewPublisher(publisherId, namespace, topic string) (*
|
||||
}
|
||||
publishClients := make([]messaging_pb.SeaweedMessaging_PublishClient, topicConfiguration.PartitionCount)
|
||||
for i := 0; i < int(topicConfiguration.PartitionCount); i++ {
|
||||
client, err := mc.setupPublisherClient(namespace, topic, int32(i))
|
||||
tp := broker.TopicPartition{
|
||||
Namespace: namespace,
|
||||
Topic: topic,
|
||||
Partition: int32(i),
|
||||
}
|
||||
grpcClientConn, err := mc.findBroker(tp)
|
||||
if err != nil {
|
||||
return nil, err
|
||||
}
|
||||
client, err := setupPublisherClient(grpcClientConn, tp)
|
||||
if err != nil {
|
||||
return nil, err
|
||||
}
|
||||
@@ -34,9 +45,9 @@ func (mc *MessagingClient) NewPublisher(publisherId, namespace, topic string) (*
|
||||
}, nil
|
||||
}
|
||||
|
||||
func (mc *MessagingClient) setupPublisherClient(namespace, topic string, partition int32) (messaging_pb.SeaweedMessaging_PublishClient, error) {
|
||||
func setupPublisherClient(grpcConnection *grpc.ClientConn, tp broker.TopicPartition) (messaging_pb.SeaweedMessaging_PublishClient, error) {
|
||||
|
||||
stream, err := messaging_pb.NewSeaweedMessagingClient(mc.grpcConnection).Publish(context.Background())
|
||||
stream, err := messaging_pb.NewSeaweedMessagingClient(grpcConnection).Publish(context.Background())
|
||||
if err != nil {
|
||||
return nil, err
|
||||
}
|
||||
@@ -44,9 +55,9 @@ func (mc *MessagingClient) setupPublisherClient(namespace, topic string, partiti
|
||||
// send init message
|
||||
err = stream.Send(&messaging_pb.PublishRequest{
|
||||
Init: &messaging_pb.PublishRequest_InitMessage{
|
||||
Namespace: namespace,
|
||||
Topic: topic,
|
||||
Partition: partition,
|
||||
Namespace: tp.Namespace,
|
||||
Topic: tp.Topic,
|
||||
Partition: tp.Partition,
|
||||
},
|
||||
})
|
||||
if err != nil {
|
||||
@@ -105,9 +116,3 @@ func (p *Publisher) Publish(m *messaging_pb.Message) error {
|
||||
Data: m,
|
||||
})
|
||||
}
|
||||
|
||||
func (p *Publisher) Shutdown() {
|
||||
for _, client := range p.publishClients {
|
||||
client.CloseSend()
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,120 @@
|
||||
package msgclient
|
||||
|
||||
import (
|
||||
"context"
|
||||
"io"
|
||||
"time"
|
||||
"sync"
|
||||
|
||||
"github.com/chrislusf/seaweedfs/weed/messaging/broker"
|
||||
"github.com/chrislusf/seaweedfs/weed/pb/messaging_pb"
|
||||
"google.golang.org/grpc"
|
||||
)
|
||||
|
||||
type Subscriber struct {
|
||||
subscriberClients []messaging_pb.SeaweedMessaging_SubscribeClient
|
||||
subscriberCancels []context.CancelFunc
|
||||
subscriberId string
|
||||
}
|
||||
|
||||
func (mc *MessagingClient) NewSubscriber(subscriberId, namespace, topic string, partitionId int, startTime time.Time) (*Subscriber, error) {
|
||||
// read topic configuration
|
||||
topicConfiguration := &messaging_pb.TopicConfiguration{
|
||||
PartitionCount: 4,
|
||||
}
|
||||
subscriberClients := make([]messaging_pb.SeaweedMessaging_SubscribeClient, topicConfiguration.PartitionCount)
|
||||
subscriberCancels := make([]context.CancelFunc, topicConfiguration.PartitionCount)
|
||||
|
||||
for i := 0; i < int(topicConfiguration.PartitionCount); i++ {
|
||||
if partitionId>=0 && i != partitionId {
|
||||
continue
|
||||
}
|
||||
tp := broker.TopicPartition{
|
||||
Namespace: namespace,
|
||||
Topic: topic,
|
||||
Partition: int32(i),
|
||||
}
|
||||
grpcClientConn, err := mc.findBroker(tp)
|
||||
if err != nil {
|
||||
return nil, err
|
||||
}
|
||||
ctx, cancel := context.WithCancel(context.Background())
|
||||
client, err := setupSubscriberClient(ctx, grpcClientConn, tp, subscriberId, startTime)
|
||||
if err != nil {
|
||||
return nil, err
|
||||
}
|
||||
subscriberClients[i] = client
|
||||
subscriberCancels[i] = cancel
|
||||
}
|
||||
|
||||
return &Subscriber{
|
||||
subscriberClients: subscriberClients,
|
||||
subscriberCancels: subscriberCancels,
|
||||
subscriberId: subscriberId,
|
||||
}, nil
|
||||
}
|
||||
|
||||
func setupSubscriberClient(ctx context.Context, grpcConnection *grpc.ClientConn, tp broker.TopicPartition, subscriberId string, startTime time.Time) (stream messaging_pb.SeaweedMessaging_SubscribeClient, err error) {
|
||||
stream, err = messaging_pb.NewSeaweedMessagingClient(grpcConnection).Subscribe(ctx)
|
||||
if err != nil {
|
||||
return
|
||||
}
|
||||
|
||||
// send init message
|
||||
err = stream.Send(&messaging_pb.SubscriberMessage{
|
||||
Init: &messaging_pb.SubscriberMessage_InitMessage{
|
||||
Namespace: tp.Namespace,
|
||||
Topic: tp.Topic,
|
||||
Partition: tp.Partition,
|
||||
StartPosition: messaging_pb.SubscriberMessage_InitMessage_TIMESTAMP,
|
||||
TimestampNs: startTime.UnixNano(),
|
||||
SubscriberId: subscriberId,
|
||||
},
|
||||
})
|
||||
if err != nil {
|
||||
return
|
||||
}
|
||||
|
||||
return stream, nil
|
||||
}
|
||||
|
||||
func doSubscribe(subscriberClient messaging_pb.SeaweedMessaging_SubscribeClient, processFn func(m *messaging_pb.Message)) error {
|
||||
for {
|
||||
resp, listenErr := subscriberClient.Recv()
|
||||
if listenErr == io.EOF {
|
||||
return nil
|
||||
}
|
||||
if listenErr != nil {
|
||||
println(listenErr.Error())
|
||||
return listenErr
|
||||
}
|
||||
if resp.Data == nil {
|
||||
// this could be heartbeat from broker
|
||||
continue
|
||||
}
|
||||
processFn(resp.Data)
|
||||
}
|
||||
}
|
||||
|
||||
// Subscribe starts goroutines to process the messages
|
||||
func (s *Subscriber) Subscribe(processFn func(m *messaging_pb.Message)) {
|
||||
var wg sync.WaitGroup
|
||||
for i := 0; i < len(s.subscriberClients); i++ {
|
||||
if s.subscriberClients[i] != nil {
|
||||
wg.Add(1)
|
||||
go func(subscriberClient messaging_pb.SeaweedMessaging_SubscribeClient) {
|
||||
defer wg.Done()
|
||||
doSubscribe(subscriberClient, processFn)
|
||||
}(s.subscriberClients[i])
|
||||
}
|
||||
}
|
||||
wg.Wait()
|
||||
}
|
||||
|
||||
func (s *Subscriber) Shutdown() {
|
||||
for i := 0; i < len(s.subscriberClients); i++ {
|
||||
if s.subscriberCancels[i] != nil {
|
||||
s.subscriberCancels[i]()
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -27,6 +27,7 @@ type FilePart struct {
|
||||
Ttl string
|
||||
Server string //this comes from assign result
|
||||
Fid string //this comes from assign result, but customizable
|
||||
Fsync bool
|
||||
}
|
||||
|
||||
type SubmitResult struct {
|
||||
@@ -116,6 +117,9 @@ func (fi FilePart) Upload(maxMB int, master string, usePublicUrl bool, jwt secur
|
||||
if fi.ModTime != 0 {
|
||||
fileUrl += "?ts=" + strconv.Itoa(int(fi.ModTime))
|
||||
}
|
||||
if fi.Fsync {
|
||||
fileUrl += "?fsync=true"
|
||||
}
|
||||
if closer, ok := fi.Reader.(io.Closer); ok {
|
||||
defer closer.Close()
|
||||
}
|
||||
|
||||
@@ -14,8 +14,10 @@ import (
|
||||
"net/textproto"
|
||||
"path/filepath"
|
||||
"strings"
|
||||
"time"
|
||||
|
||||
"github.com/chrislusf/seaweedfs/weed/glog"
|
||||
"github.com/chrislusf/seaweedfs/weed/pb/filer_pb"
|
||||
"github.com/chrislusf/seaweedfs/weed/security"
|
||||
"github.com/chrislusf/seaweedfs/weed/util"
|
||||
)
|
||||
@@ -31,6 +33,18 @@ type UploadResult struct {
|
||||
Md5 string `json:"md5,omitempty"`
|
||||
}
|
||||
|
||||
func (uploadResult *UploadResult) ToPbFileChunk(fileId string, offset int64) *filer_pb.FileChunk {
|
||||
return &filer_pb.FileChunk{
|
||||
FileId: fileId,
|
||||
Offset: offset,
|
||||
Size: uint64(uploadResult.Size),
|
||||
Mtime: time.Now().UnixNano(),
|
||||
ETag: uploadResult.ETag,
|
||||
CipherKey: uploadResult.CipherKey,
|
||||
IsGzipped: uploadResult.Gzip > 0,
|
||||
}
|
||||
}
|
||||
|
||||
var (
|
||||
client *http.Client
|
||||
)
|
||||
|
||||
@@ -48,6 +48,12 @@ service SeaweedFiler {
|
||||
rpc SubscribeMetadata (SubscribeMetadataRequest) returns (stream SubscribeMetadataResponse) {
|
||||
}
|
||||
|
||||
rpc KeepConnected (stream KeepConnectedRequest) returns (stream KeepConnectedResponse) {
|
||||
}
|
||||
|
||||
rpc LocateBroker (LocateBrokerRequest) returns (LocateBrokerResponse) {
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
//////////////////////////////////////////////////
|
||||
@@ -261,3 +267,25 @@ message LogEntry {
|
||||
int32 partition_key_hash = 2;
|
||||
bytes data = 3;
|
||||
}
|
||||
|
||||
message KeepConnectedRequest {
|
||||
string name = 1;
|
||||
uint32 grpc_port = 2;
|
||||
repeated string resources = 3;
|
||||
}
|
||||
message KeepConnectedResponse {
|
||||
}
|
||||
|
||||
message LocateBrokerRequest {
|
||||
string resource = 1;
|
||||
}
|
||||
message LocateBrokerResponse {
|
||||
bool found = 1;
|
||||
// if found, send the exact address
|
||||
// if not found, send the full list of existing brokers
|
||||
message Resource {
|
||||
string grpc_addresses = 1;
|
||||
int32 resource_count = 2;
|
||||
}
|
||||
repeated Resource resources = 2;
|
||||
}
|
||||
+350
-124
@@ -44,6 +44,10 @@ It has these top-level messages:
|
||||
SubscribeMetadataRequest
|
||||
SubscribeMetadataResponse
|
||||
LogEntry
|
||||
KeepConnectedRequest
|
||||
KeepConnectedResponse
|
||||
LocateBrokerRequest
|
||||
LocateBrokerResponse
|
||||
*/
|
||||
package filer_pb
|
||||
|
||||
@@ -1228,6 +1232,114 @@ func (m *LogEntry) GetData() []byte {
|
||||
return nil
|
||||
}
|
||||
|
||||
type KeepConnectedRequest struct {
|
||||
Name string `protobuf:"bytes,1,opt,name=name" json:"name,omitempty"`
|
||||
GrpcPort uint32 `protobuf:"varint,2,opt,name=grpc_port,json=grpcPort" json:"grpc_port,omitempty"`
|
||||
Resources []string `protobuf:"bytes,3,rep,name=resources" json:"resources,omitempty"`
|
||||
}
|
||||
|
||||
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{35} }
|
||||
|
||||
func (m *KeepConnectedRequest) GetName() string {
|
||||
if m != nil {
|
||||
return m.Name
|
||||
}
|
||||
return ""
|
||||
}
|
||||
|
||||
func (m *KeepConnectedRequest) GetGrpcPort() uint32 {
|
||||
if m != nil {
|
||||
return m.GrpcPort
|
||||
}
|
||||
return 0
|
||||
}
|
||||
|
||||
func (m *KeepConnectedRequest) GetResources() []string {
|
||||
if m != nil {
|
||||
return m.Resources
|
||||
}
|
||||
return nil
|
||||
}
|
||||
|
||||
type KeepConnectedResponse struct {
|
||||
}
|
||||
|
||||
func (m *KeepConnectedResponse) Reset() { *m = KeepConnectedResponse{} }
|
||||
func (m *KeepConnectedResponse) String() string { return proto.CompactTextString(m) }
|
||||
func (*KeepConnectedResponse) ProtoMessage() {}
|
||||
func (*KeepConnectedResponse) Descriptor() ([]byte, []int) { return fileDescriptor0, []int{36} }
|
||||
|
||||
type LocateBrokerRequest struct {
|
||||
Resource string `protobuf:"bytes,1,opt,name=resource" json:"resource,omitempty"`
|
||||
}
|
||||
|
||||
func (m *LocateBrokerRequest) Reset() { *m = LocateBrokerRequest{} }
|
||||
func (m *LocateBrokerRequest) String() string { return proto.CompactTextString(m) }
|
||||
func (*LocateBrokerRequest) ProtoMessage() {}
|
||||
func (*LocateBrokerRequest) Descriptor() ([]byte, []int) { return fileDescriptor0, []int{37} }
|
||||
|
||||
func (m *LocateBrokerRequest) GetResource() string {
|
||||
if m != nil {
|
||||
return m.Resource
|
||||
}
|
||||
return ""
|
||||
}
|
||||
|
||||
type LocateBrokerResponse struct {
|
||||
Found bool `protobuf:"varint,1,opt,name=found" json:"found,omitempty"`
|
||||
Resources []*LocateBrokerResponse_Resource `protobuf:"bytes,2,rep,name=resources" json:"resources,omitempty"`
|
||||
}
|
||||
|
||||
func (m *LocateBrokerResponse) Reset() { *m = LocateBrokerResponse{} }
|
||||
func (m *LocateBrokerResponse) String() string { return proto.CompactTextString(m) }
|
||||
func (*LocateBrokerResponse) ProtoMessage() {}
|
||||
func (*LocateBrokerResponse) Descriptor() ([]byte, []int) { return fileDescriptor0, []int{38} }
|
||||
|
||||
func (m *LocateBrokerResponse) GetFound() bool {
|
||||
if m != nil {
|
||||
return m.Found
|
||||
}
|
||||
return false
|
||||
}
|
||||
|
||||
func (m *LocateBrokerResponse) GetResources() []*LocateBrokerResponse_Resource {
|
||||
if m != nil {
|
||||
return m.Resources
|
||||
}
|
||||
return nil
|
||||
}
|
||||
|
||||
// if found, send the exact address
|
||||
// if not found, send the full list of existing brokers
|
||||
type LocateBrokerResponse_Resource struct {
|
||||
GrpcAddresses string `protobuf:"bytes,1,opt,name=grpc_addresses,json=grpcAddresses" json:"grpc_addresses,omitempty"`
|
||||
ResourceCount int32 `protobuf:"varint,2,opt,name=resource_count,json=resourceCount" json:"resource_count,omitempty"`
|
||||
}
|
||||
|
||||
func (m *LocateBrokerResponse_Resource) Reset() { *m = LocateBrokerResponse_Resource{} }
|
||||
func (m *LocateBrokerResponse_Resource) String() string { return proto.CompactTextString(m) }
|
||||
func (*LocateBrokerResponse_Resource) ProtoMessage() {}
|
||||
func (*LocateBrokerResponse_Resource) Descriptor() ([]byte, []int) {
|
||||
return fileDescriptor0, []int{38, 0}
|
||||
}
|
||||
|
||||
func (m *LocateBrokerResponse_Resource) GetGrpcAddresses() string {
|
||||
if m != nil {
|
||||
return m.GrpcAddresses
|
||||
}
|
||||
return ""
|
||||
}
|
||||
|
||||
func (m *LocateBrokerResponse_Resource) GetResourceCount() int32 {
|
||||
if m != nil {
|
||||
return m.ResourceCount
|
||||
}
|
||||
return 0
|
||||
}
|
||||
|
||||
func init() {
|
||||
proto.RegisterType((*LookupDirectoryEntryRequest)(nil), "filer_pb.LookupDirectoryEntryRequest")
|
||||
proto.RegisterType((*LookupDirectoryEntryResponse)(nil), "filer_pb.LookupDirectoryEntryResponse")
|
||||
@@ -1264,6 +1376,11 @@ func init() {
|
||||
proto.RegisterType((*SubscribeMetadataRequest)(nil), "filer_pb.SubscribeMetadataRequest")
|
||||
proto.RegisterType((*SubscribeMetadataResponse)(nil), "filer_pb.SubscribeMetadataResponse")
|
||||
proto.RegisterType((*LogEntry)(nil), "filer_pb.LogEntry")
|
||||
proto.RegisterType((*KeepConnectedRequest)(nil), "filer_pb.KeepConnectedRequest")
|
||||
proto.RegisterType((*KeepConnectedResponse)(nil), "filer_pb.KeepConnectedResponse")
|
||||
proto.RegisterType((*LocateBrokerRequest)(nil), "filer_pb.LocateBrokerRequest")
|
||||
proto.RegisterType((*LocateBrokerResponse)(nil), "filer_pb.LocateBrokerResponse")
|
||||
proto.RegisterType((*LocateBrokerResponse_Resource)(nil), "filer_pb.LocateBrokerResponse.Resource")
|
||||
}
|
||||
|
||||
// Reference imports to suppress errors if they are not otherwise used.
|
||||
@@ -1290,6 +1407,8 @@ type SeaweedFilerClient interface {
|
||||
Statistics(ctx context.Context, in *StatisticsRequest, opts ...grpc.CallOption) (*StatisticsResponse, error)
|
||||
GetFilerConfiguration(ctx context.Context, in *GetFilerConfigurationRequest, opts ...grpc.CallOption) (*GetFilerConfigurationResponse, error)
|
||||
SubscribeMetadata(ctx context.Context, in *SubscribeMetadataRequest, opts ...grpc.CallOption) (SeaweedFiler_SubscribeMetadataClient, error)
|
||||
KeepConnected(ctx context.Context, opts ...grpc.CallOption) (SeaweedFiler_KeepConnectedClient, error)
|
||||
LocateBroker(ctx context.Context, in *LocateBrokerRequest, opts ...grpc.CallOption) (*LocateBrokerResponse, error)
|
||||
}
|
||||
|
||||
type seaweedFilerClient struct {
|
||||
@@ -1463,6 +1582,46 @@ func (x *seaweedFilerSubscribeMetadataClient) Recv() (*SubscribeMetadataResponse
|
||||
return m, nil
|
||||
}
|
||||
|
||||
func (c *seaweedFilerClient) KeepConnected(ctx context.Context, opts ...grpc.CallOption) (SeaweedFiler_KeepConnectedClient, error) {
|
||||
stream, err := grpc.NewClientStream(ctx, &_SeaweedFiler_serviceDesc.Streams[2], c.cc, "/filer_pb.SeaweedFiler/KeepConnected", opts...)
|
||||
if err != nil {
|
||||
return nil, err
|
||||
}
|
||||
x := &seaweedFilerKeepConnectedClient{stream}
|
||||
return x, nil
|
||||
}
|
||||
|
||||
type SeaweedFiler_KeepConnectedClient interface {
|
||||
Send(*KeepConnectedRequest) error
|
||||
Recv() (*KeepConnectedResponse, error)
|
||||
grpc.ClientStream
|
||||
}
|
||||
|
||||
type seaweedFilerKeepConnectedClient struct {
|
||||
grpc.ClientStream
|
||||
}
|
||||
|
||||
func (x *seaweedFilerKeepConnectedClient) Send(m *KeepConnectedRequest) error {
|
||||
return x.ClientStream.SendMsg(m)
|
||||
}
|
||||
|
||||
func (x *seaweedFilerKeepConnectedClient) Recv() (*KeepConnectedResponse, error) {
|
||||
m := new(KeepConnectedResponse)
|
||||
if err := x.ClientStream.RecvMsg(m); err != nil {
|
||||
return nil, err
|
||||
}
|
||||
return m, nil
|
||||
}
|
||||
|
||||
func (c *seaweedFilerClient) LocateBroker(ctx context.Context, in *LocateBrokerRequest, opts ...grpc.CallOption) (*LocateBrokerResponse, error) {
|
||||
out := new(LocateBrokerResponse)
|
||||
err := grpc.Invoke(ctx, "/filer_pb.SeaweedFiler/LocateBroker", in, out, c.cc, opts...)
|
||||
if err != nil {
|
||||
return nil, err
|
||||
}
|
||||
return out, nil
|
||||
}
|
||||
|
||||
// Server API for SeaweedFiler service
|
||||
|
||||
type SeaweedFilerServer interface {
|
||||
@@ -1479,6 +1638,8 @@ type SeaweedFilerServer interface {
|
||||
Statistics(context.Context, *StatisticsRequest) (*StatisticsResponse, error)
|
||||
GetFilerConfiguration(context.Context, *GetFilerConfigurationRequest) (*GetFilerConfigurationResponse, error)
|
||||
SubscribeMetadata(*SubscribeMetadataRequest, SeaweedFiler_SubscribeMetadataServer) error
|
||||
KeepConnected(SeaweedFiler_KeepConnectedServer) error
|
||||
LocateBroker(context.Context, *LocateBrokerRequest) (*LocateBrokerResponse, error)
|
||||
}
|
||||
|
||||
func RegisterSeaweedFilerServer(s *grpc.Server, srv SeaweedFilerServer) {
|
||||
@@ -1725,6 +1886,50 @@ func (x *seaweedFilerSubscribeMetadataServer) Send(m *SubscribeMetadataResponse)
|
||||
return x.ServerStream.SendMsg(m)
|
||||
}
|
||||
|
||||
func _SeaweedFiler_KeepConnected_Handler(srv interface{}, stream grpc.ServerStream) error {
|
||||
return srv.(SeaweedFilerServer).KeepConnected(&seaweedFilerKeepConnectedServer{stream})
|
||||
}
|
||||
|
||||
type SeaweedFiler_KeepConnectedServer interface {
|
||||
Send(*KeepConnectedResponse) error
|
||||
Recv() (*KeepConnectedRequest, error)
|
||||
grpc.ServerStream
|
||||
}
|
||||
|
||||
type seaweedFilerKeepConnectedServer struct {
|
||||
grpc.ServerStream
|
||||
}
|
||||
|
||||
func (x *seaweedFilerKeepConnectedServer) Send(m *KeepConnectedResponse) error {
|
||||
return x.ServerStream.SendMsg(m)
|
||||
}
|
||||
|
||||
func (x *seaweedFilerKeepConnectedServer) Recv() (*KeepConnectedRequest, error) {
|
||||
m := new(KeepConnectedRequest)
|
||||
if err := x.ServerStream.RecvMsg(m); err != nil {
|
||||
return nil, err
|
||||
}
|
||||
return m, nil
|
||||
}
|
||||
|
||||
func _SeaweedFiler_LocateBroker_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) {
|
||||
in := new(LocateBrokerRequest)
|
||||
if err := dec(in); err != nil {
|
||||
return nil, err
|
||||
}
|
||||
if interceptor == nil {
|
||||
return srv.(SeaweedFilerServer).LocateBroker(ctx, in)
|
||||
}
|
||||
info := &grpc.UnaryServerInfo{
|
||||
Server: srv,
|
||||
FullMethod: "/filer_pb.SeaweedFiler/LocateBroker",
|
||||
}
|
||||
handler := func(ctx context.Context, req interface{}) (interface{}, error) {
|
||||
return srv.(SeaweedFilerServer).LocateBroker(ctx, req.(*LocateBrokerRequest))
|
||||
}
|
||||
return interceptor(ctx, in, info, handler)
|
||||
}
|
||||
|
||||
var _SeaweedFiler_serviceDesc = grpc.ServiceDesc{
|
||||
ServiceName: "filer_pb.SeaweedFiler",
|
||||
HandlerType: (*SeaweedFilerServer)(nil),
|
||||
@@ -1773,6 +1978,10 @@ var _SeaweedFiler_serviceDesc = grpc.ServiceDesc{
|
||||
MethodName: "GetFilerConfiguration",
|
||||
Handler: _SeaweedFiler_GetFilerConfiguration_Handler,
|
||||
},
|
||||
{
|
||||
MethodName: "LocateBroker",
|
||||
Handler: _SeaweedFiler_LocateBroker_Handler,
|
||||
},
|
||||
},
|
||||
Streams: []grpc.StreamDesc{
|
||||
{
|
||||
@@ -1785,6 +1994,12 @@ var _SeaweedFiler_serviceDesc = grpc.ServiceDesc{
|
||||
Handler: _SeaweedFiler_SubscribeMetadata_Handler,
|
||||
ServerStreams: true,
|
||||
},
|
||||
{
|
||||
StreamName: "KeepConnected",
|
||||
Handler: _SeaweedFiler_KeepConnected_Handler,
|
||||
ServerStreams: true,
|
||||
ClientStreams: true,
|
||||
},
|
||||
},
|
||||
Metadata: "filer.proto",
|
||||
}
|
||||
@@ -1792,128 +2007,139 @@ var _SeaweedFiler_serviceDesc = grpc.ServiceDesc{
|
||||
func init() { proto.RegisterFile("filer.proto", fileDescriptor0) }
|
||||
|
||||
var fileDescriptor0 = []byte{
|
||||
// 1957 bytes of a gzipped FileDescriptorProto
|
||||
0x1f, 0x8b, 0x08, 0x00, 0x00, 0x09, 0x6e, 0x88, 0x02, 0xff, 0xb4, 0x58, 0x5f, 0x6f, 0xdb, 0xc8,
|
||||
0x11, 0x0f, 0x25, 0x4b, 0x16, 0x47, 0x52, 0xce, 0x5e, 0xdb, 0x89, 0xac, 0xd8, 0x8e, 0x8f, 0x69,
|
||||
0xae, 0x29, 0x12, 0xb8, 0x81, 0x7b, 0x05, 0xee, 0x7a, 0xed, 0x43, 0xe2, 0x38, 0xd7, 0xf4, 0x12,
|
||||
0x5f, 0x40, 0x27, 0x45, 0x8b, 0x02, 0x65, 0x69, 0x72, 0x2d, 0x6d, 0x4d, 0x91, 0xec, 0xee, 0xd2,
|
||||
0x7f, 0xee, 0xe9, 0x3e, 0x47, 0x81, 0x7e, 0x8b, 0x3e, 0x16, 0x7d, 0x29, 0x0a, 0x14, 0xe8, 0xb7,
|
||||
0xe8, 0xf7, 0x28, 0x50, 0xec, 0x2c, 0x49, 0x2d, 0x45, 0xc9, 0xbe, 0xa0, 0xb8, 0xb7, 0xdd, 0x99,
|
||||
0xd9, 0xd9, 0xd9, 0xf9, 0xf3, 0x9b, 0x21, 0xa1, 0x7b, 0xca, 0x22, 0xca, 0xf7, 0x52, 0x9e, 0xc8,
|
||||
0x84, 0x74, 0x70, 0xe3, 0xa5, 0x27, 0xce, 0xd7, 0x70, 0xef, 0x75, 0x92, 0x9c, 0x65, 0xe9, 0x0b,
|
||||
0xc6, 0x69, 0x20, 0x13, 0x7e, 0x75, 0x18, 0x4b, 0x7e, 0xe5, 0xd2, 0x3f, 0x65, 0x54, 0x48, 0xb2,
|
||||
0x05, 0x76, 0x58, 0x30, 0x06, 0xd6, 0xae, 0xf5, 0xc8, 0x76, 0xa7, 0x04, 0x42, 0x60, 0x29, 0xf6,
|
||||
0x27, 0x74, 0xd0, 0x40, 0x06, 0xae, 0x9d, 0x43, 0xd8, 0x9a, 0xaf, 0x50, 0xa4, 0x49, 0x2c, 0x28,
|
||||
0x79, 0x08, 0x2d, 0xaa, 0x08, 0xa8, 0xad, 0xbb, 0xff, 0xd1, 0x5e, 0x61, 0xca, 0x9e, 0x96, 0xd3,
|
||||
0x5c, 0xe7, 0xef, 0x16, 0x90, 0xd7, 0x4c, 0x48, 0x45, 0x64, 0x54, 0x7c, 0x37, 0x7b, 0xee, 0x40,
|
||||
0x3b, 0xe5, 0xf4, 0x94, 0x5d, 0xe6, 0x16, 0xe5, 0x3b, 0xf2, 0x04, 0x56, 0x85, 0xf4, 0xb9, 0x7c,
|
||||
0xc9, 0x93, 0xc9, 0x4b, 0x16, 0xd1, 0x23, 0x65, 0x74, 0x13, 0x45, 0xea, 0x0c, 0xb2, 0x07, 0x84,
|
||||
0xc5, 0x41, 0x94, 0x09, 0x76, 0x4e, 0x8f, 0x0b, 0xee, 0x60, 0x69, 0xd7, 0x7a, 0xd4, 0x71, 0xe7,
|
||||
0x70, 0xc8, 0x3a, 0xb4, 0x22, 0x36, 0x61, 0x72, 0xd0, 0xda, 0xb5, 0x1e, 0xf5, 0x5d, 0xbd, 0x71,
|
||||
0x7e, 0x0e, 0x6b, 0x15, 0xfb, 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 0x36, 0xa0, 0x3d, 0xf1, 0x2f, 0xbd, 0xc9, 0x49, 0x3e, 0xca, 0xb5,
|
||||
0x26, 0xfe, 0xe5, 0x9b, 0x13, 0x44, 0x36, 0xc6, 0xbd, 0x93, 0x2c, 0x38, 0xa3, 0x52, 0x94, 0xc8,
|
||||
0xc6, 0xf8, 0x73, 0x4d, 0xc1, 0xd9, 0x0e, 0x07, 0x5d, 0x84, 0x81, 0x8e, 0x9b, 0xef, 0x9c, 0x0b,
|
||||
0x18, 0x1c, 0x67, 0x27, 0x22, 0xe0, 0xec, 0x84, 0xbe, 0xa1, 0xd2, 0x57, 0x60, 0x58, 0xe4, 0xc8,
|
||||
0x7d, 0xe8, 0x06, 0x11, 0x53, 0x68, 0x68, 0x7c, 0x49, 0x82, 0x26, 0x61, 0xd7, 0x40, 0xb8, 0x94,
|
||||
0x63, 0xaf, 0xf2, 0xf1, 0x0c, 0x8a, 0xf4, 0x56, 0x7f, 0x40, 0x6f, 0x42, 0x47, 0xb0, 0x38, 0xa0,
|
||||
0x5e, 0xac, 0xbf, 0x58, 0x9a, 0xee, 0x32, 0xee, 0x8f, 0x84, 0x6a, 0x67, 0x9b, 0x73, 0x6e, 0xce,
|
||||
0x5d, 0x78, 0x7d, 0x2b, 0xff, 0x15, 0x10, 0x7a, 0x8e, 0x76, 0x19, 0xdf, 0x5f, 0x79, 0x91, 0xdd,
|
||||
0x33, 0xc6, 0x9c, 0xd9, 0x4f, 0x34, 0x77, 0x95, 0xd6, 0xbe, 0xda, 0xd6, 0xa0, 0x25, 0xc5, 0xd4,
|
||||
0xbe, 0x25, 0x29, 0x8e, 0x84, 0xe3, 0x2b, 0x30, 0x1a, 0xe9, 0xb2, 0x2e, 0x05, 0xac, 0xa9, 0x00,
|
||||
0x79, 0x02, 0x24, 0xf5, 0xb9, 0x64, 0x4a, 0x85, 0x9a, 0xf4, 0xbd, 0xb1, 0x2f, 0xc6, 0x68, 0x41,
|
||||
0xcb, 0x5d, 0x29, 0x39,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xd4, 0x60, 0x2a, 0x9c, 0xd7, 0x6a, 0x9d, 0x5b, 0xe4, 0x77, 0xb0, 0x32, 0xdb, 0xbb, 0xc8,
|
||||
0xc7, 0xb3, 0x6e, 0xab, 0xb5, 0xc4, 0xa1, 0x73, 0x9d, 0x48, 0xa9, 0xfc, 0x15, 0xc0, 0xb4, 0x25,
|
||||
0x11, 0x03, 0x1c, 0x6a, 0x2d, 0x71, 0xb8, 0x35, 0x9f, 0x59, 0xaa, 0xfa, 0x23, 0x6c, 0xcc, 0xc5,
|
||||
0x7d, 0x62, 0x94, 0xde, 0x75, 0x9d, 0x63, 0xf8, 0xc3, 0x1b, 0xe5, 0xca, 0xbb, 0xfe, 0x00, 0xab,
|
||||
0x35, 0x70, 0x34, 0xb3, 0x62, 0x11, 0x66, 0x9b, 0x59, 0xb1, 0x10, 0x5d, 0x55, 0xd5, 0x3e, 0xdf,
|
||||
0x81, 0x15, 0xa1, 0xe1, 0xe7, 0x54, 0xec, 0x69, 0x4c, 0x7f, 0x0e, 0x68, 0xd3, 0x5b, 0x9e, 0xc8,
|
||||
0xe4, 0xa4, 0x8d, 0x7f, 0x7c, 0x7f, 0xf2, 0xbf, 0x00, 0x00, 0x00, 0xff, 0xff, 0x39, 0x78, 0xfe,
|
||||
0x97, 0x00, 0x16, 0x00, 0x00,
|
||||
// 2142 bytes of a gzipped FileDescriptorProto
|
||||
0x1f, 0x8b, 0x08, 0x00, 0x00, 0x09, 0x6e, 0x88, 0x02, 0xff, 0xb4, 0x59, 0x5f, 0x6f, 0xdb, 0xc8,
|
||||
0x11, 0x37, 0x25, 0x4b, 0x16, 0x47, 0x52, 0xce, 0x5e, 0x3b, 0x89, 0xa2, 0xc4, 0x89, 0x8f, 0x69,
|
||||
0xee, 0x5c, 0x24, 0x70, 0x53, 0xf7, 0x0a, 0xdc, 0xf5, 0xda, 0x07, 0xc7, 0x71, 0xae, 0x69, 0x12,
|
||||
0x9f, 0x41, 0x27, 0x87, 0x2b, 0x0a, 0x94, 0xa5, 0xc9, 0xb5, 0xbc, 0x35, 0x45, 0xb2, 0xbb, 0x4b,
|
||||
0xff, 0xb9, 0xa7, 0xfb, 0x1c, 0x05, 0xfa, 0xda, 0x4f, 0xd0, 0xc7, 0xa2, 0x2f, 0x45, 0x81, 0x02,
|
||||
0x45, 0xbf, 0x44, 0x3f, 0x49, 0xb1, 0xb3, 0x24, 0xb5, 0x14, 0x25, 0xfb, 0x82, 0xc3, 0xbd, 0x71,
|
||||
0x67, 0x66, 0x67, 0x67, 0xe7, 0xcf, 0x6f, 0x66, 0x25, 0xe8, 0x1e, 0xb3, 0x88, 0xf2, 0xad, 0x94,
|
||||
0x27, 0x32, 0x21, 0x1d, 0x5c, 0x78, 0xe9, 0x91, 0xf3, 0x25, 0xdc, 0x7d, 0x9d, 0x24, 0xa7, 0x59,
|
||||
0xfa, 0x9c, 0x71, 0x1a, 0xc8, 0x84, 0x5f, 0xee, 0xc5, 0x92, 0x5f, 0xba, 0xf4, 0x4f, 0x19, 0x15,
|
||||
0x92, 0xdc, 0x03, 0x3b, 0x2c, 0x18, 0x03, 0x6b, 0xc3, 0xda, 0xb4, 0xdd, 0x09, 0x81, 0x10, 0x58,
|
||||
0x8c, 0xfd, 0x31, 0x1d, 0x34, 0x90, 0x81, 0xdf, 0xce, 0x1e, 0xdc, 0x9b, 0xad, 0x50, 0xa4, 0x49,
|
||||
0x2c, 0x28, 0x79, 0x04, 0x2d, 0xaa, 0x08, 0xa8, 0xad, 0xbb, 0xfd, 0xc1, 0x56, 0x61, 0xca, 0x96,
|
||||
0x96, 0xd3, 0x5c, 0xe7, 0x1f, 0x16, 0x90, 0xd7, 0x4c, 0x48, 0x45, 0x64, 0x54, 0x7c, 0x37, 0x7b,
|
||||
0x6e, 0x41, 0x3b, 0xe5, 0xf4, 0x98, 0x5d, 0xe4, 0x16, 0xe5, 0x2b, 0xf2, 0x04, 0x56, 0x84, 0xf4,
|
||||
0xb9, 0x7c, 0xc1, 0x93, 0xf1, 0x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
0x23, 0xf2, 0x23, 0xb8, 0x21, 0x92, 0x8c, 0x07, 0xd4, 0x2b, 0x8e, 0x6d, 0x23, 0xb7, 0xa7, 0xa9,
|
||||
0x2f, 0xf4, 0xe1, 0x0e, 0x34, 0x8f, 0x59, 0x38, 0x58, 0x42, 0xc7, 0x2c, 0x57, 0x93, 0xf0, 0x65,
|
||||
0xe8, 0x2a, 0x26, 0xf9, 0x09, 0x40, 0xa9, 0x29, 0x1c, 0x74, 0xe6, 0x88, 0xda, 0x85, 0xde, 0x90,
|
||||
0xac, 0x03, 0x04, 0x2c, 0x3d, 0xa1, 0xdc, 0x53, 0x09, 0x63, 0x63, 0x72, 0xd8, 0x9a, 0xf2, 0x8a,
|
||||
0x5e, 0x2a, 0x36, 0x13, 0xde, 0xe8, 0x1b, 0x96, 0xa6, 0x34, 0x1c, 0x00, 0x7a, 0xd8, 0x66, 0xe2,
|
||||
0x0b, 0x4d, 0x70, 0xbe, 0x86, 0x76, 0x6e, 0xdc, 0x5d, 0xb0, 0xcf, 0x92, 0x28, 0x1b, 0x97, 0x4e,
|
||||
0xeb, 0xbb, 0x1d, 0x4d, 0x78, 0x19, 0x92, 0x3b, 0x80, 0x28, 0x89, 0x47, 0x34, 0xd0, 0x45, 0xe8,
|
||||
0x5f, 0x75, 0xc0, 0x2d, 0x68, 0x07, 0x49, 0x72, 0xca, 0xb4, 0xef, 0x96, 0xdc, 0x7c, 0xe5, 0x7c,
|
||||
0xdb, 0x84, 0x1b, 0xd5, 0x62, 0x51, 0x47, 0xa0, 0x16, 0xf4, 0xb4, 0x85, 0x6a, 0x50, 0xed, 0x61,
|
||||
0xc5, 0xdb, 0x0d, 0xd3, 0xdb, 0xc5, 0x96, 0x71, 0x12, 0xea, 0x03, 0xfa, 0x7a, 0xcb, 0x9b, 0x24,
|
||||
0xa4, 0x2a, 0xd7, 0x33, 0x16, 0x62, 0x78, 0xfa, 0xae, 0xfa, 0x54, 0x94, 0x11, 0x0b, 0x73, 0xf0,
|
||||
0x51, 0x9f, 0x68, 0x1e, 0x47, 0xbd, 0x6d, 0x1d, 0x70, 0xbd, 0x52, 0x01, 0x1f, 0x2b, 0xea, 0x92,
|
||||
0x8e, 0xa2, 0xfa, 0x26, 0x1b, 0xd0, 0xe5, 0x34, 0x8d, 0xf2, 0xdc, 0x47, 0xe7, 0xdb, 0xae, 0x49,
|
||||
0x22, 0xf7, 0x01, 0x82, 0x24, 0x8a, 0x68, 0x80, 0x02, 0x36, 0x0a, 0x18, 0x14, 0x95, 0x77, 0x52,
|
||||
0x46, 0x9e, 0xa0, 0x01, 0xba, 0xba, 0xe5, 0xb6, 0xa5, 0x8c, 0x0e, 0x69, 0xa0, 0xee, 0x91, 0x09,
|
||||
0xca, 0x3d, 0x84, 0xaf, 0x2e, 0xee, 0xeb, 0x28, 0x02, 0x82, 0xec, 0x3a, 0xc0, 0x88, 0x27, 0x59,
|
||||
0xaa, 0xb9, 0xbd, 0x8d, 0xa6, 0x42, 0x72, 0xa4, 0x20, 0xfb, 0x11, 0xdc, 0x10, 0x97, 0xe3, 0x88,
|
||||
0xc5, 0xa7, 0x9e, 0xf4, 0xf9, 0x88, 0xca, 0x41, 0x5f, 0x57, 0x40, 0x4e, 0x7d, 0x8b, 0x44, 0x75,
|
||||
0xf7, 0x71, 0xf8, 0xf3, 0xc1, 0x0d, 0xcc, 0x00, 0xf5, 0xe9, 0xa4, 0x40, 0x76, 0x39, 0xf5, 0x25,
|
||||
0x7d, 0x8f, 0x36, 0xf6, 0xdd, 0xd0, 0x82, 0xdc, 0x84, 0x76, 0xe2, 0xd1, 0x8b, 0x20, 0xca, 0x8b,
|
||||
0xb6, 0x95, 0xec, 0x5d, 0x04, 0x91, 0xf3, 0x18, 0x56, 0x2b, 0x27, 0xe6, 0x40, 0xbf, 0x06, 0x2d,
|
||||
0xca, 0x79, 0x52, 0xc0, 0x92, 0x5e, 0x38, 0xbf, 0x05, 0xf2, 0x2e, 0x0d, 0x7f, 0x08, 0xf3, 0x9c,
|
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, 0x6a, 0xbf,
|
||||
0x73, 0x17, 0xee, 0xcc, 0xb0, 0x2d, 0x0f, 0xd7, 0xbf, 0x2d, 0x58, 0xdd, 0x11, 0x82, 0x8d, 0xe2,
|
||||
0xaf, 0x10, 0x24, 0x0b, 0xa3, 0xd7, 0xa0, 0x15, 0x24, 0x59, 0x2c, 0xd1, 0xd8, 0x96, 0xab, 0x17,
|
||||
0x53, 0xb8, 0xd1, 0xa8, 0xe1, 0xc6, 0x14, 0xf2, 0x34, 0xeb, 0xc8, 0x63, 0x20, 0xcb, 0x62, 0x05,
|
||||
0x59, 0x1e, 0x40, 0x57, 0x05, 0xd9, 0x0b, 0x68, 0x2c, 0x29, 0xcf, 0xbb, 0x12, 0x28, 0xd2, 0x2e,
|
||||
0x52, 0x94, 0x80, 0xd9, 0x3d, 0x75, 0x63, 0x82, 0x74, 0xd2, 0x3a, 0xff, 0xa7, 0xaa, 0xa2, 0x72,
|
||||
0x95, 0x3c, 0x66, 0x73, 0xbb, 0xa8, 0x02, 0x5e, 0x1e, 0xe5, 0xf7, 0x50, 0x9f, 0xaa, 0x44, 0xd2,
|
||||
0xec, 0x28, 0x62, 0x81, 0xa7, 0x18, 0xda, 0x7e, 0x5b, 0x53, 0xde, 0xf1, 0x68, 0xe2, 0x95, 0x45,
|
||||
0xd3, 0x2b, 0x04, 0x16, 0xfd, 0x4c, 0x9e, 0x14, 0x9d, 0x54, 0x7d, 0x4f, 0x79, 0xaa, 0x7d, 0x9d,
|
||||
0xa7, 0x96, 0xea, 0x9e, 0x2a, 0x33, 0xad, 0x63, 0x66, 0xda, 0x27, 0xb0, 0xaa, 0x47, 0xf1, 0x6a,
|
||||
0xb8, 0xd6, 0x01, 0xca, 0xae, 0x27, 0x06, 0x96, 0x86, 0xde, 0xa2, 0xed, 0x09, 0xe7, 0x57, 0x60,
|
||||
0xbf, 0x4e, 0xb4, 0x5e, 0x41, 0x9e, 0x82, 0x1d, 0x15, 0x0b, 0x14, 0xed, 0x6e, 0x93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Entry(filerClient FilerClient, fullFilePath util.FullPath) (entry *Entry
|
||||
return
|
||||
}
|
||||
|
||||
func ReadDirAllEntries(filerClient FilerClient, fullDirPath util.FullPath, prefix string, fn func(entry *Entry, isLast bool)) (err error) {
|
||||
type EachEntryFunciton func(entry *Entry, isLast bool) error
|
||||
|
||||
func ReadDirAllEntries(filerClient FilerClient, fullDirPath util.FullPath, prefix string, fn EachEntryFunciton) (err error) {
|
||||
|
||||
return doList(filerClient, fullDirPath, prefix, fn, "", false, math.MaxUint32)
|
||||
|
||||
}
|
||||
|
||||
func List(filerClient FilerClient, parentDirectoryPath, prefix string, fn func(entry *Entry, isLast bool), startFrom string, inclusive bool, limit uint32) (err error) {
|
||||
func List(filerClient FilerClient, parentDirectoryPath, prefix string, fn EachEntryFunciton, startFrom string, inclusive bool, limit uint32) (err error) {
|
||||
|
||||
return doList(filerClient, util.FullPath(parentDirectoryPath), prefix, fn, startFrom, inclusive, limit)
|
||||
|
||||
}
|
||||
|
||||
func doList(filerClient FilerClient, fullDirPath util.FullPath, prefix string, fn func(entry *Entry, isLast bool), startFrom string, inclusive bool, limit uint32) (err error) {
|
||||
func doList(filerClient FilerClient, fullDirPath util.FullPath, prefix string, fn EachEntryFunciton, startFrom string, inclusive bool, limit uint32) (err error) {
|
||||
|
||||
err = filerClient.WithFilerClient(func(client SeaweedFilerClient) error {
|
||||
|
||||
@@ -81,10 +83,12 @@ func doList(filerClient FilerClient, fullDirPath util.FullPath, prefix string, f
|
||||
}
|
||||
|
||||
glog.V(3).Infof("read directory: %v", request)
|
||||
stream, err := client.ListEntries(context.Background(), request)
|
||||
ctx, cancel := context.WithCancel(context.Background())
|
||||
stream, err := client.ListEntries(ctx, request)
|
||||
if err != nil {
|
||||
return fmt.Errorf("list %s: %v", fullDirPath, err)
|
||||
}
|
||||
defer cancel()
|
||||
|
||||
var prevEntry *Entry
|
||||
for {
|
||||
@@ -92,7 +96,9 @@ func doList(filerClient FilerClient, fullDirPath util.FullPath, prefix string, f
|
||||
if recvErr != nil {
|
||||
if recvErr == io.EOF {
|
||||
if prevEntry != nil {
|
||||
fn(prevEntry, true)
|
||||
if err := fn(prevEntry, true); err != nil {
|
||||
return err
|
||||
}
|
||||
}
|
||||
break
|
||||
} else {
|
||||
@@ -100,7 +106,9 @@ func doList(filerClient FilerClient, fullDirPath util.FullPath, prefix string, f
|
||||
}
|
||||
}
|
||||
if prevEntry != nil {
|
||||
fn(prevEntry, false)
|
||||
if err := fn(prevEntry, false); err != nil {
|
||||
return err
|
||||
}
|
||||
}
|
||||
prevEntry = resp.Entry
|
||||
}
|
||||
|
||||
@@ -45,7 +45,7 @@ func TraverseBfs(filerClient FilerClient, parentPath util.FullPath, fn func(pare
|
||||
|
||||
func processOneDirectory(filerClient FilerClient, parentPath util.FullPath, queue *util.Queue, jobQueueWg *sync.WaitGroup, fn func(parentPath util.FullPath, entry *Entry)) (err error) {
|
||||
|
||||
return ReadDirAllEntries(filerClient, parentPath, "", func(entry *Entry, isLast bool) {
|
||||
return ReadDirAllEntries(filerClient, parentPath, "", func(entry *Entry, isLast bool) error {
|
||||
|
||||
fn(parentPath, entry)
|
||||
|
||||
@@ -57,6 +57,7 @@ func processOneDirectory(filerClient FilerClient, parentPath util.FullPath, queu
|
||||
jobQueueWg.Add(1)
|
||||
queue.Enqueue(util.FullPath(subDir))
|
||||
}
|
||||
return nil
|
||||
})
|
||||
|
||||
}
|
||||
@@ -86,9 +86,10 @@ func WithCachedGrpcClient(fn func(*grpc.ClientConn) error, address string, opts
|
||||
err := fn(existingConnection)
|
||||
if err != nil {
|
||||
grpcClientsLock.Lock()
|
||||
delete(grpcClients, address)
|
||||
// delete(grpcClients, address)
|
||||
grpcClientsLock.Unlock()
|
||||
existingConnection.Close()
|
||||
// println("closing existing connection to", existingConnection.Target())
|
||||
// existingConnection.Close()
|
||||
}
|
||||
return err
|
||||
}
|
||||
@@ -105,9 +106,10 @@ func WithCachedGrpcClient(fn func(*grpc.ClientConn) error, address string, opts
|
||||
err = fn(grpcConnection)
|
||||
if err != nil {
|
||||
grpcClientsLock.Lock()
|
||||
delete(grpcClients, address)
|
||||
// delete(grpcClients, address)
|
||||
grpcClientsLock.Unlock()
|
||||
grpcConnection.Close()
|
||||
// println("closing created new connection to", grpcConnection.Target())
|
||||
// grpcConnection.Close()
|
||||
}
|
||||
|
||||
return err
|
||||
|
||||
@@ -27,6 +27,11 @@ service Seaweed {
|
||||
}
|
||||
rpc ListMasterClients (ListMasterClientsRequest) returns (ListMasterClientsResponse) {
|
||||
}
|
||||
rpc LeaseAdminToken (LeaseAdminTokenRequest) returns (LeaseAdminTokenResponse) {
|
||||
}
|
||||
rpc ReleaseAdminToken (ReleaseAdminTokenRequest) returns (ReleaseAdminTokenResponse) {
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
//////////////////////////////////////////////////
|
||||
@@ -274,3 +279,19 @@ message ListMasterClientsRequest {
|
||||
message ListMasterClientsResponse {
|
||||
repeated string grpc_addresses = 1;
|
||||
}
|
||||
|
||||
message LeaseAdminTokenRequest {
|
||||
int64 previous_token = 1;
|
||||
int64 previous_lock_time = 2;
|
||||
}
|
||||
message LeaseAdminTokenResponse {
|
||||
int64 token = 1;
|
||||
int64 lock_ts_ns = 2;
|
||||
}
|
||||
|
||||
message ReleaseAdminTokenRequest {
|
||||
int64 previous_token = 1;
|
||||
int64 previous_lock_time = 2;
|
||||
}
|
||||
message ReleaseAdminTokenResponse {
|
||||
}
|
||||
+308
-150
@@ -44,6 +44,10 @@ It has these top-level messages:
|
||||
GetMasterConfigurationResponse
|
||||
ListMasterClientsRequest
|
||||
ListMasterClientsResponse
|
||||
LeaseAdminTokenRequest
|
||||
LeaseAdminTokenResponse
|
||||
ReleaseAdminTokenRequest
|
||||
ReleaseAdminTokenResponse
|
||||
*/
|
||||
package master_pb
|
||||
|
||||
@@ -428,12 +432,10 @@ type VolumeEcShardInformationMessage struct {
|
||||
EcIndexBits uint32 `protobuf:"varint,3,opt,name=ec_index_bits,json=ecIndexBits" json:"ec_index_bits,omitempty"`
|
||||
}
|
||||
|
||||
func (m *VolumeEcShardInformationMessage) Reset() { *m = VolumeEcShardInformationMessage{} }
|
||||
func (m *VolumeEcShardInformationMessage) String() string { return proto.CompactTextString(m) }
|
||||
func (*VolumeEcShardInformationMessage) ProtoMessage() {}
|
||||
func (*VolumeEcShardInformationMessage) Descriptor() ([]byte, []int) {
|
||||
return fileDescriptor0, []int{4}
|
||||
}
|
||||
func (m *VolumeEcShardInformationMessage) Reset() { *m = VolumeEcShardInformationMessage{} }
|
||||
func (m *VolumeEcShardInformationMessage) String() string { return proto.CompactTextString(m) }
|
||||
func (*VolumeEcShardInformationMessage) ProtoMessage() {}
|
||||
func (*VolumeEcShardInformationMessage) Descriptor() ([]byte, []int) { return fileDescriptor0, []int{4} }
|
||||
|
||||
func (m *VolumeEcShardInformationMessage) GetId() uint32 {
|
||||
if m != nil {
|
||||
@@ -1424,12 +1426,10 @@ type GetMasterConfigurationResponse struct {
|
||||
MetricsIntervalSeconds uint32 `protobuf:"varint,2,opt,name=metrics_interval_seconds,json=metricsIntervalSeconds" json:"metrics_interval_seconds,omitempty"`
|
||||
}
|
||||
|
||||
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{32}
|
||||
}
|
||||
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{32} }
|
||||
|
||||
func (m *GetMasterConfigurationResponse) GetMetricsAddress() string {
|
||||
if m != nil {
|
||||
@@ -1477,6 +1477,86 @@ func (m *ListMasterClientsResponse) GetGrpcAddresses() []string {
|
||||
return nil
|
||||
}
|
||||
|
||||
type LeaseAdminTokenRequest struct {
|
||||
PreviousToken int64 `protobuf:"varint,1,opt,name=previous_token,json=previousToken" json:"previous_token,omitempty"`
|
||||
PreviousLockTime int64 `protobuf:"varint,2,opt,name=previous_lock_time,json=previousLockTime" json:"previous_lock_time,omitempty"`
|
||||
}
|
||||
|
||||
func (m *LeaseAdminTokenRequest) Reset() { *m = LeaseAdminTokenRequest{} }
|
||||
func (m *LeaseAdminTokenRequest) String() string { return proto.CompactTextString(m) }
|
||||
func (*LeaseAdminTokenRequest) ProtoMessage() {}
|
||||
func (*LeaseAdminTokenRequest) Descriptor() ([]byte, []int) { return fileDescriptor0, []int{35} }
|
||||
|
||||
func (m *LeaseAdminTokenRequest) GetPreviousToken() int64 {
|
||||
if m != nil {
|
||||
return m.PreviousToken
|
||||
}
|
||||
return 0
|
||||
}
|
||||
|
||||
func (m *LeaseAdminTokenRequest) GetPreviousLockTime() int64 {
|
||||
if m != nil {
|
||||
return m.PreviousLockTime
|
||||
}
|
||||
return 0
|
||||
}
|
||||
|
||||
type LeaseAdminTokenResponse struct {
|
||||
Token int64 `protobuf:"varint,1,opt,name=token" json:"token,omitempty"`
|
||||
LockTsNs int64 `protobuf:"varint,2,opt,name=lock_ts_ns,json=lockTsNs" json:"lock_ts_ns,omitempty"`
|
||||
}
|
||||
|
||||
func (m *LeaseAdminTokenResponse) Reset() { *m = LeaseAdminTokenResponse{} }
|
||||
func (m *LeaseAdminTokenResponse) String() string { return proto.CompactTextString(m) }
|
||||
func (*LeaseAdminTokenResponse) ProtoMessage() {}
|
||||
func (*LeaseAdminTokenResponse) Descriptor() ([]byte, []int) { return fileDescriptor0, []int{36} }
|
||||
|
||||
func (m *LeaseAdminTokenResponse) GetToken() int64 {
|
||||
if m != nil {
|
||||
return m.Token
|
||||
}
|
||||
return 0
|
||||
}
|
||||
|
||||
func (m *LeaseAdminTokenResponse) GetLockTsNs() int64 {
|
||||
if m != nil {
|
||||
return m.LockTsNs
|
||||
}
|
||||
return 0
|
||||
}
|
||||
|
||||
type ReleaseAdminTokenRequest struct {
|
||||
PreviousToken int64 `protobuf:"varint,1,opt,name=previous_token,json=previousToken" json:"previous_token,omitempty"`
|
||||
PreviousLockTime int64 `protobuf:"varint,2,opt,name=previous_lock_time,json=previousLockTime" json:"previous_lock_time,omitempty"`
|
||||
}
|
||||
|
||||
func (m *ReleaseAdminTokenRequest) Reset() { *m = ReleaseAdminTokenRequest{} }
|
||||
func (m *ReleaseAdminTokenRequest) String() string { return proto.CompactTextString(m) }
|
||||
func (*ReleaseAdminTokenRequest) ProtoMessage() {}
|
||||
func (*ReleaseAdminTokenRequest) Descriptor() ([]byte, []int) { return fileDescriptor0, []int{37} }
|
||||
|
||||
func (m *ReleaseAdminTokenRequest) GetPreviousToken() int64 {
|
||||
if m != nil {
|
||||
return m.PreviousToken
|
||||
}
|
||||
return 0
|
||||
}
|
||||
|
||||
func (m *ReleaseAdminTokenRequest) GetPreviousLockTime() int64 {
|
||||
if m != nil {
|
||||
return m.PreviousLockTime
|
||||
}
|
||||
return 0
|
||||
}
|
||||
|
||||
type ReleaseAdminTokenResponse struct {
|
||||
}
|
||||
|
||||
func (m *ReleaseAdminTokenResponse) Reset() { *m = ReleaseAdminTokenResponse{} }
|
||||
func (m *ReleaseAdminTokenResponse) String() string { return proto.CompactTextString(m) }
|
||||
func (*ReleaseAdminTokenResponse) ProtoMessage() {}
|
||||
func (*ReleaseAdminTokenResponse) Descriptor() ([]byte, []int) { return fileDescriptor0, []int{38} }
|
||||
|
||||
func init() {
|
||||
proto.RegisterType((*Heartbeat)(nil), "master_pb.Heartbeat")
|
||||
proto.RegisterType((*HeartbeatResponse)(nil), "master_pb.HeartbeatResponse")
|
||||
@@ -1516,6 +1596,10 @@ func init() {
|
||||
proto.RegisterType((*GetMasterConfigurationResponse)(nil), "master_pb.GetMasterConfigurationResponse")
|
||||
proto.RegisterType((*ListMasterClientsRequest)(nil), "master_pb.ListMasterClientsRequest")
|
||||
proto.RegisterType((*ListMasterClientsResponse)(nil), "master_pb.ListMasterClientsResponse")
|
||||
proto.RegisterType((*LeaseAdminTokenRequest)(nil), "master_pb.LeaseAdminTokenRequest")
|
||||
proto.RegisterType((*LeaseAdminTokenResponse)(nil), "master_pb.LeaseAdminTokenResponse")
|
||||
proto.RegisterType((*ReleaseAdminTokenRequest)(nil), "master_pb.ReleaseAdminTokenRequest")
|
||||
proto.RegisterType((*ReleaseAdminTokenResponse)(nil), "master_pb.ReleaseAdminTokenResponse")
|
||||
}
|
||||
|
||||
// Reference imports to suppress errors if they are not otherwise used.
|
||||
@@ -1540,6 +1624,8 @@ type SeaweedClient interface {
|
||||
LookupEcVolume(ctx context.Context, in *LookupEcVolumeRequest, opts ...grpc.CallOption) (*LookupEcVolumeResponse, error)
|
||||
GetMasterConfiguration(ctx context.Context, in *GetMasterConfigurationRequest, opts ...grpc.CallOption) (*GetMasterConfigurationResponse, error)
|
||||
ListMasterClients(ctx context.Context, in *ListMasterClientsRequest, opts ...grpc.CallOption) (*ListMasterClientsResponse, error)
|
||||
LeaseAdminToken(ctx context.Context, in *LeaseAdminTokenRequest, opts ...grpc.CallOption) (*LeaseAdminTokenResponse, error)
|
||||
ReleaseAdminToken(ctx context.Context, in *ReleaseAdminTokenRequest, opts ...grpc.CallOption) (*ReleaseAdminTokenResponse, error)
|
||||
}
|
||||
|
||||
type seaweedClient struct {
|
||||
@@ -1693,6 +1779,24 @@ func (c *seaweedClient) ListMasterClients(ctx context.Context, in *ListMasterCli
|
||||
return out, nil
|
||||
}
|
||||
|
||||
func (c *seaweedClient) LeaseAdminToken(ctx context.Context, in *LeaseAdminTokenRequest, opts ...grpc.CallOption) (*LeaseAdminTokenResponse, error) {
|
||||
out := new(LeaseAdminTokenResponse)
|
||||
err := grpc.Invoke(ctx, "/master_pb.Seaweed/LeaseAdminToken", in, out, c.cc, opts...)
|
||||
if err != nil {
|
||||
return nil, err
|
||||
}
|
||||
return out, nil
|
||||
}
|
||||
|
||||
func (c *seaweedClient) ReleaseAdminToken(ctx context.Context, in *ReleaseAdminTokenRequest, opts ...grpc.CallOption) (*ReleaseAdminTokenResponse, error) {
|
||||
out := new(ReleaseAdminTokenResponse)
|
||||
err := grpc.Invoke(ctx, "/master_pb.Seaweed/ReleaseAdminToken", in, out, c.cc, opts...)
|
||||
if err != nil {
|
||||
return nil, err
|
||||
}
|
||||
return out, nil
|
||||
}
|
||||
|
||||
// Server API for Seaweed service
|
||||
|
||||
type SeaweedServer interface {
|
||||
@@ -1707,6 +1811,8 @@ type SeaweedServer interface {
|
||||
LookupEcVolume(context.Context, *LookupEcVolumeRequest) (*LookupEcVolumeResponse, error)
|
||||
GetMasterConfiguration(context.Context, *GetMasterConfigurationRequest) (*GetMasterConfigurationResponse, error)
|
||||
ListMasterClients(context.Context, *ListMasterClientsRequest) (*ListMasterClientsResponse, error)
|
||||
LeaseAdminToken(context.Context, *LeaseAdminTokenRequest) (*LeaseAdminTokenResponse, error)
|
||||
ReleaseAdminToken(context.Context, *ReleaseAdminTokenRequest) (*ReleaseAdminTokenResponse, error)
|
||||
}
|
||||
|
||||
func RegisterSeaweedServer(s *grpc.Server, srv SeaweedServer) {
|
||||
@@ -1927,6 +2033,42 @@ func _Seaweed_ListMasterClients_Handler(srv interface{}, ctx context.Context, de
|
||||
return interceptor(ctx, in, info, handler)
|
||||
}
|
||||
|
||||
func _Seaweed_LeaseAdminToken_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) {
|
||||
in := new(LeaseAdminTokenRequest)
|
||||
if err := dec(in); err != nil {
|
||||
return nil, err
|
||||
}
|
||||
if interceptor == nil {
|
||||
return srv.(SeaweedServer).LeaseAdminToken(ctx, in)
|
||||
}
|
||||
info := &grpc.UnaryServerInfo{
|
||||
Server: srv,
|
||||
FullMethod: "/master_pb.Seaweed/LeaseAdminToken",
|
||||
}
|
||||
handler := func(ctx context.Context, req interface{}) (interface{}, error) {
|
||||
return srv.(SeaweedServer).LeaseAdminToken(ctx, req.(*LeaseAdminTokenRequest))
|
||||
}
|
||||
return interceptor(ctx, in, info, handler)
|
||||
}
|
||||
|
||||
func _Seaweed_ReleaseAdminToken_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) {
|
||||
in := new(ReleaseAdminTokenRequest)
|
||||
if err := dec(in); err != nil {
|
||||
return nil, err
|
||||
}
|
||||
if interceptor == nil {
|
||||
return srv.(SeaweedServer).ReleaseAdminToken(ctx, in)
|
||||
}
|
||||
info := &grpc.UnaryServerInfo{
|
||||
Server: srv,
|
||||
FullMethod: "/master_pb.Seaweed/ReleaseAdminToken",
|
||||
}
|
||||
handler := func(ctx context.Context, req interface{}) (interface{}, error) {
|
||||
return srv.(SeaweedServer).ReleaseAdminToken(ctx, req.(*ReleaseAdminTokenRequest))
|
||||
}
|
||||
return interceptor(ctx, in, info, handler)
|
||||
}
|
||||
|
||||
var _Seaweed_serviceDesc = grpc.ServiceDesc{
|
||||
ServiceName: "master_pb.Seaweed",
|
||||
HandlerType: (*SeaweedServer)(nil),
|
||||
@@ -1967,6 +2109,14 @@ var _Seaweed_serviceDesc = grpc.ServiceDesc{
|
||||
MethodName: "ListMasterClients",
|
||||
Handler: _Seaweed_ListMasterClients_Handler,
|
||||
},
|
||||
{
|
||||
MethodName: "LeaseAdminToken",
|
||||
Handler: _Seaweed_LeaseAdminToken_Handler,
|
||||
},
|
||||
{
|
||||
MethodName: "ReleaseAdminToken",
|
||||
Handler: _Seaweed_ReleaseAdminToken_Handler,
|
||||
},
|
||||
},
|
||||
Streams: []grpc.StreamDesc{
|
||||
{
|
||||
@@ -1988,142 +2138,150 @@ var _Seaweed_serviceDesc = grpc.ServiceDesc{
|
||||
func init() { proto.RegisterFile("master.proto", fileDescriptor0) }
|
||||
|
||||
var fileDescriptor0 = []byte{
|
||||
// 2183 bytes of a gzipped FileDescriptorProto
|
||||
0x1f, 0x8b, 0x08, 0x00, 0x00, 0x09, 0x6e, 0x88, 0x02, 0xff, 0xd4, 0x59, 0xcd, 0x6f, 0x1b, 0xc7,
|
||||
0x15, 0xf7, 0x92, 0x94, 0x48, 0x3e, 0x7e, 0x8f, 0x64, 0x85, 0x66, 0x62, 0x8b, 0xde, 0xa4, 0x88,
|
||||
0xec, 0xa6, 0x6a, 0xaa, 0x04, 0x68, 0xd0, 0x34, 0x08, 0x2c, 0x59, 0x71, 0x05, 0x5b, 0x8a, 0xbd,
|
||||
0x72, 0x1d, 0xa0, 0x40, 0xb1, 0x19, 0xee, 0x8e, 0xa4, 0x85, 0xf6, 0xab, 0xbb, 0x43, 0x59, 0x4c,
|
||||
0x2f, 0x05, 0x7a, 0xec, 0xa9, 0xe8, 0xa1, 0xff, 0x42, 0x2f, 0x3d, 0xb5, 0x97, 0x5e, 0x72, 0xe9,
|
||||
0x7f, 0xd4, 0x6b, 0x2e, 0xc5, 0x7c, 0xed, 0xce, 0x2e, 0x49, 0x29, 0x0a, 0x90, 0x83, 0x6f, 0xbb,
|
||||
0xef, 0xbd, 0x79, 0xf3, 0xf6, 0xf7, 0xe6, 0xbd, 0xf9, 0x3d, 0x12, 0xda, 0x01, 0x4e, 0x29, 0x49,
|
||||
0xb6, 0xe3, 0x24, 0xa2, 0x11, 0x6a, 0x8a, 0x37, 0x3b, 0x9e, 0x98, 0x7f, 0x59, 0x85, 0xe6, 0x6f,
|
||||
0x08, 0x4e, 0xe8, 0x84, 0x60, 0x8a, 0xba, 0x50, 0xf1, 0xe2, 0xa1, 0x31, 0x36, 0xb6, 0x9a, 0x56,
|
||||
0xc5, 0x8b, 0x11, 0x82, 0x5a, 0x1c, 0x25, 0x74, 0x58, 0x19, 0x1b, 0x5b, 0x1d, 0x8b, 0x3f, 0xa3,
|
||||
0xbb, 0x00, 0xf1, 0x74, 0xe2, 0x7b, 0x8e, 0x3d, 0x4d, 0xfc, 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x71, 0x33, 0x77, 0xad, 0x1b, 0xba, 0xeb, 0x4a,
|
||||
0x07, 0xca, 0xe5, 0x7b, 0xd0, 0x3d, 0xc3, 0xa9, 0x1d, 0x46, 0x99, 0xc7, 0xf6, 0xd8, 0xd8, 0x6a,
|
||||
0x58, 0xed, 0x33, 0x9c, 0x1e, 0x45, 0xca, 0xea, 0x09, 0x34, 0x89, 0x63, 0xa7, 0x67, 0x38, 0x71,
|
||||
0xd3, 0x61, 0x9f, 0x6f, 0xf9, 0x70, 0x6e, 0xcb, 0x7d, 0xe7, 0x98, 0x19, 0x2c, 0xd8, 0xb4, 0x41,
|
||||
0x84, 0x2a, 0x45, 0x47, 0xd0, 0x61, 0x60, 0xe4, 0xce, 0x06, 0x37, 0x76, 0xc6, 0xd0, 0xdc, 0x57,
|
||||
0xfe, 0x5e, 0xc1, 0x40, 0x21, 0x92, 0xfb, 0x44, 0x37, 0xf6, 0xa9, 0x60, 0xcd, 0xfc, 0xbe, 0x0f,
|
||||
0x7d, 0x09, 0x4b, 0xee, 0x76, 0x8d, 0x03, 0xd3, 0xe1, 0xc0, 0x28, 0x43, 0xf3, 0x4f, 0x15, 0x18,
|
||||
0x64, 0xd5, 0x60, 0x91, 0x34, 0x8e, 0xc2, 0x94, 0xa0, 0x87, 0x30, 0x90, 0xc7, 0x39, 0xf5, 0xbe,
|
||||
0x21, 0xb6, 0xef, 0x05, 0x1e, 0xe5, 0x45, 0x52, 0xb3, 0x7a, 0x42, 0x71, 0xec, 0x7d, 0x43, 0x9e,
|
||||
0x31, 0x31, 0xda, 0x80, 0x55, 0x9f, 0x60, 0x97, 0x24, 0xbc, 0x66, 0x9a, 0x96, 0x7c, 0x43, 0xef,
|
||||
0x43, 0x2f, 0x20, 0x34, 0xf1, 0x9c, 0xd4, 0xc6, 0xae, 0x9b, 0x90, 0x34, 0x95, 0xa5, 0xd3, 0x95,
|
||||
0xe2, 0x47, 0x42, 0x8a, 0x3e, 0x81, 0xa1, 0x32, 0xf4, 0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10, 0xea, 0x17, 0x24, 0x49, 0xd9, 0x67, 0x35, 0xb9, 0x89,
|
||||
0x7a, 0x45, 0x7d, 0xa8, 0x52, 0xea, 0x0f, 0x81, 0x4b, 0xd9, 0x23, 0x7a, 0x00, 0x7d, 0x27, 0x0a,
|
||||
0x62, 0xec, 0x50, 0x3b, 0x21, 0x17, 0x1e, 0x5f, 0xd4, 0xe2, 0xea, 0x9e, 0x94, 0x5b, 0x52, 0xcc,
|
||||
0x3e, 0x27, 0x88, 0x5c, 0xef, 0xc4, 0x23, 0xae, 0x8d, 0xa9, 0x4c, 0x36, 0x2f, 0xdc, 0xaa, 0xd5,
|
||||
0x57, 0x9a, 0x47, 0x54, 0xa4, 0x19, 0x6d, 0xc3, 0x5a, 0x42, 0x82, 0x88, 0x12, 0x5b, 0x25, 0x3b,
|
||||
0xc4, 0x01, 0x19, 0x76, 0x38, 0xce, 0x03, 0xa1, 0x92, 0x39, 0x3e, 0xc2, 0x01, 0x61, 0xde, 0x4b,
|
||||
0xf6, 0xac, 0xd7, 0x76, 0xb9, 0x79, 0xbf, 0x60, 0xfe, 0x94, 0xcc, 0xcc, 0x7f, 0x18, 0x70, 0xf7,
|
||||
0xca, 0x96, 0x33, 0x77, 0x04, 0xae, 0x4b, 0xf7, 0x8f, 0x85, 0xb0, 0x39, 0x85, 0xcd, 0x6b, 0x1a,
|
||||
0xc1, 0x35, 0xb1, 0x56, 0xe6, 0x62, 0x35, 0xa1, 0x43, 0x1c, 0xdb, 0x0b, 0x5d, 0x72, 0x69, 0x4f,
|
||||
0x3c, 0x2a, 0x4a, 0xb4, 0x63, 0xb5, 0x88, 0x73, 0xc0, 0x64, 0xbb, 0x1e, 0x4d, 0xcd, 0x6f, 0x0d,
|
||||
0xe8, 0x16, 0x6b, 0x88, 0x55, 0x01, 0x9d, 0xc5, 0x44, 0xde, 0x9b, 0xfc, 0x59, 0x6e, 0x5d, 0x91,
|
||||
0x37, 0xa9, 0x8b, 0x0e, 0x00, 0xe2, 0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, 0xd4, 0x3b, 0x0d, 0x55, 0x0a, 0xd6, 0x61, 0x45, 0xdc, 0x3b, 0x82, 0x08, 0x88, 0x17,
|
||||
0x34, 0x86, 0x96, 0x6c, 0x6a, 0x1a, 0xf4, 0xba, 0xe8, 0xda, 0x7e, 0x29, 0x1b, 0x5d, 0x4d, 0x84,
|
||||
0xc6, 0xae, 0x92, 0x12, 0x0b, 0x5e, 0x59, 0xca, 0x82, 0x57, 0x35, 0x16, 0xfc, 0x36, 0x34, 0xf9,
|
||||
0xa2, 0x30, 0x72, 0x89, 0xa4, 0xc7, 0x0d, 0x26, 0x38, 0x8a, 0x5c, 0x82, 0x76, 0x60, 0x23, 0x20,
|
||||
0x41, 0x94, 0xcc, 0xec, 0x00, 0xc7, 0x36, 0x23, 0xe1, 0x9c, 0xd8, 0x04, 0x13, 0xd9, 0x98, 0x91,
|
||||
0xd0, 0x1e, 0xe2, 0xf8, 0x10, 0x5f, 0x32, 0x6e, 0x73, 0x38, 0x41, 0x3b, 0x70, 0xfb, 0xab, 0xc4,
|
||||
0xa3, 0x78, 0xe2, 0x93, 0x22, 0xb9, 0x17, 0x8d, 0x7a, 0x4d, 0x29, 0x35, 0x86, 0x6f, 0xfe, 0xcd,
|
||||
0x80, 0xae, 0x42, 0x4d, 0x9e, 0xb0, 0x3e, 0x54, 0x4f, 0xb2, 0x2c, 0xb3, 0x47, 0x95, 0x8b, 0xca,
|
||||
0xb2, 0x5c, 0xcc, 0x4d, 0x18, 0x19, 0xf2, 0x35, 0x1d, 0xf9, 0x2c, 0xe9, 0x2b, 0x5a, 0xd2, 0x19,
|
||||
0x34, 0x78, 0x4a, 0xcf, 0x14, 0x34, 0xec, 0xd9, 0x3c, 0x85, 0xc1, 0x31, 0xc5, 0xd4, 0x4b, 0xa9,
|
||||
0xe7, 0xa4, 0x2a, 0x9d, 0xa5, 0xc4, 0x19, 0xd7, 0x25, 0xae, 0xb2, 0x2c, 0x71, 0xd5, 0x2c, 0x71,
|
||||
0xe6,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 0x85, 0xef, 0x91, 0x90, 0x66, 0x3c,
|
||||
0x73, 0x13, 0x5a, 0x0e, 0x97, 0xd8, 0xda, 0x4f, 0x06, 0x20, 0x44, 0x8c, 0x5f, 0x99, 0xbb, 0x70,
|
||||
0x67, 0xc1, 0x62, 0x19, 0xfc, 0x4f, 0xa0, 0xcb, 0xa7, 0x58, 0x19, 0x39, 0x51, 0xb3, 0x5f, 0x87,
|
||||
0x49, 0x1f, 0x29, 0xe1, 0xce, 0x7f, 0xea, 0x50, 0x3f, 0x26, 0xf8, 0x35, 0x21, 0x2e, 0x3a, 0x80,
|
||||
0xce, 0x31, 0x09, 0xdd, 0xfc, 0x37, 0xfe, 0x75, 0x0d, 0xe4, 0x4c, 0x3a, 0x7a, 0x67, 0x91, 0x34,
|
||||
0xe3, 0x20, 0xb7, 0xb6, 0x8c, 0x0f, 0x0d, 0xf4, 0x02, 0x3a, 0x85, 0x79, 0x1b, 0x6d, 0x6a, 0x8b,
|
||||
0x16, 0x4d, 0xe2, 0xa3, 0x3b, 0x73, 0x37, 0xb2, 0x4a, 0x6b, 0xe6, 0xb2, 0xad, 0x8f, 0x92, 0xe8,
|
||||
0xde, 0xd2, 0x19, 0x53, 0x38, 0xdc, 0xbc, 0x66, 0x06, 0x35, 0x6f, 0xa1, 0xcf, 0x61, 0x55, 0xcc,
|
||||
0x1c, 0x68, 0xa8, 0x19, 0x17, 0x86, 0xb7, 0x42, 0x5c, 0xc5, 0x01, 0xc5, 0xbc, 0x85, 0x9e, 0x02,
|
||||
0xe4, 0xac, 0x1d, 0xbd, 0x53, 0xf8, 0x91, 0xa6, 0x34, 0x36, 0x8c, 0xee, 0x2e, 0xd1, 0x66, 0xce,
|
||||
0xbe, 0x82, 0x6e, 0x91, 0x5b, 0xa2, 0xf1, 0x42, 0xfa, 0xa8, 0x35, 0xa8, 0xd1, 0xfd, 0x2b, 0x2c,
|
||||
0x32, 0xc7, 0xbf, 0x87, 0x7e, 0x99, 0x32, 0x22, 0x73, 0xe1, 0xc2, 0x02, 0xfd, 0x1c, 0xbd, 0x7b,
|
||||
0xa5, 0x8d, 0x0e, 0x42, 0xde, 0x23, 0x0b, 0x20, 0xcc, 0x35, 0xd4, 0x02, 0x08, 0xf3, 0x8d, 0x55,
|
||||
0x80, 0x50, 0x6c, 0x2c, 0x05, 0x10, 0x16, 0xb6, 0xc1, 0x02, 0x08, 0x8b, 0xbb, 0x92, 0x79, 0x0b,
|
||||
0x45, 0xb0, 0xb1, 0xb8, 0xdc, 0x91, 0xfe, 0x83, 0xd5, 0x95, 0x3d, 0x63, 0xf4, 0xe0, 0x7b, 0x58,
|
||||
0x66, 0x1b, 0x7e, 0x0d, 0x83, 0xb9, 0xea, 0x44, 0x3a, 0xa4, 0xcb, 0x0a, 0x7f, 0xf4, 0xde, 0xd5,
|
||||
0x46, 0x6a, 0x87, 0xc9, 0x2a, 0xff, 0x8b, 0xee, 0xa3, 0xff, 0x07, 0x00, 0x00, 0xff, 0xff, 0x6a,
|
||||
0xee, 0xfc, 0x90, 0xb2, 0x1b, 0x00, 0x00,
|
||||
// 2320 bytes of a gzipped FileDescriptorProto
|
||||
0x1f, 0x8b, 0x08, 0x00, 0x00, 0x09, 0x6e, 0x88, 0x02, 0xff, 0xd4, 0x59, 0x4b, 0x6f, 0x1c, 0xc7,
|
||||
0xf1, 0xd7, 0xee, 0xf2, 0xb1, 0x5b, 0xcb, 0x7d, 0x35, 0x29, 0x6a, 0xb9, 0x7a, 0x90, 0x1a, 0xdb,
|
||||
0x30, 0xa5, 0xbf, 0xff, 0x8c, 0x43, 0x1b, 0x88, 0x11, 0xc7, 0x30, 0x28, 0x8a, 0x56, 0x08, 0x91,
|
||||
0xb4, 0x34, 0x64, 0x64, 0xc0, 0x40, 0x30, 0xee, 0x9d, 0x69, 0x52, 0x03, 0xce, 0x2b, 0xd3, 0xbd,
|
||||
0x14, 0xd7, 0xb9, 0x04, 0xc8, 0x31, 0xa7, 0x20, 0x87, 0x7c, 0x85, 0x5c, 0x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xda, 0x15, 0x12, 0x1e, 0x5f,
|
||||
0x8a, 0xdd, 0xf3, 0xfe, 0xa2, 0xd0, 0x88, 0x67, 0x1e, 0x1f, 0xf6, 0x42, 0x3f, 0x72, 0x44, 0xe4,
|
||||
0x75, 0xb1, 0x74, 0x43, 0x48, 0x5e, 0xf0, 0xf0, 0x3f, 0x83, 0x45, 0x19, 0x1b, 0xed, 0x37, 0x36,
|
||||
0x6a, 0x9b, 0xcd, 0xed, 0x77, 0xb6, 0x32, 0x34, 0xb6, 0x64, 0x78, 0xfb, 0xd1, 0x69, 0x9c, 0x86,
|
||||
0x98, 0xf9, 0x71, 0x74, 0x48, 0x28, 0xc5, 0x67, 0xc4, 0xd6, 0x73, 0xd0, 0x3e, 0x34, 0x23, 0xf2,
|
||||
0xc6, 0xd1, 0x2e, 0x40, 0xb8, 0xd8, 0x9c, 0x70, 0x71, 0xfc, 0x3a, 0x4e, 0xd9, 0x14, 0x3f, 0x10,
|
||||
0x91, 0x37, 0xaf, 0x94, 0xab, 0x97, 0xd0, 0xf1, 0x48, 0x40, 0x18, 0xf1, 0x32, 0x77, 0xcd, 0x1b,
|
||||
0xba, 0x6b, 0x2b, 0x07, 0xda, 0xe5, 0xbb, 0xd0, 0x7e, 0x8d, 0xa9, 0x13, 0xc5, 0x99, 0xc7, 0xa5,
|
||||
0x8d, 0xca, 0x66, 0xdd, 0x5e, 0x7a, 0x8d, 0xe9, 0x51, 0xac, 0xad, 0x9e, 0x41, 0x83, 0xb8, 0x0e,
|
||||
0x7d, 0x8d, 0x53, 0x8f, 0xf6, 0xbb, 0x62, 0xc9, 0xc7, 0x13, 0x4b, 0xee, 0xb9, 0xc7, 0xdc, 0x60,
|
||||
0xca, 0xa2, 0x75, 0x22, 0x55, 0x14, 0x1d, 0x41, 0x8b, 0x83, 0x91, 0x3b, 0xeb, 0xdd, 0xd8, 0x19,
|
||||
0x47, 0x73, 0x4f, 0xfb, 0x7b, 0x05, 0x3d, 0x8d, 0x48, 0xee, 0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xe8, 0x01, 0x80, 0x1b, 0x07, 0x01, 0x71, 0xf9,
|
||||
0x44, 0xf5, 0x92, 0x86, 0x84, 0x9f, 0x4f, 0x71, 0xe4, 0xf3, 0xd2, 0x30, 0x67, 0x37, 0xb8, 0x44,
|
||||
0x56, 0x85, 0x87, 0xb0, 0x24, 0xd3, 0xa7, 0x0c, 0x64, 0x55, 0x68, 0x4a, 0x99, 0x34, 0xf9, 0x00,
|
||||
0x90, 0xde, 0x26, 0xc3, 0x71, 0x66, 0xb8, 0x20, 0x0c, 0xbb, 0x4a, 0xf3, 0x64, 0xac, 0xad, 0xef,
|
||||
0x42, 0x23, 0x25, 0xd8, 0x73, 0xe2, 0x28, 0x18, 0x8b, 0x42, 0x51, 0xb7, 0xeb, 0x5c, 0xf0, 0x65,
|
||||
0x14, 0x8c, 0xd1, 0xff, 0x41, 0x2f, 0x25, 0x49, 0xe0, 0xbb, 0xd8, 0x49, 0x02, 0xec, 0x92, 0x90,
|
||||
0x44, 0xba, 0x66, 0x74, 0x95, 0xe2, 0x85, 0x96, 0xa3, 0x3e, 0x2c, 0x5e, 0x90, 0x94, 0xf2, 0xd7,
|
||||
0x6a, 0x08, 0x13, 0x3d, 0x44, 0x5d, 0xa8, 0x31, 0x16, 0xf4, 0x41, 0x48, 0xf9, 0x23, 0x7a, 0x04,
|
||||
0x5d, 0x37, 0x0e, 0x13, 0xec, 0x32, 0x27, 0x25, 0x17, 0xbe, 0x98, 0xd4, 0x14, 0xea, 0x8e, 0x92,
|
||||
0xdb, 0x4a, 0xcc, 0x5f, 0x27, 0x8c, 0x3d, 0xff, 0xd4, 0x27, 0x9e, 0x83, 0x99, 0x4a, 0xb6, 0x38,
|
||||
0xb8, 0x35, 0xbb, 0xab, 0x35, 0x3b, 0x4c, 0xa6, 0x19, 0x6d, 0xc1, 0x72, 0x4a, 0xc2, 0x98, 0x11,
|
||||
0x47, 0x27, 0x3b, 0xc2, 0x21, 0xe9, 0xb7, 0x04, 0xce, 0x3d, 0x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0x47, 0x29, 0x3f, 0x55, 0x9e, 0x1f, 0x9d,
|
||||
0x09, 0x9f, 0xc5, 0x96, 0x54, 0x9a, 0xb3, 0xb5, 0x27, 0x27, 0xec, 0x0a, 0x7b, 0xbb, 0x45, 0xcc,
|
||||
0xe1, 0xe0, 0x6b, 0x68, 0x15, 0xf4, 0x1c, 0x2c, 0xde, 0xc0, 0x55, 0x56, 0xc4, 0x33, 0x2f, 0x9a,
|
||||
0x09, 0x4e, 0x7d, 0x36, 0x56, 0x44, 0x43, 0x8d, 0x78, 0xa9, 0x50, 0x85, 0xd7, 0xf7, 0x24, 0x68,
|
||||
0x2d, 0xbb, 0x21, 0x25, 0xfb, 0x1e, 0xb5, 0x9e, 0xc1, 0xca, 0x73, 0x42, 0x92, 0xdd, 0x38, 0x8a,
|
||||
0x88, 0xcb, 0x88, 0x67, 0x93, 0xdf, 0x8d, 0x08, 0x65, 0x7c, 0x09, 0x71, 0x26, 0x54, 0x3e, 0xf8,
|
||||
0x33, 0xaf, 0x02, 0x67, 0x69, 0xe2, 0x3a, 0x06, 0x9d, 0xa9, 0x73, 0x01, 0xe7, 0x04, 0xd6, 0x5f,
|
||||
0x2b, 0xd0, 0x96, 0x7b, 0xe9, 0x20, 0x76, 0xc5, 0x0e, 0xe2, 0x88, 0x72, 0x7a, 0xa3, 0x10, 0x1d,
|
||||
0xa5, 0x41, 0x89, 0xf7, 0x54, 0xcb, 0xbc, 0x67, 0x0d, 0xea, 0x82, 0x18, 0xe4, 0x91, 0x2e, 0xf2,
|
||||
0x5e, 0xef, 0x7b, 0x34, 0x2f, 0x69, 0x9e, 0x54, 0xcf, 0x09, 0x75, 0x53, 0xf7, 0x6e, 0x6e, 0x92,
|
||||
0xb7, 0x8d, 0x79, 0xb3, 0x6d, 0x58, 0x27, 0xb0, 0x7c, 0x10, 0xc7, 0xe7, 0xa3, 0x44, 0x86, 0xa7,
|
||||
0xdf, 0xb0, 0x08, 0x4c, 0x65, 0xa3, 0xc6, 0x63, 0xc9, 0x80, 0xb9, 0x6e, 0x9f, 0x5b, 0xff, 0xae,
|
||||
0xc0, 0x4a, 0xd1, 0xad, 0xea, 0x74, 0xdf, 0xc0, 0x72, 0xe6, 0xd7, 0x09, 0x14, 0x16, 0x72, 0x81,
|
||||
0xe6, 0xf6, 0x87, 0xc6, 0x1e, 0x98, 0x36, 0x5b, 0xb3, 0x27, 0x4f, 0x83, 0x68, 0xf7, 0x2e, 0x4a,
|
||||
0x12, 0x3a, 0xb8, 0x84, 0x6e, 0xd9, 0x8c, 0xe7, 0x26, 0x5b, 0x55, 0x21, 0x5e, 0xd7, 0x33, 0xd1,
|
||||
0xcf, 0xa1, 0x91, 0x07, 0x52, 0x15, 0x81, 0x2c, 0x17, 0x02, 0x51, 0x6b, 0xe5, 0x56, 0x7c, 0xef,
|
||||
0x93, 0x34, 0x8d, 0x53, 0x55, 0x8d, 0xe4, 0xc0, 0xfa, 0x14, 0xea, 0x3f, 0x3a, 0xbb, 0xd6, 0x3f,
|
||||
0xaa, 0xd0, 0xda, 0xa1, 0xd4, 0x3f, 0x8b, 0x74, 0x0a, 0x56, 0x60, 0x5e, 0xf6, 0x1d, 0x49, 0x04,
|
||||
0xe4, 0x00, 0x6d, 0x40, 0x53, 0x15, 0x35, 0x03, 0x7a, 0x53, 0x74, 0x6d, 0xbd, 0x54, 0x85, 0x6e,
|
||||
0x4e, 0x86, 0xc6, 0x5b, 0x49, 0x89, 0x05, 0xcf, 0xcf, 0x64, 0xc1, 0x0b, 0x06, 0x0b, 0xbe, 0x0b,
|
||||
0x0d, 0x31, 0x29, 0x8a, 0x3d, 0xa2, 0xe8, 0x71, 0x9d, 0x0b, 0x8e, 0x62, 0x8f, 0xa0, 0x6d, 0x58,
|
||||
0x0d, 0x49, 0x18, 0xa7, 0x63, 0x27, 0xc4, 0x89, 0xc3, 0x49, 0xb8, 0x20, 0x36, 0xe1, 0x50, 0x15,
|
||||
0x66, 0x24, 0xb5, 0x87, 0x38, 0x39, 0xc4, 0x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0x96, 0xa7, 0xa9, 0xf8, 0xaf, 0x9a, 0x87, 0x30, 0x20, 0x55, 0x2f, 0x4d, 0x5e, 0x2f, 0xe9,
|
||||
0xf4, 0x47, 0x13, 0xbc, 0xbe, 0xec, 0x7b, 0x4b, 0xd7, 0xd1, 0x9c, 0xda, 0x77, 0x69, 0x51, 0x40,
|
||||
0x07, 0x18, 0x7a, 0x13, 0x66, 0xfc, 0x56, 0xa4, 0xd7, 0x55, 0x31, 0x2d, 0xaa, 0x89, 0x3f, 0x82,
|
||||
0xd8, 0x5b, 0xeb, 0x70, 0xff, 0x19, 0x61, 0x87, 0xc2, 0x66, 0x37, 0x8e, 0x4e, 0xfd, 0xb3, 0x51,
|
||||
0x2a, 0x8d, 0xf2, 0xd4, 0x3e, 0x98, 0x65, 0xa1, 0x60, 0x9a, 0xf2, 0x21, 0xae, 0x72, 0xe3, 0x0f,
|
||||
0x71, 0xd5, 0xab, 0x3e, 0xc4, 0x59, 0x9f, 0x42, 0x9f, 0xef, 0x2c, 0x15, 0x45, 0xe0, 0x93, 0x88,
|
||||
0x65, 0x3c, 0x73, 0x1d, 0x9a, 0xae, 0x90, 0x38, 0xc6, 0x27, 0x03, 0x90, 0x22, 0xce, 0xaf, 0xac,
|
||||
0x27, 0xb0, 0x36, 0x65, 0xb2, 0x0a, 0xfe, 0x3d, 0x68, 0x8b, 0x5b, 0xac, 0x8a, 0x9c, 0xe8, 0xbb,
|
||||
0x5f, 0x8b, 0x4b, 0x77, 0xb4, 0xd0, 0x0a, 0x61, 0xf5, 0x80, 0x60, 0x4a, 0x76, 0xbc, 0xd0, 0x8f,
|
||||
0x4e, 0xe2, 0x73, 0x92, 0xdd, 0x5a, 0xde, 0x83, 0x76, 0x92, 0x92, 0x0b, 0x3f, 0x1e, 0x51, 0x87,
|
||||
0x71, 0x85, 0x88, 0xa0, 0x66, 0xb7, 0xb4, 0x54, 0x58, 0x73, 0xfe, 0x94, 0x99, 0xf1, 0x8b, 0xbe,
|
||||
0xc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xd1,
|
||||
0xc6, 0x54, 0x2a, 0x6e, 0x14, 0xfb, 0xc1, 0xc3, 0x2b, 0x2c, 0x32, 0xc7, 0xbf, 0x85, 0x6e, 0x99,
|
||||
0x7e, 0x23, 0x6b, 0xea, 0xc4, 0x02, 0x95, 0x1f, 0xbc, 0x73, 0xa5, 0x8d, 0x09, 0x42, 0xde, 0x6f,
|
||||
0x0a, 0x20, 0x4c, 0x34, 0xa7, 0x02, 0x08, 0x93, 0x4d, 0x4a, 0x82, 0x50, 0x2c, 0xd2, 0x05, 0x10,
|
||||
0xa6, 0xb6, 0x94, 0x02, 0x08, 0xd3, 0x2b, 0xbc, 0x75, 0x0b, 0xc5, 0xb0, 0x3a, 0xbd, 0x74, 0x22,
|
||||
0xf3, 0xe3, 0xdf, 0x95, 0xf5, 0x77, 0xf0, 0xe8, 0x07, 0x58, 0x66, 0x0b, 0x7e, 0x03, 0xbd, 0x89,
|
||||
0x4a, 0x87, 0x4c, 0x48, 0x67, 0x15, 0xd1, 0xc1, 0xbb, 0x57, 0x1b, 0x65, 0x2b, 0x7c, 0x0d, 0x9d,
|
||||
0x52, 0x61, 0x42, 0x05, 0x28, 0xa6, 0xd6, 0x98, 0x81, 0x75, 0x95, 0x89, 0x19, 0xfd, 0x44, 0xd1,
|
||||
0x28, 0x44, 0x3f, 0xab, 0x86, 0x15, 0xa2, 0x9f, 0x59, 0x77, 0xac, 0x5b, 0xc3, 0x05, 0xf1, 0xb3,
|
||||
0xf6, 0xa3, 0xff, 0x06, 0x00, 0x00, 0xff, 0xff, 0x9c, 0x7a, 0x09, 0x55, 0xbc, 0x1d, 0x00, 0x00,
|
||||
}
|
||||
+26
-4
@@ -15,12 +15,18 @@ service SeaweedMessaging {
|
||||
rpc Publish (stream PublishRequest) returns (stream PublishResponse) {
|
||||
}
|
||||
|
||||
rpc DeleteTopic (DeleteTopicRequest) returns (DeleteTopicResponse) {
|
||||
}
|
||||
|
||||
rpc ConfigureTopic (ConfigureTopicRequest) returns (ConfigureTopicResponse) {
|
||||
}
|
||||
|
||||
rpc GetTopicConfiguration (GetTopicConfigurationRequest) returns (GetTopicConfigurationResponse) {
|
||||
}
|
||||
|
||||
rpc FindBroker (FindBrokerRequest) returns (FindBrokerResponse) {
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
//////////////////////////////////////////////////
|
||||
@@ -44,6 +50,7 @@ message SubscriberMessage {
|
||||
int64 message_id = 1;
|
||||
}
|
||||
AckMessage ack = 2;
|
||||
bool is_close = 3;
|
||||
}
|
||||
|
||||
message Message {
|
||||
@@ -51,14 +58,11 @@ message Message {
|
||||
bytes key = 2; // Message key
|
||||
bytes value = 3; // Message payload
|
||||
map<string, bytes> headers = 4; // Message headers
|
||||
bool is_close = 5;
|
||||
}
|
||||
|
||||
message BrokerMessage {
|
||||
Message data = 1;
|
||||
message RedirectMessage {
|
||||
string new_broker = 1;
|
||||
}
|
||||
RedirectMessage redirect = 2;
|
||||
}
|
||||
|
||||
message PublishRequest {
|
||||
@@ -80,6 +84,14 @@ message PublishResponse {
|
||||
string new_broker = 1;
|
||||
}
|
||||
RedirectMessage redirect = 2;
|
||||
bool is_closed = 3;
|
||||
}
|
||||
|
||||
message DeleteTopicRequest {
|
||||
string namespace = 1;
|
||||
string topic = 2;
|
||||
}
|
||||
message DeleteTopicResponse {
|
||||
}
|
||||
|
||||
message ConfigureTopicRequest {
|
||||
@@ -98,6 +110,16 @@ message GetTopicConfigurationResponse {
|
||||
TopicConfiguration configuration = 1;
|
||||
}
|
||||
|
||||
message FindBrokerRequest {
|
||||
string namespace = 1;
|
||||
string topic = 2;
|
||||
int32 parition = 3;
|
||||
}
|
||||
|
||||
message FindBrokerResponse {
|
||||
string broker = 1;
|
||||
}
|
||||
|
||||
message TopicConfiguration {
|
||||
int32 partition_count = 1;
|
||||
string collection = 2;
|
||||
|
||||
@@ -14,10 +14,14 @@ It has these top-level messages:
|
||||
BrokerMessage
|
||||
PublishRequest
|
||||
PublishResponse
|
||||
DeleteTopicRequest
|
||||
DeleteTopicResponse
|
||||
ConfigureTopicRequest
|
||||
ConfigureTopicResponse
|
||||
GetTopicConfigurationRequest
|
||||
GetTopicConfigurationResponse
|
||||
FindBrokerRequest
|
||||
FindBrokerResponse
|
||||
TopicConfiguration
|
||||
*/
|
||||
package messaging_pb
|
||||
@@ -91,12 +95,13 @@ func (x TopicConfiguration_Partitioning) String() string {
|
||||
return proto.EnumName(TopicConfiguration_Partitioning_name, int32(x))
|
||||
}
|
||||
func (TopicConfiguration_Partitioning) EnumDescriptor() ([]byte, []int) {
|
||||
return fileDescriptor0, []int{9, 0}
|
||||
return fileDescriptor0, []int{13, 0}
|
||||
}
|
||||
|
||||
type SubscriberMessage struct {
|
||||
Init *SubscriberMessage_InitMessage `protobuf:"bytes,1,opt,name=init" json:"init,omitempty"`
|
||||
Ack *SubscriberMessage_AckMessage `protobuf:"bytes,2,opt,name=ack" json:"ack,omitempty"`
|
||||
Init *SubscriberMessage_InitMessage `protobuf:"bytes,1,opt,name=init" json:"init,omitempty"`
|
||||
Ack *SubscriberMessage_AckMessage `protobuf:"bytes,2,opt,name=ack" json:"ack,omitempty"`
|
||||
IsClose bool `protobuf:"varint,3,opt,name=is_close,json=isClose" json:"is_close,omitempty"`
|
||||
}
|
||||
|
||||
func (m *SubscriberMessage) Reset() { *m = SubscriberMessage{} }
|
||||
@@ -118,6 +123,13 @@ func (m *SubscriberMessage) GetAck() *SubscriberMessage_AckMessage {
|
||||
return nil
|
||||
}
|
||||
|
||||
func (m *SubscriberMessage) GetIsClose() bool {
|
||||
if m != nil {
|
||||
return m.IsClose
|
||||
}
|
||||
return false
|
||||
}
|
||||
|
||||
type SubscriberMessage_InitMessage struct {
|
||||
Namespace string `protobuf:"bytes,1,opt,name=namespace" json:"namespace,omitempty"`
|
||||
Topic string `protobuf:"bytes,2,opt,name=topic" json:"topic,omitempty"`
|
||||
@@ -197,6 +209,7 @@ type Message struct {
|
||||
Key []byte `protobuf:"bytes,2,opt,name=key,proto3" json:"key,omitempty"`
|
||||
Value []byte `protobuf:"bytes,3,opt,name=value,proto3" json:"value,omitempty"`
|
||||
Headers map[string][]byte `protobuf:"bytes,4,rep,name=headers" json:"headers,omitempty" protobuf_key:"bytes,1,opt,name=key" protobuf_val:"bytes,2,opt,name=value,proto3"`
|
||||
IsClose bool `protobuf:"varint,5,opt,name=is_close,json=isClose" json:"is_close,omitempty"`
|
||||
}
|
||||
|
||||
func (m *Message) Reset() { *m = Message{} }
|
||||
@@ -232,9 +245,15 @@ func (m *Message) GetHeaders() map[string][]byte {
|
||||
return nil
|
||||
}
|
||||
|
||||
func (m *Message) GetIsClose() bool {
|
||||
if m != nil {
|
||||
return m.IsClose
|
||||
}
|
||||
return false
|
||||
}
|
||||
|
||||
type BrokerMessage struct {
|
||||
Data *Message `protobuf:"bytes,1,opt,name=data" json:"data,omitempty"`
|
||||
Redirect *BrokerMessage_RedirectMessage `protobuf:"bytes,2,opt,name=redirect" json:"redirect,omitempty"`
|
||||
Data *Message `protobuf:"bytes,1,opt,name=data" json:"data,omitempty"`
|
||||
}
|
||||
|
||||
func (m *BrokerMessage) Reset() { *m = BrokerMessage{} }
|
||||
@@ -249,31 +268,6 @@ func (m *BrokerMessage) GetData() *Message {
|
||||
return nil
|
||||
}
|
||||
|
||||
func (m *BrokerMessage) GetRedirect() *BrokerMessage_RedirectMessage {
|
||||
if m != nil {
|
||||
return m.Redirect
|
||||
}
|
||||
return nil
|
||||
}
|
||||
|
||||
type BrokerMessage_RedirectMessage struct {
|
||||
NewBroker string `protobuf:"bytes,1,opt,name=new_broker,json=newBroker" json:"new_broker,omitempty"`
|
||||
}
|
||||
|
||||
func (m *BrokerMessage_RedirectMessage) Reset() { *m = BrokerMessage_RedirectMessage{} }
|
||||
func (m *BrokerMessage_RedirectMessage) String() string { return proto.CompactTextString(m) }
|
||||
func (*BrokerMessage_RedirectMessage) ProtoMessage() {}
|
||||
func (*BrokerMessage_RedirectMessage) Descriptor() ([]byte, []int) {
|
||||
return fileDescriptor0, []int{2, 0}
|
||||
}
|
||||
|
||||
func (m *BrokerMessage_RedirectMessage) GetNewBroker() string {
|
||||
if m != nil {
|
||||
return m.NewBroker
|
||||
}
|
||||
return ""
|
||||
}
|
||||
|
||||
type PublishRequest struct {
|
||||
Init *PublishRequest_InitMessage `protobuf:"bytes,1,opt,name=init" json:"init,omitempty"`
|
||||
Data *Message `protobuf:"bytes,2,opt,name=data" json:"data,omitempty"`
|
||||
@@ -333,6 +327,7 @@ func (m *PublishRequest_InitMessage) GetPartition() int32 {
|
||||
type PublishResponse struct {
|
||||
Config *PublishResponse_ConfigMessage `protobuf:"bytes,1,opt,name=config" json:"config,omitempty"`
|
||||
Redirect *PublishResponse_RedirectMessage `protobuf:"bytes,2,opt,name=redirect" json:"redirect,omitempty"`
|
||||
IsClosed bool `protobuf:"varint,3,opt,name=is_closed,json=isClosed" json:"is_closed,omitempty"`
|
||||
}
|
||||
|
||||
func (m *PublishResponse) Reset() { *m = PublishResponse{} }
|
||||
@@ -354,6 +349,13 @@ func (m *PublishResponse) GetRedirect() *PublishResponse_RedirectMessage {
|
||||
return nil
|
||||
}
|
||||
|
||||
func (m *PublishResponse) GetIsClosed() bool {
|
||||
if m != nil {
|
||||
return m.IsClosed
|
||||
}
|
||||
return false
|
||||
}
|
||||
|
||||
type PublishResponse_ConfigMessage struct {
|
||||
PartitionCount int32 `protobuf:"varint,1,opt,name=partition_count,json=partitionCount" json:"partition_count,omitempty"`
|
||||
}
|
||||
@@ -390,6 +392,38 @@ func (m *PublishResponse_RedirectMessage) GetNewBroker() string {
|
||||
return ""
|
||||
}
|
||||
|
||||
type DeleteTopicRequest struct {
|
||||
Namespace string `protobuf:"bytes,1,opt,name=namespace" json:"namespace,omitempty"`
|
||||
Topic string `protobuf:"bytes,2,opt,name=topic" json:"topic,omitempty"`
|
||||
}
|
||||
|
||||
func (m *DeleteTopicRequest) Reset() { *m = DeleteTopicRequest{} }
|
||||
func (m *DeleteTopicRequest) String() string { return proto.CompactTextString(m) }
|
||||
func (*DeleteTopicRequest) ProtoMessage() {}
|
||||
func (*DeleteTopicRequest) Descriptor() ([]byte, []int) { return fileDescriptor0, []int{5} }
|
||||
|
||||
func (m *DeleteTopicRequest) GetNamespace() string {
|
||||
if m != nil {
|
||||
return m.Namespace
|
||||
}
|
||||
return ""
|
||||
}
|
||||
|
||||
func (m *DeleteTopicRequest) GetTopic() string {
|
||||
if m != nil {
|
||||
return m.Topic
|
||||
}
|
||||
return ""
|
||||
}
|
||||
|
||||
type DeleteTopicResponse struct {
|
||||
}
|
||||
|
||||
func (m *DeleteTopicResponse) Reset() { *m = DeleteTopicResponse{} }
|
||||
func (m *DeleteTopicResponse) String() string { return proto.CompactTextString(m) }
|
||||
func (*DeleteTopicResponse) ProtoMessage() {}
|
||||
func (*DeleteTopicResponse) Descriptor() ([]byte, []int) { return fileDescriptor0, []int{6} }
|
||||
|
||||
type ConfigureTopicRequest struct {
|
||||
Namespace string `protobuf:"bytes,1,opt,name=namespace" json:"namespace,omitempty"`
|
||||
Topic string `protobuf:"bytes,2,opt,name=topic" json:"topic,omitempty"`
|
||||
@@ -399,7 +433,7 @@ type ConfigureTopicRequest struct {
|
||||
func (m *ConfigureTopicRequest) Reset() { *m = ConfigureTopicRequest{} }
|
||||
func (m *ConfigureTopicRequest) String() string { return proto.CompactTextString(m) }
|
||||
func (*ConfigureTopicRequest) ProtoMessage() {}
|
||||
func (*ConfigureTopicRequest) Descriptor() ([]byte, []int) { return fileDescriptor0, []int{5} }
|
||||
func (*ConfigureTopicRequest) Descriptor() ([]byte, []int) { return fileDescriptor0, []int{7} }
|
||||
|
||||
func (m *ConfigureTopicRequest) GetNamespace() string {
|
||||
if m != nil {
|
||||
@@ -428,7 +462,7 @@ type ConfigureTopicResponse struct {
|
||||
func (m *ConfigureTopicResponse) Reset() { *m = ConfigureTopicResponse{} }
|
||||
func (m *ConfigureTopicResponse) String() string { return proto.CompactTextString(m) }
|
||||
func (*ConfigureTopicResponse) ProtoMessage() {}
|
||||
func (*ConfigureTopicResponse) Descriptor() ([]byte, []int) { return fileDescriptor0, []int{6} }
|
||||
func (*ConfigureTopicResponse) Descriptor() ([]byte, []int) { return fileDescriptor0, []int{8} }
|
||||
|
||||
type GetTopicConfigurationRequest struct {
|
||||
Namespace string `protobuf:"bytes,1,opt,name=namespace" json:"namespace,omitempty"`
|
||||
@@ -438,7 +472,7 @@ type GetTopicConfigurationRequest struct {
|
||||
func (m *GetTopicConfigurationRequest) Reset() { *m = GetTopicConfigurationRequest{} }
|
||||
func (m *GetTopicConfigurationRequest) String() string { return proto.CompactTextString(m) }
|
||||
func (*GetTopicConfigurationRequest) ProtoMessage() {}
|
||||
func (*GetTopicConfigurationRequest) Descriptor() ([]byte, []int) { return fileDescriptor0, []int{7} }
|
||||
func (*GetTopicConfigurationRequest) Descriptor() ([]byte, []int) { return fileDescriptor0, []int{9} }
|
||||
|
||||
func (m *GetTopicConfigurationRequest) GetNamespace() string {
|
||||
if m != nil {
|
||||
@@ -461,7 +495,7 @@ type GetTopicConfigurationResponse struct {
|
||||
func (m *GetTopicConfigurationResponse) Reset() { *m = GetTopicConfigurationResponse{} }
|
||||
func (m *GetTopicConfigurationResponse) String() string { return proto.CompactTextString(m) }
|
||||
func (*GetTopicConfigurationResponse) ProtoMessage() {}
|
||||
func (*GetTopicConfigurationResponse) Descriptor() ([]byte, []int) { return fileDescriptor0, []int{8} }
|
||||
func (*GetTopicConfigurationResponse) Descriptor() ([]byte, []int) { return fileDescriptor0, []int{10} }
|
||||
|
||||
func (m *GetTopicConfigurationResponse) GetConfiguration() *TopicConfiguration {
|
||||
if m != nil {
|
||||
@@ -470,6 +504,54 @@ func (m *GetTopicConfigurationResponse) GetConfiguration() *TopicConfiguration {
|
||||
return nil
|
||||
}
|
||||
|
||||
type FindBrokerRequest struct {
|
||||
Namespace string `protobuf:"bytes,1,opt,name=namespace" json:"namespace,omitempty"`
|
||||
Topic string `protobuf:"bytes,2,opt,name=topic" json:"topic,omitempty"`
|
||||
Parition int32 `protobuf:"varint,3,opt,name=parition" json:"parition,omitempty"`
|
||||
}
|
||||
|
||||
func (m *FindBrokerRequest) Reset() { *m = FindBrokerRequest{} }
|
||||
func (m *FindBrokerRequest) String() string { return proto.CompactTextString(m) }
|
||||
func (*FindBrokerRequest) ProtoMessage() {}
|
||||
func (*FindBrokerRequest) Descriptor() ([]byte, []int) { return fileDescriptor0, []int{11} }
|
||||
|
||||
func (m *FindBrokerRequest) GetNamespace() string {
|
||||
if m != nil {
|
||||
return m.Namespace
|
||||
}
|
||||
return ""
|
||||
}
|
||||
|
||||
func (m *FindBrokerRequest) GetTopic() string {
|
||||
if m != nil {
|
||||
return m.Topic
|
||||
}
|
||||
return ""
|
||||
}
|
||||
|
||||
func (m *FindBrokerRequest) GetParition() int32 {
|
||||
if m != nil {
|
||||
return m.Parition
|
||||
}
|
||||
return 0
|
||||
}
|
||||
|
||||
type FindBrokerResponse struct {
|
||||
Broker string `protobuf:"bytes,1,opt,name=broker" json:"broker,omitempty"`
|
||||
}
|
||||
|
||||
func (m *FindBrokerResponse) Reset() { *m = FindBrokerResponse{} }
|
||||
func (m *FindBrokerResponse) String() string { return proto.CompactTextString(m) }
|
||||
func (*FindBrokerResponse) ProtoMessage() {}
|
||||
func (*FindBrokerResponse) Descriptor() ([]byte, []int) { return fileDescriptor0, []int{12} }
|
||||
|
||||
func (m *FindBrokerResponse) GetBroker() string {
|
||||
if m != nil {
|
||||
return m.Broker
|
||||
}
|
||||
return ""
|
||||
}
|
||||
|
||||
type TopicConfiguration struct {
|
||||
PartitionCount int32 `protobuf:"varint,1,opt,name=partition_count,json=partitionCount" json:"partition_count,omitempty"`
|
||||
Collection string `protobuf:"bytes,2,opt,name=collection" json:"collection,omitempty"`
|
||||
@@ -481,7 +563,7 @@ type TopicConfiguration struct {
|
||||
func (m *TopicConfiguration) Reset() { *m = TopicConfiguration{} }
|
||||
func (m *TopicConfiguration) String() string { return proto.CompactTextString(m) }
|
||||
func (*TopicConfiguration) ProtoMessage() {}
|
||||
func (*TopicConfiguration) Descriptor() ([]byte, []int) { return fileDescriptor0, []int{9} }
|
||||
func (*TopicConfiguration) Descriptor() ([]byte, []int) { return fileDescriptor0, []int{13} }
|
||||
|
||||
func (m *TopicConfiguration) GetPartitionCount() int32 {
|
||||
if m != nil {
|
||||
@@ -524,16 +606,19 @@ func init() {
|
||||
proto.RegisterType((*SubscriberMessage_AckMessage)(nil), "messaging_pb.SubscriberMessage.AckMessage")
|
||||
proto.RegisterType((*Message)(nil), "messaging_pb.Message")
|
||||
proto.RegisterType((*BrokerMessage)(nil), "messaging_pb.BrokerMessage")
|
||||
proto.RegisterType((*BrokerMessage_RedirectMessage)(nil), "messaging_pb.BrokerMessage.RedirectMessage")
|
||||
proto.RegisterType((*PublishRequest)(nil), "messaging_pb.PublishRequest")
|
||||
proto.RegisterType((*PublishRequest_InitMessage)(nil), "messaging_pb.PublishRequest.InitMessage")
|
||||
proto.RegisterType((*PublishResponse)(nil), "messaging_pb.PublishResponse")
|
||||
proto.RegisterType((*PublishResponse_ConfigMessage)(nil), "messaging_pb.PublishResponse.ConfigMessage")
|
||||
proto.RegisterType((*PublishResponse_RedirectMessage)(nil), "messaging_pb.PublishResponse.RedirectMessage")
|
||||
proto.RegisterType((*DeleteTopicRequest)(nil), "messaging_pb.DeleteTopicRequest")
|
||||
proto.RegisterType((*DeleteTopicResponse)(nil), "messaging_pb.DeleteTopicResponse")
|
||||
proto.RegisterType((*ConfigureTopicRequest)(nil), "messaging_pb.ConfigureTopicRequest")
|
||||
proto.RegisterType((*ConfigureTopicResponse)(nil), "messaging_pb.ConfigureTopicResponse")
|
||||
proto.RegisterType((*GetTopicConfigurationRequest)(nil), "messaging_pb.GetTopicConfigurationRequest")
|
||||
proto.RegisterType((*GetTopicConfigurationResponse)(nil), "messaging_pb.GetTopicConfigurationResponse")
|
||||
proto.RegisterType((*FindBrokerRequest)(nil), "messaging_pb.FindBrokerRequest")
|
||||
proto.RegisterType((*FindBrokerResponse)(nil), "messaging_pb.FindBrokerResponse")
|
||||
proto.RegisterType((*TopicConfiguration)(nil), "messaging_pb.TopicConfiguration")
|
||||
proto.RegisterEnum("messaging_pb.SubscriberMessage_InitMessage_StartPosition", SubscriberMessage_InitMessage_StartPosition_name, SubscriberMessage_InitMessage_StartPosition_value)
|
||||
proto.RegisterEnum("messaging_pb.TopicConfiguration_Partitioning", TopicConfiguration_Partitioning_name, TopicConfiguration_Partitioning_value)
|
||||
@@ -552,8 +637,10 @@ const _ = grpc.SupportPackageIsVersion4
|
||||
type SeaweedMessagingClient interface {
|
||||
Subscribe(ctx context.Context, opts ...grpc.CallOption) (SeaweedMessaging_SubscribeClient, error)
|
||||
Publish(ctx context.Context, opts ...grpc.CallOption) (SeaweedMessaging_PublishClient, error)
|
||||
DeleteTopic(ctx context.Context, in *DeleteTopicRequest, opts ...grpc.CallOption) (*DeleteTopicResponse, error)
|
||||
ConfigureTopic(ctx context.Context, in *ConfigureTopicRequest, opts ...grpc.CallOption) (*ConfigureTopicResponse, error)
|
||||
GetTopicConfiguration(ctx context.Context, in *GetTopicConfigurationRequest, opts ...grpc.CallOption) (*GetTopicConfigurationResponse, error)
|
||||
FindBroker(ctx context.Context, in *FindBrokerRequest, opts ...grpc.CallOption) (*FindBrokerResponse, error)
|
||||
}
|
||||
|
||||
type seaweedMessagingClient struct {
|
||||
@@ -626,6 +713,15 @@ func (x *seaweedMessagingPublishClient) Recv() (*PublishResponse, error) {
|
||||
return m, nil
|
||||
}
|
||||
|
||||
func (c *seaweedMessagingClient) DeleteTopic(ctx context.Context, in *DeleteTopicRequest, opts ...grpc.CallOption) (*DeleteTopicResponse, error) {
|
||||
out := new(DeleteTopicResponse)
|
||||
err := grpc.Invoke(ctx, "/messaging_pb.SeaweedMessaging/DeleteTopic", in, out, c.cc, opts...)
|
||||
if err != nil {
|
||||
return nil, err
|
||||
}
|
||||
return out, nil
|
||||
}
|
||||
|
||||
func (c *seaweedMessagingClient) ConfigureTopic(ctx context.Context, in *ConfigureTopicRequest, opts ...grpc.CallOption) (*ConfigureTopicResponse, error) {
|
||||
out := new(ConfigureTopicResponse)
|
||||
err := grpc.Invoke(ctx, "/messaging_pb.SeaweedMessaging/ConfigureTopic", in, out, c.cc, opts...)
|
||||
@@ -644,13 +740,24 @@ func (c *seaweedMessagingClient) GetTopicConfiguration(ctx context.Context, in *
|
||||
return out, nil
|
||||
}
|
||||
|
||||
func (c *seaweedMessagingClient) FindBroker(ctx context.Context, in *FindBrokerRequest, opts ...grpc.CallOption) (*FindBrokerResponse, error) {
|
||||
out := new(FindBrokerResponse)
|
||||
err := grpc.Invoke(ctx, "/messaging_pb.SeaweedMessaging/FindBroker", in, out, c.cc, opts...)
|
||||
if err != nil {
|
||||
return nil, err
|
||||
}
|
||||
return out, nil
|
||||
}
|
||||
|
||||
// Server API for SeaweedMessaging service
|
||||
|
||||
type SeaweedMessagingServer interface {
|
||||
Subscribe(SeaweedMessaging_SubscribeServer) error
|
||||
Publish(SeaweedMessaging_PublishServer) error
|
||||
DeleteTopic(context.Context, *DeleteTopicRequest) (*DeleteTopicResponse, error)
|
||||
ConfigureTopic(context.Context, *ConfigureTopicRequest) (*ConfigureTopicResponse, error)
|
||||
GetTopicConfiguration(context.Context, *GetTopicConfigurationRequest) (*GetTopicConfigurationResponse, error)
|
||||
FindBroker(context.Context, *FindBrokerRequest) (*FindBrokerResponse, error)
|
||||
}
|
||||
|
||||
func RegisterSeaweedMessagingServer(s *grpc.Server, srv SeaweedMessagingServer) {
|
||||
@@ -709,6 +816,24 @@ func (x *seaweedMessagingPublishServer) Recv() (*PublishRequest, error) {
|
||||
return m, nil
|
||||
}
|
||||
|
||||
func _SeaweedMessaging_DeleteTopic_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) {
|
||||
in := new(DeleteTopicRequest)
|
||||
if err := dec(in); err != nil {
|
||||
return nil, err
|
||||
}
|
||||
if interceptor == nil {
|
||||
return srv.(SeaweedMessagingServer).DeleteTopic(ctx, in)
|
||||
}
|
||||
info := &grpc.UnaryServerInfo{
|
||||
Server: srv,
|
||||
FullMethod: "/messaging_pb.SeaweedMessaging/DeleteTopic",
|
||||
}
|
||||
handler := func(ctx context.Context, req interface{}) (interface{}, error) {
|
||||
return srv.(SeaweedMessagingServer).DeleteTopic(ctx, req.(*DeleteTopicRequest))
|
||||
}
|
||||
return interceptor(ctx, in, info, handler)
|
||||
}
|
||||
|
||||
func _SeaweedMessaging_ConfigureTopic_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) {
|
||||
in := new(ConfigureTopicRequest)
|
||||
if err := dec(in); err != nil {
|
||||
@@ -745,10 +870,32 @@ func _SeaweedMessaging_GetTopicConfiguration_Handler(srv interface{}, ctx contex
|
||||
return interceptor(ctx, in, info, handler)
|
||||
}
|
||||
|
||||
func _SeaweedMessaging_FindBroker_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) {
|
||||
in := new(FindBrokerRequest)
|
||||
if err := dec(in); err != nil {
|
||||
return nil, err
|
||||
}
|
||||
if interceptor == nil {
|
||||
return srv.(SeaweedMessagingServer).FindBroker(ctx, in)
|
||||
}
|
||||
info := &grpc.UnaryServerInfo{
|
||||
Server: srv,
|
||||
FullMethod: "/messaging_pb.SeaweedMessaging/FindBroker",
|
||||
}
|
||||
handler := func(ctx context.Context, req interface{}) (interface{}, error) {
|
||||
return srv.(SeaweedMessagingServer).FindBroker(ctx, req.(*FindBrokerRequest))
|
||||
}
|
||||
return interceptor(ctx, in, info, handler)
|
||||
}
|
||||
|
||||
var _SeaweedMessaging_serviceDesc = grpc.ServiceDesc{
|
||||
ServiceName: "messaging_pb.SeaweedMessaging",
|
||||
HandlerType: (*SeaweedMessagingServer)(nil),
|
||||
Methods: []grpc.MethodDesc{
|
||||
{
|
||||
MethodName: "DeleteTopic",
|
||||
Handler: _SeaweedMessaging_DeleteTopic_Handler,
|
||||
},
|
||||
{
|
||||
MethodName: "ConfigureTopic",
|
||||
Handler: _SeaweedMessaging_ConfigureTopic_Handler,
|
||||
@@ -757,6 +904,10 @@ var _SeaweedMessaging_serviceDesc = grpc.ServiceDesc{
|
||||
MethodName: "GetTopicConfiguration",
|
||||
Handler: _SeaweedMessaging_GetTopicConfiguration_Handler,
|
||||
},
|
||||
{
|
||||
MethodName: "FindBroker",
|
||||
Handler: _SeaweedMessaging_FindBroker_Handler,
|
||||
},
|
||||
},
|
||||
Streams: []grpc.StreamDesc{
|
||||
{
|
||||
@@ -778,62 +929,68 @@ var _SeaweedMessaging_serviceDesc = grpc.ServiceDesc{
|
||||
func init() { proto.RegisterFile("messaging.proto", fileDescriptor0) }
|
||||
|
||||
var fileDescriptor0 = []byte{
|
||||
// 898 bytes of a gzipped FileDescriptorProto
|
||||
0x1f, 0x8b, 0x08, 0x00, 0x00, 0x09, 0x6e, 0x88, 0x02, 0xff, 0xb4, 0x56, 0x5d, 0x6f, 0xe3, 0x44,
|
||||
0x17, 0xee, 0x38, 0xe9, 0x47, 0x8e, 0x93, 0x34, 0xef, 0xd1, 0x5b, 0x14, 0x99, 0x16, 0x82, 0x17,
|
||||
0x41, 0xa0, 0xc2, 0xaa, 0xc2, 0x4d, 0x59, 0xad, 0xb4, 0x6a, 0xab, 0xb2, 0x1b, 0xd1, 0x76, 0xa3,
|
||||
0x49, 0x6e, 0x91, 0xe5, 0x38, 0xb3, 0xe9, 0xa8, 0xc9, 0x38, 0x78, 0x26, 0x5b, 0xf5, 0x1a, 0x6e,
|
||||
0xb9, 0xe2, 0xaf, 0xc0, 0x0f, 0xe0, 0x37, 0x70, 0xc7, 0xaf, 0x41, 0x1e, 0x7f, 0xc4, 0x4e, 0xb2,
|
||||
0xe9, 0x52, 0x89, 0x3b, 0xfb, 0xcc, 0x73, 0x9e, 0xf3, 0x9c, 0x2f, 0x8f, 0x61, 0x7f, 0xca, 0xa4,
|
||||
0xf4, 0xc6, 0x5c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1, 0xd3, 0x47, 0x2e, 0x4e, 0xeb, 0xe3,
|
||||
0x0d, 0x1f, 0x4f, 0x7b, 0xab, 0x4d, 0x4e, 0x08, 0x5e, 0xc1, 0x6e, 0xb2, 0xa2, 0x78, 0xb8, 0xe9,
|
||||
0x03, 0x67, 0x1d, 0x6d, 0xdc, 0xeb, 0x84, 0xed, 0x47, 0xa8, 0x17, 0x27, 0x18, 0x9f, 0x15, 0xdd,
|
||||
0xd6, 0x2e, 0x9d, 0xf5, 0xf9, 0x66, 0x50, 0x1a, 0x02, 0x43, 0x38, 0x58, 0x3b, 0xb2, 0xb8, 0xf4,
|
||||
0xb3, 0xb3, 0x69, 0x57, 0xac, 0xe3, 0x0f, 0xc2, 0xa6, 0x31, 0xcf, 0x6d, 0x68, 0xc8, 0xb8, 0x0b,
|
||||
0x6f, 0xa5, 0xe3, 0x4f, 0xa2, 0x61, 0x39, 0xaf, 0x67, 0x0d, 0xe9, 0x45, 0x7f, 0x77, 0xc3, 0x1d,
|
||||
0xfd, 0x93, 0xf7, 0xed, 0x3f, 0x01, 0x00, 0x00, 0xff, 0xff, 0x3b, 0xcc, 0x19, 0xa5, 0xf7, 0x09,
|
||||
0x00, 0x00,
|
||||
// 1002 bytes of a gzipped FileDescriptorProto
|
||||
0x1f, 0x8b, 0x08, 0x00, 0x00, 0x09, 0x6e, 0x88, 0x02, 0xff, 0xb4, 0x56, 0xdd, 0x6e, 0xe3, 0x54,
|
||||
0x10, 0xae, 0xdd, 0xfc, 0x8e, 0x93, 0x34, 0x3b, 0xd0, 0x55, 0xf0, 0xb6, 0x90, 0xf5, 0x22, 0x08,
|
||||
0x14, 0xa2, 0x2a, 0xdc, 0x94, 0x6a, 0xa5, 0x55, 0x1b, 0xba, 0x34, 0xa2, 0xed, 0x86, 0x93, 0xdc,
|
||||
0x22, 0xcb, 0xb1, 0xcf, 0xa6, 0x47, 0x75, 0x8e, 0x8d, 0x8f, 0xb3, 0x55, 0x9f, 0x83, 0x7b, 0x1e,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, 0x86,
|
||||
0xe7, 0x0f, 0x1d, 0x11, 0x21, 0x0a, 0x6d, 0xa9, 0xd3, 0xe8, 0x7d, 0xff, 0x3f, 0x8a, 0xd0, 0x1d,
|
||||
0x65, 0x03, 0x90, 0x7c, 0x3c, 0x6c, 0x83, 0xe2, 0xb3, 0x19, 0x15, 0xbe, 0x31, 0x73, 0xaf, 0x44,
|
||||
0xab, 0xd8, 0x96, 0x3a, 0xdb, 0x24, 0x6b, 0xc2, 0x67, 0x50, 0x17, 0x69, 0x7c, 0x9d, 0x59, 0xad,
|
||||
0x52, 0x48, 0xbf, 0xb6, 0x30, 0x0e, 0x2c, 0xed, 0x08, 0xea, 0xb9, 0x34, 0x08, 0x50, 0xba, 0x38,
|
||||
0x19, 0x9f, 0x8d, 0xc6, 0xcd, 0x2d, 0xac, 0x41, 0xe5, 0xec, 0x84, 0x5c, 0x0c, 0x82, 0x93, 0x84,
|
||||
0x75, 0xa8, 0x8e, 0x07, 0x97, 0x67, 0xa3, 0xf1, 0xc9, 0xe5, 0xb0, 0x29, 0xab, 0x07, 0x00, 0x8b,
|
||||
0x8a, 0xe3, 0x3e, 0x40, 0x74, 0x33, 0x1a, 0x64, 0x92, 0x42, 0x36, 0xd5, 0xd8, 0x32, 0xb0, 0xb4,
|
||||
0x7f, 0x25, 0x28, 0x27, 0xd0, 0x2f, 0xa0, 0x4e, 0xdf, 0x50, 0xee, 0xeb, 0x01, 0x59, 0x9d, 0x8b,
|
||||
0x08, 0x7d, 0x2a, 0x1f, 0x4a, 0x44, 0x09, 0xff, 0x18, 0xb3, 0x19, 0xbd, 0x12, 0xd8, 0x84, 0xed,
|
||||
0x1b, 0x7a, 0x17, 0x16, 0xbd, 0x46, 0x82, 0x9f, 0x41, 0x23, 0xde, 0x18, 0xf6, 0x3c, 0x6a, 0x67,
|
||||
0x8d, 0x44, 0x07, 0x7c, 0x0e, 0xe5, 0x6b, 0x6a, 0x58, 0xd4, 0x13, 0xad, 0x42, 0x7b, 0xbb,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22, 0x69, 0xa4,
|
||||
0xe6, 0x7e, 0x60, 0x55, 0x0f, 0x61, 0x67, 0x29, 0x67, 0x30, 0x36, 0x9c, 0xde, 0xea, 0x93, 0x50,
|
||||
0x2a, 0x69, 0x81, 0xe9, 0x6d, 0xa4, 0x1d, 0xed, 0x1c, 0xf0, 0x07, 0x6a, 0x53, 0x9f, 0x8e, 0x83,
|
||||
0xca, 0x26, 0x62, 0x78, 0x8f, 0xa6, 0x68, 0xbb, 0xf0, 0x51, 0x2e, 0x52, 0x54, 0x03, 0xed, 0x37,
|
||||
0x09, 0x76, 0xa3, 0xdb, 0xcc, 0xbd, 0x07, 0x27, 0xc1, 0x97, 0x50, 0x37, 0xe3, 0x60, 0x46, 0xda,
|
||||
0x7d, 0xa5, 0xd7, 0xce, 0xf7, 0x21, 0x4c, 0xd3, 0xcf, 0xe2, 0x48, 0xde, 0x4d, 0x6b, 0xc1, 0xe3,
|
||||
0x65, 0x52, 0x31, 0x5f, 0x02, 0x7b, 0x3f, 0x52, 0x7f, 0x4d, 0x84, 0x07, 0x94, 0x66, 0x0a, 0xfb,
|
||||
0x6f, 0x89, 0x19, 0xcb, 0x73, 0xe5, 0x5a, 0xd2, 0xfb, 0x5d, 0xcb, 0x84, 0x47, 0x2f, 0x19, 0xb7,
|
||||
0xa2, 0xde, 0x3e, 0xa4, 0xce, 0x2a, 0x54, 0x5c, 0xc3, 0xcb, 0x0e, 0x58, 0x7a, 0xd6, 0xbe, 0x01,
|
||||
0xcc, 0x26, 0x89, 0xaf, 0xf0, 0x18, 0x4a, 0x39, 0x8d, 0xc5, 0x27, 0xed, 0x2f, 0x19, 0x70, 0x95,
|
||||
0xf8, 0x3b, 0x4b, 0x1a, 0x3f, 0x05, 0x30, 0x1d, 0xdb, 0xa6, 0x66, 0xc8, 0x25, 0x22, 0x99, 0xb1,
|
||||
0x04, 0xaf, 0x94, 0x47, 0x5d, 0x9b, 0x99, 0x0b, 0x3d, 0x54, 0x49, 0xd6, 0x84, 0x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 0x29, 0xa8, 0x07, 0xef,
|
||||
0x84, 0x4d, 0x73, 0xfe, 0x0c, 0xb0, 0x98, 0xa0, 0xe5, 0x46, 0xae, 0x0c, 0xb0, 0xda, 0x7e, 0x3b,
|
||||
0x20, 0x09, 0x79, 0xaa, 0x41, 0x53, 0x44, 0x72, 0x79, 0x2d, 0xba, 0xa6, 0x1d, 0xa8, 0xfa, 0xb4,
|
||||
0x91, 0x2a, 0x67, 0x18, 0x7c, 0x51, 0x4f, 0x4a, 0xe1, 0x87, 0xf5, 0x77, 0xff, 0x05, 0x00, 0x00,
|
||||
0xff, 0xff, 0x7f, 0x62, 0xba, 0x48, 0x6b, 0x0b, 0x00, 0x00,
|
||||
}
|
||||
@@ -1051,12 +1051,10 @@ func (m *VolumeEcShardsGenerateRequest) GetCollection() string {
|
||||
type VolumeEcShardsGenerateResponse struct {
|
||||
}
|
||||
|
||||
func (m *VolumeEcShardsGenerateResponse) Reset() { *m = VolumeEcShardsGenerateResponse{} }
|
||||
func (m *VolumeEcShardsGenerateResponse) String() string { return proto.CompactTextString(m) }
|
||||
func (*VolumeEcShardsGenerateResponse) ProtoMessage() {}
|
||||
func (*VolumeEcShardsGenerateResponse) Descriptor() ([]byte, []int) {
|
||||
return fileDescriptor0, []int{41}
|
||||
}
|
||||
func (m *VolumeEcShardsGenerateResponse) Reset() { *m = VolumeEcShardsGenerateResponse{} }
|
||||
func (m *VolumeEcShardsGenerateResponse) String() string { return proto.CompactTextString(m) }
|
||||
func (*VolumeEcShardsGenerateResponse) ProtoMessage() {}
|
||||
func (*VolumeEcShardsGenerateResponse) Descriptor() ([]byte, []int) { return fileDescriptor0, []int{41} }
|
||||
|
||||
type VolumeEcShardsRebuildRequest struct {
|
||||
VolumeId uint32 `protobuf:"varint,1,opt,name=volume_id,json=volumeId" json:"volume_id,omitempty"`
|
||||
@@ -1429,12 +1427,10 @@ func (m *VolumeEcShardsToVolumeRequest) GetCollection() string {
|
||||
type VolumeEcShardsToVolumeResponse struct {
|
||||
}
|
||||
|
||||
func (m *VolumeEcShardsToVolumeResponse) Reset() { *m = VolumeEcShardsToVolumeResponse{} }
|
||||
func (m *VolumeEcShardsToVolumeResponse) String() string { return proto.CompactTextString(m) }
|
||||
func (*VolumeEcShardsToVolumeResponse) ProtoMessage() {}
|
||||
func (*VolumeEcShardsToVolumeResponse) Descriptor() ([]byte, []int) {
|
||||
return fileDescriptor0, []int{57}
|
||||
}
|
||||
func (m *VolumeEcShardsToVolumeResponse) Reset() { *m = VolumeEcShardsToVolumeResponse{} }
|
||||
func (m *VolumeEcShardsToVolumeResponse) String() string { return proto.CompactTextString(m) }
|
||||
func (*VolumeEcShardsToVolumeResponse) ProtoMessage() {}
|
||||
func (*VolumeEcShardsToVolumeResponse) Descriptor() ([]byte, []int) { return fileDescriptor0, []int{57} }
|
||||
|
||||
type ReadVolumeFileStatusRequest struct {
|
||||
VolumeId uint32 `protobuf:"varint,1,opt,name=volume_id,json=volumeId" json:"volume_id,omitempty"`
|
||||
@@ -2101,10 +2097,8 @@ type QueryRequest_InputSerialization_JSONInput struct {
|
||||
func (m *QueryRequest_InputSerialization_JSONInput) Reset() {
|
||||
*m = QueryRequest_InputSerialization_JSONInput{}
|
||||
}
|
||||
func (m *QueryRequest_InputSerialization_JSONInput) String() string {
|
||||
return proto.CompactTextString(m)
|
||||
}
|
||||
func (*QueryRequest_InputSerialization_JSONInput) ProtoMessage() {}
|
||||
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{70, 1, 1}
|
||||
}
|
||||
|
||||
@@ -113,6 +113,8 @@ func (fs *FilerSink) fetchAndWrite(sourceChunk *filer_pb.FileChunk, dir string)
|
||||
return
|
||||
}
|
||||
|
||||
var _ = filer_pb.FilerClient(&FilerSink{})
|
||||
|
||||
func (fs *FilerSink) WithFilerClient(fn func(filer_pb.SeaweedFilerClient) error) error {
|
||||
|
||||
return pb.WithCachedGrpcClient(func(grpcConnection *grpc.ClientConn) error {
|
||||
|
||||
@@ -47,7 +47,7 @@ func (fs *FilerSource) LookupFileId(part string) (fileUrl string, err error) {
|
||||
|
||||
vid := volumeId(part)
|
||||
|
||||
err = fs.withFilerClient(func(client filer_pb.SeaweedFilerClient) error {
|
||||
err = fs.WithFilerClient(func(client filer_pb.SeaweedFilerClient) error {
|
||||
|
||||
glog.V(4).Infof("read lookup volume id locations: %v", vid)
|
||||
resp, err := client.LookupVolume(context.Background(), &filer_pb.LookupVolumeRequest{
|
||||
@@ -91,7 +91,9 @@ func (fs *FilerSource) ReadPart(part string) (filename string, header http.Heade
|
||||
return filename, header, readCloser, err
|
||||
}
|
||||
|
||||
func (fs *FilerSource) withFilerClient(fn func(filer_pb.SeaweedFilerClient) error) error {
|
||||
var _ = filer_pb.FilerClient(&FilerSource{})
|
||||
|
||||
func (fs *FilerSource) WithFilerClient(fn func(filer_pb.SeaweedFilerClient) error) error {
|
||||
|
||||
return pb.WithCachedGrpcClient(func(grpcConnection *grpc.ClientConn) error {
|
||||
client := filer_pb.NewSeaweedFilerClient(grpcConnection)
|
||||
@@ -100,6 +102,10 @@ func (fs *FilerSource) withFilerClient(fn func(filer_pb.SeaweedFilerClient) erro
|
||||
|
||||
}
|
||||
|
||||
func (fs *FilerSource) AdjustedUrl(hostAndPort string) string {
|
||||
return hostAndPort
|
||||
}
|
||||
|
||||
func volumeId(fileId string) string {
|
||||
lastCommaIndex := strings.LastIndex(fileId, ",")
|
||||
if lastCommaIndex > 0 {
|
||||
|
||||
@@ -69,11 +69,12 @@ func (s3a *S3ApiServer) completeMultipartUpload(input *s3.CompleteMultipartUploa
|
||||
if strings.HasSuffix(entry.Name, ".part") && !entry.IsDirectory {
|
||||
for _, chunk := range entry.Chunks {
|
||||
p := &filer_pb.FileChunk{
|
||||
FileId: chunk.GetFileIdString(),
|
||||
Offset: offset,
|
||||
Size: chunk.Size,
|
||||
Mtime: chunk.Mtime,
|
||||
ETag: chunk.ETag,
|
||||
FileId: chunk.GetFileIdString(),
|
||||
Offset: offset,
|
||||
Size: chunk.Size,
|
||||
Mtime: chunk.Mtime,
|
||||
CipherKey: chunk.CipherKey,
|
||||
ETag: chunk.ETag,
|
||||
}
|
||||
finalParts = append(finalParts, p)
|
||||
offset += int64(chunk.Size)
|
||||
@@ -206,7 +207,7 @@ func (s3a *S3ApiServer) listObjectParts(input *s3.ListPartsInput) (output *ListP
|
||||
}
|
||||
output.Parts = append(output.Parts, &s3.Part{
|
||||
PartNumber: aws.Int64(int64(partNumber)),
|
||||
LastModified: aws.Time(time.Unix(entry.Attributes.Mtime, 0)),
|
||||
LastModified: aws.Time(time.Unix(entry.Attributes.Mtime, 0).UTC()),
|
||||
Size: aws.Int64(int64(filer2.TotalSize(entry.Chunks))),
|
||||
ETag: aws.String("\"" + filer2.ETag(entry) + "\""),
|
||||
})
|
||||
|
||||
@@ -23,8 +23,9 @@ func (s3a *S3ApiServer) mkFile(parentDirectoryPath string, fileName string, chun
|
||||
|
||||
func (s3a *S3ApiServer) list(parentDirectoryPath, prefix, startFrom string, inclusive bool, limit uint32) (entries []*filer_pb.Entry, err error) {
|
||||
|
||||
err = filer_pb.List(s3a, parentDirectoryPath, prefix, func(entry *filer_pb.Entry, isLast bool) {
|
||||
err = filer_pb.List(s3a, parentDirectoryPath, prefix, func(entry *filer_pb.Entry, isLast bool) error {
|
||||
entries = append(entries, entry)
|
||||
return nil
|
||||
}, startFrom, inclusive, limit)
|
||||
|
||||
return
|
||||
|
||||
@@ -38,7 +38,7 @@ func (s3a *S3ApiServer) ListBucketsHandler(w http.ResponseWriter, r *http.Reques
|
||||
if entry.IsDirectory {
|
||||
buckets = append(buckets, &s3.Bucket{
|
||||
Name: aws.String(entry.Name),
|
||||
CreationDate: aws.Time(time.Unix(entry.Attributes.Crtime, 0)),
|
||||
CreationDate: aws.Time(time.Unix(entry.Attributes.Crtime, 0).UTC()),
|
||||
})
|
||||
}
|
||||
}
|
||||
|
||||
@@ -38,6 +38,8 @@ func encodeResponse(response interface{}) []byte {
|
||||
return bytesBuffer.Bytes()
|
||||
}
|
||||
|
||||
var _ = filer_pb.FilerClient(&S3ApiServer{})
|
||||
|
||||
func (s3a *S3ApiServer) WithFilerClient(fn func(filer_pb.SeaweedFilerClient) error) error {
|
||||
|
||||
return pb.WithCachedGrpcClient(func(grpcConnection *grpc.ClientConn) error {
|
||||
|
||||
@@ -19,9 +19,11 @@ import (
|
||||
|
||||
func (fs *FilerServer) LookupDirectoryEntry(ctx context.Context, req *filer_pb.LookupDirectoryEntryRequest) (*filer_pb.LookupDirectoryEntryResponse, error) {
|
||||
|
||||
glog.V(4).Infof("LookupDirectoryEntry %s", filepath.Join(req.Directory, req.Name))
|
||||
|
||||
entry, err := fs.filer.FindEntry(ctx, util.JoinPath(req.Directory, req.Name))
|
||||
if err == filer_pb.ErrNotFound {
|
||||
return &filer_pb.LookupDirectoryEntryResponse{}, nil
|
||||
return &filer_pb.LookupDirectoryEntryResponse{}, err
|
||||
}
|
||||
if err != nil {
|
||||
glog.V(3).Infof("LookupDirectoryEntry %s: %+v, ", filepath.Join(req.Directory, req.Name), err)
|
||||
@@ -41,6 +43,8 @@ func (fs *FilerServer) LookupDirectoryEntry(ctx context.Context, req *filer_pb.L
|
||||
|
||||
func (fs *FilerServer) ListEntries(req *filer_pb.ListEntriesRequest, stream filer_pb.SeaweedFiler_ListEntriesServer) error {
|
||||
|
||||
glog.V(4).Infof("ListEntries %v", req)
|
||||
|
||||
limit := int(req.Limit)
|
||||
if limit == 0 {
|
||||
limit = fs.option.DirListingLimit
|
||||
@@ -135,6 +139,8 @@ func (fs *FilerServer) LookupVolume(ctx context.Context, req *filer_pb.LookupVol
|
||||
|
||||
func (fs *FilerServer) CreateEntry(ctx context.Context, req *filer_pb.CreateEntryRequest) (resp *filer_pb.CreateEntryResponse, err error) {
|
||||
|
||||
glog.V(4).Infof("CreateEntry %v", req)
|
||||
|
||||
resp = &filer_pb.CreateEntryResponse{}
|
||||
|
||||
chunks, garbages := filer2.CompactFileChunks(req.Entry.Chunks)
|
||||
@@ -163,6 +169,8 @@ func (fs *FilerServer) CreateEntry(ctx context.Context, req *filer_pb.CreateEntr
|
||||
|
||||
func (fs *FilerServer) UpdateEntry(ctx context.Context, req *filer_pb.UpdateEntryRequest) (*filer_pb.UpdateEntryResponse, error) {
|
||||
|
||||
glog.V(4).Infof("UpdateEntry %v", req)
|
||||
|
||||
fullpath := util.Join(req.Directory, req.Entry.Name)
|
||||
entry, err := fs.filer.FindEntry(ctx, util.FullPath(fullpath))
|
||||
if err != nil {
|
||||
@@ -219,6 +227,8 @@ func (fs *FilerServer) UpdateEntry(ctx context.Context, req *filer_pb.UpdateEntr
|
||||
|
||||
func (fs *FilerServer) AppendToEntry(ctx context.Context, req *filer_pb.AppendToEntryRequest) (*filer_pb.AppendToEntryResponse, error) {
|
||||
|
||||
glog.V(4).Infof("AppendToEntry %v", req)
|
||||
|
||||
fullpath := util.NewFullPath(req.Directory, req.EntryName)
|
||||
var offset int64 = 0
|
||||
entry, err := fs.filer.FindEntry(ctx, util.FullPath(fullpath))
|
||||
@@ -250,6 +260,9 @@ func (fs *FilerServer) AppendToEntry(ctx context.Context, req *filer_pb.AppendTo
|
||||
}
|
||||
|
||||
func (fs *FilerServer) DeleteEntry(ctx context.Context, req *filer_pb.DeleteEntryRequest) (resp *filer_pb.DeleteEntryResponse, err error) {
|
||||
|
||||
glog.V(4).Infof("DeleteEntry %v", req)
|
||||
|
||||
err = fs.filer.DeleteEntryMetaAndData(ctx, util.JoinPath(req.Directory, req.Name), req.IsRecursive, req.IgnoreRecursiveError, req.IsDeleteData)
|
||||
resp = &filer_pb.DeleteEntryResponse{}
|
||||
if err != nil {
|
||||
@@ -312,6 +325,8 @@ func (fs *FilerServer) AssignVolume(ctx context.Context, req *filer_pb.AssignVol
|
||||
|
||||
func (fs *FilerServer) DeleteCollection(ctx context.Context, req *filer_pb.DeleteCollectionRequest) (resp *filer_pb.DeleteCollectionResponse, err error) {
|
||||
|
||||
glog.V(4).Infof("DeleteCollection %v", req)
|
||||
|
||||
err = fs.filer.MasterClient.WithClient(func(client master_pb.SeaweedClient) error {
|
||||
_, err := client.CollectionDelete(context.Background(), &master_pb.CollectionDeleteRequest{
|
||||
Name: req.GetCollection(),
|
||||
@@ -353,12 +368,88 @@ func (fs *FilerServer) Statistics(ctx context.Context, req *filer_pb.StatisticsR
|
||||
|
||||
func (fs *FilerServer) GetFilerConfiguration(ctx context.Context, req *filer_pb.GetFilerConfigurationRequest) (resp *filer_pb.GetFilerConfigurationResponse, err error) {
|
||||
|
||||
return &filer_pb.GetFilerConfigurationResponse{
|
||||
t := &filer_pb.GetFilerConfigurationResponse{
|
||||
Masters: fs.option.Masters,
|
||||
Collection: fs.option.Collection,
|
||||
Replication: fs.option.DefaultReplication,
|
||||
MaxMb: uint32(fs.option.MaxMB),
|
||||
DirBuckets: fs.filer.DirBucketsPath,
|
||||
Cipher: fs.filer.Cipher,
|
||||
}, nil
|
||||
}
|
||||
|
||||
glog.V(4).Infof("GetFilerConfiguration: %v", t)
|
||||
|
||||
return t, nil
|
||||
}
|
||||
|
||||
func (fs *FilerServer) KeepConnected(stream filer_pb.SeaweedFiler_KeepConnectedServer) error {
|
||||
|
||||
req, err := stream.Recv()
|
||||
if err != nil {
|
||||
return err
|
||||
}
|
||||
|
||||
clientName := fmt.Sprintf("%s:%d", req.Name, req.GrpcPort)
|
||||
m := make(map[string]bool)
|
||||
for _, tp := range req.Resources {
|
||||
m[tp] = true
|
||||
}
|
||||
fs.brokersLock.Lock()
|
||||
fs.brokers[clientName] = m
|
||||
glog.V(0).Infof("+ broker %v", clientName)
|
||||
fs.brokersLock.Unlock()
|
||||
|
||||
defer func() {
|
||||
fs.brokersLock.Lock()
|
||||
delete(fs.brokers, clientName)
|
||||
glog.V(0).Infof("- broker %v: %v", clientName, err)
|
||||
fs.brokersLock.Unlock()
|
||||
}()
|
||||
|
||||
for {
|
||||
if err := stream.Send(&filer_pb.KeepConnectedResponse{}); err != nil {
|
||||
glog.V(0).Infof("send broker %v: %+v", clientName, err)
|
||||
return err
|
||||
}
|
||||
// println("replied")
|
||||
|
||||
if _, err := stream.Recv(); err != nil {
|
||||
glog.V(0).Infof("recv broker %v: %v", clientName, err)
|
||||
return err
|
||||
}
|
||||
// println("received")
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
func (fs *FilerServer) LocateBroker(ctx context.Context, req *filer_pb.LocateBrokerRequest) (resp *filer_pb.LocateBrokerResponse, err error) {
|
||||
|
||||
resp = &filer_pb.LocateBrokerResponse{}
|
||||
|
||||
fs.brokersLock.Lock()
|
||||
defer fs.brokersLock.Unlock()
|
||||
|
||||
var localBrokers []*filer_pb.LocateBrokerResponse_Resource
|
||||
|
||||
for b, m := range fs.brokers {
|
||||
if _, found := m[req.Resource]; found {
|
||||
resp.Found = true
|
||||
resp.Resources = []*filer_pb.LocateBrokerResponse_Resource{
|
||||
{
|
||||
GrpcAddresses: b,
|
||||
ResourceCount: int32(len(m)),
|
||||
},
|
||||
}
|
||||
return
|
||||
}
|
||||
localBrokers = append(localBrokers, &filer_pb.LocateBrokerResponse_Resource{
|
||||
GrpcAddresses: b,
|
||||
ResourceCount: int32(len(m)),
|
||||
})
|
||||
}
|
||||
|
||||
resp.Resources = localBrokers
|
||||
|
||||
return resp, nil
|
||||
|
||||
}
|
||||
@@ -21,10 +21,9 @@ func (fs *FilerServer) SubscribeMetadata(req *filer_pb.SubscribeMetadataRequest,
|
||||
|
||||
defer fs.deleteClient(clientName)
|
||||
|
||||
lastReadTime := time.Now()
|
||||
if req.SinceNs > 0 {
|
||||
lastReadTime = time.Unix(0, req.SinceNs)
|
||||
}
|
||||
lastReadTime := time.Unix(0, req.SinceNs)
|
||||
glog.V(0).Infof(" %v starts to subscribe %s from %+v", clientName, req.PathPrefix, lastReadTime)
|
||||
var processedTsNs int64
|
||||
|
||||
eachEventNotificationFn := func(dirPath string, eventNotification *filer_pb.EventNotification, tsNs int64) error {
|
||||
|
||||
@@ -59,12 +58,7 @@ func (fs *FilerServer) SubscribeMetadata(req *filer_pb.SubscribeMetadataRequest,
|
||||
return nil
|
||||
}
|
||||
|
||||
_, err := fs.filer.MetaLogBuffer.LoopProcessLogData(lastReadTime, func() bool {
|
||||
fs.listenersLock.Lock()
|
||||
fs.listenersCond.Wait()
|
||||
fs.listenersLock.Unlock()
|
||||
return true
|
||||
}, func(logEntry *filer_pb.LogEntry) error {
|
||||
eachLogEntryFn := func(logEntry *filer_pb.LogEntry) error {
|
||||
event := &filer_pb.SubscribeMetadataResponse{}
|
||||
if err := proto.Unmarshal(logEntry.Data, event); err != nil {
|
||||
glog.Errorf("unexpected unmarshal filer_pb.SubscribeMetadataResponse: %v", err)
|
||||
@@ -75,8 +69,25 @@ func (fs *FilerServer) SubscribeMetadata(req *filer_pb.SubscribeMetadataRequest,
|
||||
return err
|
||||
}
|
||||
|
||||
processedTsNs = logEntry.TsNs
|
||||
|
||||
return nil
|
||||
})
|
||||
}
|
||||
|
||||
if err := fs.filer.ReadPersistedLogBuffer(lastReadTime, eachLogEntryFn); err != nil {
|
||||
return fmt.Errorf("reading from persisted logs: %v", err)
|
||||
}
|
||||
|
||||
if processedTsNs != 0 {
|
||||
lastReadTime = time.Unix(0, processedTsNs)
|
||||
}
|
||||
|
||||
err := fs.filer.MetaLogBuffer.LoopProcessLogData(lastReadTime, func() bool {
|
||||
fs.listenersLock.Lock()
|
||||
fs.listenersCond.Wait()
|
||||
fs.listenersLock.Unlock()
|
||||
return true
|
||||
}, eachLogEntryFn)
|
||||
|
||||
return err
|
||||
|
||||
|
||||
@@ -10,6 +10,8 @@ import (
|
||||
|
||||
"google.golang.org/grpc"
|
||||
|
||||
"github.com/chrislusf/seaweedfs/weed/util/grace"
|
||||
|
||||
"github.com/chrislusf/seaweedfs/weed/operation"
|
||||
"github.com/chrislusf/seaweedfs/weed/pb"
|
||||
"github.com/chrislusf/seaweedfs/weed/pb/master_pb"
|
||||
@@ -61,6 +63,9 @@ type FilerServer struct {
|
||||
// notifying clients
|
||||
listenersLock sync.Mutex
|
||||
listenersCond *sync.Cond
|
||||
|
||||
brokers map[string]map[string]bool
|
||||
brokersLock sync.Mutex
|
||||
}
|
||||
|
||||
func NewFilerServer(defaultMux, readonlyMux *http.ServeMux, option *FilerOption) (fs *FilerServer, err error) {
|
||||
@@ -68,6 +73,7 @@ func NewFilerServer(defaultMux, readonlyMux *http.ServeMux, option *FilerOption)
|
||||
fs = &FilerServer{
|
||||
option: option,
|
||||
grpcDialOption: security.LoadClientTLS(util.GetViper(), "grpc.filer"),
|
||||
brokers: make(map[string]map[string]bool),
|
||||
}
|
||||
fs.listenersCond = sync.NewCond(&fs.listenersLock)
|
||||
|
||||
@@ -111,7 +117,7 @@ func NewFilerServer(defaultMux, readonlyMux *http.ServeMux, option *FilerOption)
|
||||
|
||||
fs.filer.LoadBuckets()
|
||||
|
||||
util.OnInterrupt(func() {
|
||||
grace.OnInterrupt(func() {
|
||||
fs.filer.Shutdown()
|
||||
})
|
||||
|
||||
|
||||
@@ -1,6 +1,7 @@
|
||||
package weed_server
|
||||
|
||||
import (
|
||||
"bytes"
|
||||
"context"
|
||||
"io"
|
||||
"mime"
|
||||
@@ -114,8 +115,13 @@ func (fs *FilerServer) GetOrHeadHandler(w http.ResponseWriter, r *http.Request,
|
||||
ext := filepath.Ext(filename)
|
||||
width, height, mode, shouldResize := shouldResizeImages(ext, r)
|
||||
if shouldResize {
|
||||
chunkedFileReader := filer2.NewChunkStreamReaderFromFiler(fs.filer.MasterClient, entry.Chunks)
|
||||
rs, _, _ := images.Resized(ext, chunkedFileReader, width, height, mode)
|
||||
data, err := filer2.ReadAll(fs.filer.MasterClient, entry.Chunks)
|
||||
if err != nil {
|
||||
glog.Errorf("failed to read %s: %v", path, err)
|
||||
w.WriteHeader(http.StatusNotModified)
|
||||
return
|
||||
}
|
||||
rs, _, _ := images.Resized(ext, bytes.NewReader(data), width, height, mode)
|
||||
io.Copy(w, rs)
|
||||
return
|
||||
}
|
||||
|
||||
@@ -119,17 +119,7 @@ func (fs *FilerServer) doAutoChunk(ctx context.Context, w http.ResponseWriter, r
|
||||
}
|
||||
|
||||
// Save to chunk manifest structure
|
||||
fileChunks = append(fileChunks,
|
||||
&filer_pb.FileChunk{
|
||||
FileId: fileId,
|
||||
Offset: chunkOffset,
|
||||
Size: uint64(uploadResult.Size),
|
||||
Mtime: time.Now().UnixNano(),
|
||||
ETag: uploadResult.ETag,
|
||||
CipherKey: uploadResult.CipherKey,
|
||||
IsGzipped: uploadResult.Gzip > 0,
|
||||
},
|
||||
)
|
||||
fileChunks = append(fileChunks, uploadResult.ToPbFileChunk(fileId, chunkOffset))
|
||||
|
||||
glog.V(4).Infof("uploaded %s chunk %d to %s [%d,%d) of %d", fileName, len(fileChunks), fileId, chunkOffset, chunkOffset+int64(uploadResult.Size), contentLength)
|
||||
|
||||
|
||||
@@ -46,19 +46,9 @@ func (fs *FilerServer) encrypt(ctx context.Context, w http.ResponseWriter, r *ht
|
||||
}
|
||||
|
||||
// Save to chunk manifest structure
|
||||
fileChunks := []*filer_pb.FileChunk{
|
||||
{
|
||||
FileId: fileId,
|
||||
Offset: 0,
|
||||
Size: uint64(uploadResult.Size),
|
||||
Mtime: time.Now().UnixNano(),
|
||||
ETag: uploadResult.Md5,
|
||||
CipherKey: uploadResult.CipherKey,
|
||||
IsGzipped: uploadResult.Gzip > 0,
|
||||
},
|
||||
}
|
||||
fileChunks := []*filer_pb.FileChunk{uploadResult.ToPbFileChunk(fileId, 0)}
|
||||
|
||||
fmt.Printf("uploaded: %+v\n", uploadResult)
|
||||
// fmt.Printf("uploaded: %+v\n", uploadResult)
|
||||
|
||||
path := r.URL.Path
|
||||
if strings.HasSuffix(path, "/") {
|
||||
|
||||
@@ -11,7 +11,6 @@ import (
|
||||
"google.golang.org/grpc/peer"
|
||||
|
||||
"github.com/chrislusf/seaweedfs/weed/glog"
|
||||
"github.com/chrislusf/seaweedfs/weed/pb"
|
||||
"github.com/chrislusf/seaweedfs/weed/pb/master_pb"
|
||||
"github.com/chrislusf/seaweedfs/weed/storage/backend"
|
||||
"github.com/chrislusf/seaweedfs/weed/storage/needle"
|
||||
@@ -25,8 +24,10 @@ func (ms *MasterServer) SendHeartbeat(stream master_pb.Seaweed_SendHeartbeatServ
|
||||
defer func() {
|
||||
if dn != nil {
|
||||
|
||||
glog.V(0).Infof("unregister disconnected volume server %s:%d", dn.Ip, dn.Port)
|
||||
// if the volume server disconnects and reconnects quickly
|
||||
// the unregister and register can race with each other
|
||||
t.UnRegisterDataNode(dn)
|
||||
glog.V(0).Infof("unregister disconnected volume server %s:%d", dn.Ip, dn.Port)
|
||||
|
||||
message := &master_pb.VolumeLocation{
|
||||
Url: dn.Url(),
|
||||
@@ -191,18 +192,6 @@ func (ms *MasterServer) KeepConnected(stream master_pb.Seaweed_KeepConnectedServ
|
||||
|
||||
peerAddress := findClientAddress(stream.Context(), req.GrpcPort)
|
||||
|
||||
// only one shell can be connected at any time
|
||||
if req.Name == pb.AdminShellClient {
|
||||
if ms.currentAdminShellClient == "" {
|
||||
ms.currentAdminShellClient = peerAddress
|
||||
defer func() {
|
||||
ms.currentAdminShellClient = ""
|
||||
}()
|
||||
} else {
|
||||
return fmt.Errorf("only one concurrent shell allowed, but another shell is already connected from %s", peerAddress)
|
||||
}
|
||||
}
|
||||
|
||||
stopChan := make(chan bool)
|
||||
|
||||
clientName, messageChan := ms.addClient(req.Name, peerAddress)
|
||||
|
||||
@@ -0,0 +1,93 @@
|
||||
package weed_server
|
||||
|
||||
import (
|
||||
"context"
|
||||
"fmt"
|
||||
"math/rand"
|
||||
"time"
|
||||
|
||||
"github.com/chrislusf/seaweedfs/weed/pb/master_pb"
|
||||
)
|
||||
|
||||
/*
|
||||
How exclusive lock works?
|
||||
-----------
|
||||
|
||||
Shell
|
||||
------
|
||||
When shell lock,
|
||||
* lease an admin token (lockTime, token)
|
||||
* start a goroutine to renew the admin token periodically
|
||||
|
||||
When shell unlock
|
||||
* stop the renewal goroutine
|
||||
* sends a release lock request
|
||||
|
||||
Master
|
||||
------
|
||||
Master maintains:
|
||||
* randomNumber
|
||||
* lastLockTime
|
||||
When master receives the lease/renew request from shell
|
||||
If lastLockTime still fresh {
|
||||
if is a renew and token is valid {
|
||||
// for renew
|
||||
generate the randomNumber => token
|
||||
return
|
||||
}
|
||||
refuse
|
||||
return
|
||||
} else {
|
||||
// for fresh lease request
|
||||
generate the randomNumber => token
|
||||
return
|
||||
}
|
||||
|
||||
When master receives the release lock request from shell
|
||||
set the lastLockTime to zero
|
||||
|
||||
|
||||
The volume server does not need to verify.
|
||||
This makes the lock/unlock optional, similar to what golang code usually does.
|
||||
|
||||
*/
|
||||
|
||||
const (
|
||||
LockDuration = 10 * time.Second
|
||||
)
|
||||
|
||||
func (ms *MasterServer) LeaseAdminToken(ctx context.Context, req *master_pb.LeaseAdminTokenRequest) (*master_pb.LeaseAdminTokenResponse, error) {
|
||||
resp := &master_pb.LeaseAdminTokenResponse{}
|
||||
|
||||
if ms.adminAccessSecret != 0 && ms.adminAccessLockTime.Add(LockDuration).After(time.Now()) {
|
||||
if req.PreviousToken != 0 && ms.isValidToken(time.Unix(0, req.PreviousLockTime), req.PreviousToken) {
|
||||
// for renew
|
||||
ts, token := ms.generateToken()
|
||||
resp.Token, resp.LockTsNs = token, ts.UnixNano()
|
||||
return resp, nil
|
||||
}
|
||||
// refuse since still locked
|
||||
return resp, fmt.Errorf("already locked")
|
||||
}
|
||||
// for fresh lease request
|
||||
ts, token := ms.generateToken()
|
||||
resp.Token, resp.LockTsNs = token, ts.UnixNano()
|
||||
return resp, nil
|
||||
}
|
||||
|
||||
func (ms *MasterServer) isValidToken(ts time.Time, token int64) bool {
|
||||
return ms.adminAccessLockTime.Equal(ts) && ms.adminAccessSecret == token
|
||||
}
|
||||
func (ms *MasterServer) generateToken() (ts time.Time, token int64) {
|
||||
ms.adminAccessLockTime = time.Now()
|
||||
ms.adminAccessSecret = rand.Int63()
|
||||
return ms.adminAccessLockTime, ms.adminAccessSecret
|
||||
}
|
||||
|
||||
func (ms *MasterServer) ReleaseAdminToken(ctx context.Context, req *master_pb.ReleaseAdminTokenRequest) (*master_pb.ReleaseAdminTokenResponse, error) {
|
||||
resp := &master_pb.ReleaseAdminTokenResponse{}
|
||||
if ms.isValidToken(time.Unix(0, req.PreviousLockTime), req.PreviousToken) {
|
||||
ms.adminAccessSecret = 0
|
||||
}
|
||||
return resp, nil
|
||||
}
|
||||
@@ -66,7 +66,8 @@ type MasterServer struct {
|
||||
|
||||
MasterClient *wdclient.MasterClient
|
||||
|
||||
currentAdminShellClient string
|
||||
adminAccessSecret int64
|
||||
adminAccessLockTime time.Time
|
||||
}
|
||||
|
||||
func NewMasterServer(r *mux.Router, option *MasterOption, peers []string) *MasterServer {
|
||||
@@ -204,6 +205,10 @@ func (ms *MasterServer) startAdminScripts() {
|
||||
filerHostPort := v.GetString("master.filer.default")
|
||||
|
||||
scriptLines := strings.Split(adminScripts, "\n")
|
||||
if !strings.Contains(adminScripts, "lock") {
|
||||
scriptLines = append(append([]string{}, "lock"), scriptLines...)
|
||||
scriptLines = append(scriptLines, "unlock")
|
||||
}
|
||||
|
||||
masterAddress := "localhost:" + strconv.Itoa(ms.option.Port)
|
||||
|
||||
@@ -231,24 +236,8 @@ func (ms *MasterServer) startAdminScripts() {
|
||||
for range c {
|
||||
if ms.Topo.IsLeader() {
|
||||
for _, line := range scriptLines {
|
||||
|
||||
cmds := reg.FindAllString(line, -1)
|
||||
if len(cmds) == 0 {
|
||||
continue
|
||||
}
|
||||
args := make([]string, len(cmds[1:]))
|
||||
for i := range args {
|
||||
args[i] = strings.Trim(string(cmds[1+i]), "\"'")
|
||||
}
|
||||
cmd := strings.ToLower(cmds[0])
|
||||
|
||||
for _, c := range shell.Commands {
|
||||
if c.Name() == cmd {
|
||||
glog.V(0).Infof("executing: %s %v", cmd, args)
|
||||
if err := c.Do(args, commandEnv, os.Stdout); err != nil {
|
||||
glog.V(0).Infof("error: %v", err)
|
||||
}
|
||||
}
|
||||
for _, c := range strings.Split(line, ";") {
|
||||
processEachCmd(reg, c, commandEnv)
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -256,6 +245,27 @@ func (ms *MasterServer) startAdminScripts() {
|
||||
}()
|
||||
}
|
||||
|
||||
func processEachCmd(reg *regexp.Regexp, line string, commandEnv *shell.CommandEnv) {
|
||||
cmds := reg.FindAllString(line, -1)
|
||||
if len(cmds) == 0 {
|
||||
return
|
||||
}
|
||||
args := make([]string, len(cmds[1:]))
|
||||
for i := range args {
|
||||
args[i] = strings.Trim(string(cmds[1+i]), "\"'")
|
||||
}
|
||||
cmd := strings.ToLower(cmds[0])
|
||||
|
||||
for _, c := range shell.Commands {
|
||||
if c.Name() == cmd {
|
||||
glog.V(0).Infof("executing: %s %v", cmd, args)
|
||||
if err := c.Do(args, commandEnv, os.Stdout); err != nil {
|
||||
glog.V(0).Infof("error: %v", err)
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
func (ms *MasterServer) createSequencer(option *MasterOption) sequence.Sequencer {
|
||||
var seq sequence.Sequencer
|
||||
v := util.GetViper()
|
||||
|
||||
@@ -45,7 +45,7 @@ func (ms *MasterServer) dirLookupHandler(w http.ResponseWriter, r *http.Request)
|
||||
vid = fileId[0:commaSep]
|
||||
}
|
||||
}
|
||||
collection := r.FormValue("collection") //optional, but can be faster if too many collections
|
||||
collection := r.FormValue("collection") // optional, but can be faster if too many collections
|
||||
location := ms.findVolumeLocation(collection, vid)
|
||||
httpStatus := http.StatusOK
|
||||
if location.Error != "" || location.Locations == nil {
|
||||
@@ -72,9 +72,6 @@ func (ms *MasterServer) findVolumeLocation(collection, vid string) operation.Loo
|
||||
for _, loc := range machines {
|
||||
locations = append(locations, operation.Location{Url: loc.Url(), PublicUrl: loc.PublicUrl})
|
||||
}
|
||||
if locations == nil {
|
||||
err = fmt.Errorf("volume id %s not found", vid)
|
||||
}
|
||||
}
|
||||
} else {
|
||||
machines, getVidLocationsErr := ms.MasterClient.GetVidLocations(vid)
|
||||
@@ -83,6 +80,9 @@ func (ms *MasterServer) findVolumeLocation(collection, vid string) operation.Loo
|
||||
}
|
||||
err = getVidLocationsErr
|
||||
}
|
||||
if len(locations) == 0 && err == nil {
|
||||
err = fmt.Errorf("volume id %s not found", vid)
|
||||
}
|
||||
ret := operation.LookupResult{
|
||||
VolumeId: vid,
|
||||
Locations: locations,
|
||||
|
||||
@@ -2,6 +2,7 @@ package weed_server
|
||||
|
||||
import (
|
||||
"net/http"
|
||||
"time"
|
||||
|
||||
"github.com/chrislusf/raft"
|
||||
ui "github.com/chrislusf/seaweedfs/weed/server/master_ui"
|
||||
@@ -11,7 +12,7 @@ import (
|
||||
|
||||
func (ms *MasterServer) uiStatusHandler(w http.ResponseWriter, r *http.Request) {
|
||||
infos := make(map[string]interface{})
|
||||
infos["Version"] = util.VERSION
|
||||
infos["Up Time"] = time.Now().Sub(startTime).String()
|
||||
args := struct {
|
||||
Version string
|
||||
Topology interface{}
|
||||
|
||||
@@ -35,6 +35,9 @@ func (vs *VolumeServer) heartbeat() {
|
||||
for {
|
||||
for _, master := range vs.SeedMasterNodes {
|
||||
if newLeader != "" {
|
||||
// the new leader may actually is the same master
|
||||
// need to wait a bit before adding itself
|
||||
time.Sleep(3 * time.Second)
|
||||
master = newLeader
|
||||
}
|
||||
masterGrpcAddress, parseErr := pb.ParseServerToGrpcAddress(master)
|
||||
|
||||
@@ -82,6 +82,13 @@ func (vs *VolumeServer) VolumeCopy(ctx context.Context, req *volume_server_pb.Vo
|
||||
return nil
|
||||
})
|
||||
|
||||
if err != nil {
|
||||
return nil, err
|
||||
}
|
||||
if volumeFileName == "" {
|
||||
return nil, fmt.Errorf("not found volume %d file", req.VolumeId)
|
||||
}
|
||||
|
||||
idxFileName = volumeFileName + ".idx"
|
||||
datFileName = volumeFileName + ".dat"
|
||||
|
||||
@@ -93,10 +100,6 @@ func (vs *VolumeServer) VolumeCopy(ctx context.Context, req *volume_server_pb.Vo
|
||||
}
|
||||
}()
|
||||
|
||||
if err != nil && volumeFileName != "" {
|
||||
return nil, err
|
||||
}
|
||||
|
||||
if err = checkCopyFiles(volFileInfoResp, idxFileName, datFileName); err != nil { // added by panyc16
|
||||
return nil, err
|
||||
}
|
||||
|
||||
@@ -10,6 +10,7 @@ import (
|
||||
"strings"
|
||||
"time"
|
||||
|
||||
"github.com/chrislusf/seaweedfs/weed/util/grace"
|
||||
"golang.org/x/net/webdav"
|
||||
"google.golang.org/grpc"
|
||||
|
||||
@@ -100,7 +101,7 @@ type WebDavFile struct {
|
||||
func NewWebDavFileSystem(option *WebDavOption) (webdav.FileSystem, error) {
|
||||
|
||||
chunkCache := chunk_cache.NewChunkCache(256, option.CacheDir, option.CacheSizeMB)
|
||||
util.OnInterrupt(func() {
|
||||
grace.OnInterrupt(func() {
|
||||
chunkCache.Shutdown()
|
||||
})
|
||||
return &WebDavFileSystem{
|
||||
@@ -109,6 +110,8 @@ func NewWebDavFileSystem(option *WebDavOption) (webdav.FileSystem, error) {
|
||||
}, nil
|
||||
}
|
||||
|
||||
var _ = filer_pb.FilerClient(&WebDavFileSystem{})
|
||||
|
||||
func (fs *WebDavFileSystem) WithFilerClient(fn func(filer_pb.SeaweedFilerClient) error) error {
|
||||
|
||||
return pb.WithCachedGrpcClient(func(grpcConnection *grpc.ClientConn) error {
|
||||
@@ -415,17 +418,7 @@ func (f *WebDavFile) Write(buf []byte) (int, error) {
|
||||
return 0, fmt.Errorf("upload result: %v", uploadResult.Error)
|
||||
}
|
||||
|
||||
chunk := &filer_pb.FileChunk{
|
||||
FileId: fileId,
|
||||
Offset: f.off,
|
||||
Size: uint64(len(buf)),
|
||||
Mtime: time.Now().UnixNano(),
|
||||
ETag: uploadResult.ETag,
|
||||
CipherKey: uploadResult.CipherKey,
|
||||
IsGzipped: uploadResult.Gzip > 0,
|
||||
}
|
||||
|
||||
f.entry.Chunks = append(f.entry.Chunks, chunk)
|
||||
f.entry.Chunks = append(f.entry.Chunks, uploadResult.ToPbFileChunk(fileId, f.off))
|
||||
|
||||
err = f.fs.WithFilerClient(func(client filer_pb.SeaweedFilerClient) error {
|
||||
f.entry.Attributes.Mtime = time.Now().Unix()
|
||||
@@ -508,7 +501,7 @@ func (f *WebDavFile) Readdir(count int) (ret []os.FileInfo, err error) {
|
||||
|
||||
dir, _ := util.FullPath(f.name).DirAndName()
|
||||
|
||||
err = filer_pb.ReadDirAllEntries(f.fs, util.FullPath(dir), "", func(entry *filer_pb.Entry, isLast bool) {
|
||||
err = filer_pb.ReadDirAllEntries(f.fs, util.FullPath(dir), "", func(entry *filer_pb.Entry, isLast bool) error {
|
||||
fi := FileInfo{
|
||||
size: int64(filer2.TotalSize(entry.GetChunks())),
|
||||
name: entry.Name,
|
||||
@@ -522,6 +515,7 @@ func (f *WebDavFile) Readdir(count int) (ret []os.FileInfo, err error) {
|
||||
}
|
||||
glog.V(4).Infof("entry: %v", fi.name)
|
||||
ret = append(ret, &fi)
|
||||
return nil
|
||||
})
|
||||
|
||||
old := f.off
|
||||
|
||||
@@ -45,12 +45,13 @@ func (c *commandBucketList) Do(args []string, commandEnv *CommandEnv, writer io.
|
||||
return fmt.Errorf("read buckets: %v", err)
|
||||
}
|
||||
|
||||
err = filer_pb.List(commandEnv, filerBucketsPath, "", func(entry *filer_pb.Entry, isLast bool) {
|
||||
err = filer_pb.List(commandEnv, filerBucketsPath, "", func(entry *filer_pb.Entry, isLast bool) error {
|
||||
if entry.Attributes.Replication == "" || entry.Attributes.Replication == "000" {
|
||||
fmt.Fprintf(writer, " %s\n", entry.Name)
|
||||
} else {
|
||||
fmt.Fprintf(writer, " %s\t\t\treplication: %s\n", entry.Name, entry.Attributes.Replication)
|
||||
}
|
||||
return nil
|
||||
}, "", false, math.MaxUint32)
|
||||
if err != nil {
|
||||
return fmt.Errorf("list buckets under %v: %v", filerBucketsPath, err)
|
||||
|
||||
@@ -98,6 +98,10 @@ func (c *commandEcBalance) Help() string {
|
||||
|
||||
func (c *commandEcBalance) Do(args []string, commandEnv *CommandEnv, writer io.Writer) (err error) {
|
||||
|
||||
if err = commandEnv.confirmIsLocked(); err != nil {
|
||||
return
|
||||
}
|
||||
|
||||
balanceCommand := flag.NewFlagSet(c.Name(), flag.ContinueOnError)
|
||||
collection := balanceCommand.String("collection", "EACH_COLLECTION", "collection name, or \"EACH_COLLECTION\" for each collection")
|
||||
dc := balanceCommand.String("dataCenter", "", "only apply the balancing for this dataCenter")
|
||||
|
||||
@@ -36,6 +36,10 @@ func (c *commandEcDecode) Help() string {
|
||||
|
||||
func (c *commandEcDecode) Do(args []string, commandEnv *CommandEnv, writer io.Writer) (err error) {
|
||||
|
||||
if err = commandEnv.confirmIsLocked(); err != nil {
|
||||
return
|
||||
}
|
||||
|
||||
encodeCommand := flag.NewFlagSet(c.Name(), flag.ContinueOnError)
|
||||
volumeId := encodeCommand.Int("volumeId", 0, "the volume id")
|
||||
collection := encodeCommand.String("collection", "", "the collection name")
|
||||
|
||||
@@ -54,6 +54,10 @@ func (c *commandEcEncode) Help() string {
|
||||
|
||||
func (c *commandEcEncode) Do(args []string, commandEnv *CommandEnv, writer io.Writer) (err error) {
|
||||
|
||||
if err = commandEnv.confirmIsLocked(); err != nil {
|
||||
return
|
||||
}
|
||||
|
||||
encodeCommand := flag.NewFlagSet(c.Name(), flag.ContinueOnError)
|
||||
volumeId := encodeCommand.Int("volumeId", 0, "the volume id")
|
||||
collection := encodeCommand.String("collection", "", "the collection name")
|
||||
@@ -187,6 +191,7 @@ func spreadEcShards(commandEnv *CommandEnv, volumeId needle.VolumeId, collection
|
||||
|
||||
// ask the source volume server to delete the original volume
|
||||
for _, location := range existingLocations {
|
||||
fmt.Printf("delete volume %d from %s\n", volumeId, location.Url)
|
||||
err = deleteVolume(commandEnv.option.GrpcDialOption, volumeId, location.Url)
|
||||
if err != nil {
|
||||
return fmt.Errorf("deleteVolume %s volume %d: %v", location.Url, volumeId, err)
|
||||
|
||||
@@ -56,6 +56,10 @@ func (c *commandEcRebuild) Help() string {
|
||||
|
||||
func (c *commandEcRebuild) Do(args []string, commandEnv *CommandEnv, writer io.Writer) (err error) {
|
||||
|
||||
if err = commandEnv.confirmIsLocked(); err != nil {
|
||||
return
|
||||
}
|
||||
|
||||
fixCommand := flag.NewFlagSet(c.Name(), flag.ContinueOnError)
|
||||
collection := fixCommand.String("collection", "EACH_COLLECTION", "collection name, or \"EACH_COLLECTION\" for each collection")
|
||||
applyChanges := fixCommand.Bool("force", false, "apply the changes")
|
||||
|
||||
@@ -54,7 +54,7 @@ func (c *commandFsDu) Do(args []string, commandEnv *CommandEnv, writer io.Writer
|
||||
|
||||
func duTraverseDirectory(writer io.Writer, filerClient filer_pb.FilerClient, dir, name string) (blockCount, byteCount uint64, err error) {
|
||||
|
||||
err = filer_pb.ReadDirAllEntries(filerClient, util.FullPath(dir), name, func(entry *filer_pb.Entry, isLast bool) {
|
||||
err = filer_pb.ReadDirAllEntries(filerClient, util.FullPath(dir), name, func(entry *filer_pb.Entry, isLast bool) error {
|
||||
|
||||
var fileBlockCount, fileByteCount uint64
|
||||
|
||||
@@ -78,6 +78,7 @@ func duTraverseDirectory(writer io.Writer, filerClient filer_pb.FilerClient, dir
|
||||
if name != "" && !entry.IsDirectory {
|
||||
fmt.Fprintf(writer, "block:%4d\tbyte:%10d\t%s/%s\n", fileBlockCount, fileByteCount, dir, entry.Name)
|
||||
}
|
||||
return nil
|
||||
})
|
||||
return
|
||||
}
|
||||
@@ -0,0 +1,54 @@
|
||||
package shell
|
||||
|
||||
import (
|
||||
"io"
|
||||
)
|
||||
|
||||
func init() {
|
||||
Commands = append(Commands, &commandUnlock{})
|
||||
Commands = append(Commands, &commandLock{})
|
||||
}
|
||||
|
||||
// =========== Lock ==============
|
||||
type commandLock struct {
|
||||
}
|
||||
|
||||
func (c *commandLock) Name() string {
|
||||
return "lock"
|
||||
}
|
||||
|
||||
func (c *commandLock) Help() string {
|
||||
return `lock in order to exclusively manage the cluster
|
||||
|
||||
This is a blocking operation if there is alread another lock.
|
||||
`
|
||||
}
|
||||
|
||||
func (c *commandLock) Do(args []string, commandEnv *CommandEnv, writer io.Writer) (err error) {
|
||||
|
||||
commandEnv.locker.RequestLock()
|
||||
|
||||
return nil
|
||||
}
|
||||
|
||||
// =========== Unlock ==============
|
||||
|
||||
type commandUnlock struct {
|
||||
}
|
||||
|
||||
func (c *commandUnlock) Name() string {
|
||||
return "unlock"
|
||||
}
|
||||
|
||||
func (c *commandUnlock) Help() string {
|
||||
return `unlock the cluster-wide lock
|
||||
|
||||
`
|
||||
}
|
||||
|
||||
func (c *commandUnlock) Do(args []string, commandEnv *CommandEnv, writer io.Writer) (err error) {
|
||||
|
||||
commandEnv.locker.ReleaseLock()
|
||||
|
||||
return nil
|
||||
}
|
||||
Loaded 100 of 133 files, more files were not shown because too many files have changed in this diff.
Show more
Reference in new issue
Block a user