Updated Filer Metadata Events (markdown)

Chris Lu 2020-05-23 18:55:40 -07:00
parent 1b04ed2cd3
commit f23dccfff8

@ -1,7 +1,7 @@
On filer, there is a `/topics/.system/log` folder, it stores all events from filer metadata change events.
On filer, there is a `/topics/.system/log` folder, it stores all filer metadata change events.
## Metadata Event Format
The events are organized by timestamp, `yyyy-MM-dd/hh-mm.segment`.
The events are stored in files organized by timestamp, `yyyy-MM-dd/hh-mm.segment`.
The events are encoded by protobuf, defined in https://github.com/chrislusf/seaweedfs/blob/master/weed/pb/filer.proto . The related sections are:
```
@ -34,7 +34,7 @@ message LogEntry {
```
The ondisk file is a repeated of the following bytes:
The ondisk file is a repeated bytes of the following format:
1. 4 bytes of `LogEntry` size
2. serialized `LogEntry`
@ -68,7 +68,9 @@ message SubscribeMetadataResponse {
This is similar to `inotify` in normal file system, but actually much more powerful. Usually `inotify` can only monitor one directory and its direct children, but SeaweedFS metadata subscription can monitor one directory and all its sub-directories and files.
This could be useful to build powerful event driven data processing pipelines. Please let me know if you have some great ideas or accomplishment!
This API also allows you to read from any point of time and replay all metadata events.
This API could be useful to build powerful event driven data processing pipelines. Please let me know if you have some great ideas or accomplishment!
### What kind of events it contains?