mirror of
https://github.com/seaweedfs/seaweedfs.git
synced 2024-01-19 02:48:24 +00:00
Updated Filer Change Data Capture (markdown)
parent
499c5568b2
commit
aa69027dc7
|
@ -7,9 +7,13 @@ Actually SeaweedFS can give you more!
|
||||||
You can watch the SeaweedFS meta data changes.
|
You can watch the SeaweedFS meta data changes.
|
||||||
|
|
||||||
```
|
```
|
||||||
$ weed watch -h
|
$ weed filer.meta.tail -h
|
||||||
Example: weed watch [-filer=localhost:8888] [-target=/]
|
Example: weed filer.meta.tail [-filer=localhost:8888] [-target=/]
|
||||||
Default Usage:
|
Default Usage:
|
||||||
|
-es string
|
||||||
|
comma-separated elastic servers http://<host:port>
|
||||||
|
-es.index string
|
||||||
|
ES index name (default "seaweedfs")
|
||||||
-filer string
|
-filer string
|
||||||
filer hostname:port (default "localhost:8888")
|
filer hostname:port (default "localhost:8888")
|
||||||
-pathPrefix string
|
-pathPrefix string
|
||||||
|
@ -21,13 +25,18 @@ Default Usage:
|
||||||
Description:
|
Description:
|
||||||
See recent changes on a filer.
|
See recent changes on a filer.
|
||||||
|
|
||||||
$ weed watch
|
$ weed filer.meta.tail
|
||||||
dir:/home new_entry:{name:"3190.pdf" chunks:{size:1130805 mtime:1608763500740201000 e_tag:"5c745d0a109bde58e0baaa6515c3694a" fid:{volume_id:1 file_key:35 cookie:4265699614}} attributes:{file_size:1130805 mtime:1608763500 file_mode:432 uid:502 gid:20 crtime:1608763500 mime:"application/pdf" replication:"000" md5:"\\t]\n\x10\x9b\xdeXສe\x15\xc3iJ"}} delete_chunks:true new_parent_path:"/home" signatures:1622972984
|
dir:/home new_entry:{name:"3190.pdf" chunks:{size:1130805 mtime:1608763500740201000 e_tag:"5c745d0a109bde58e0baaa6515c3694a" fid:{volume_id:1 file_key:35 cookie:4265699614}} attributes:{file_size:1130805 mtime:1608763500 file_mode:432 uid:502 gid:20 crtime:1608763500 mime:"application/pdf" replication:"000" md5:"\\t]\n\x10\x9b\xdeXສe\x15\xc3iJ"}} delete_chunks:true new_parent_path:"/home" signatures:1622972984
|
||||||
```
|
```
|
||||||
|
|
||||||
|
If configured Elastic Search server names, the meta data will be sent to Elastic Search
|
||||||
|
```
|
||||||
|
$ weed filer.meta.tail -es=http://localhost:9200
|
||||||
|
```
|
||||||
|
|
||||||
# How it works?
|
# How it works?
|
||||||
|
|
||||||
The `weed watch` code is nothing fancy. It is calls a gRPC stream API to subscribe to all meta data changes and simply print out the meta data.
|
The `weed filer.meta.tail` code is nothing fancy. It is calls a gRPC stream API to subscribe to all meta data changes and simply print out the meta data.
|
||||||
|
|
||||||
The gRPC API has several important use cases within SeaweedFS:
|
The gRPC API has several important use cases within SeaweedFS:
|
||||||
* Replicate data to other SeaweedFS clusters in `weed filer.sync`.
|
* Replicate data to other SeaweedFS clusters in `weed filer.sync`.
|
||||||
|
|
Loading…
Reference in a new issue