adjust replicated entry name

This commit is contained in:
Chris Lu
2018-09-17 01:37:24 -07:00
parent b7a375f5aa
commit 779641e9d4
5 changed files with 54 additions and 41 deletions

View File

@@ -44,7 +44,7 @@ func runFilerReplicate(cmd *Command, args []string) bool {
}
}
replicator := replication.NewReplicator(config.Sub("sink.filer"))
replicator := replication.NewReplicator(config.Sub("source.filer"), config.Sub("sink.filer"))
for {
key, m, err := notificationInput.ReceiveMessage()

View File

@@ -149,25 +149,19 @@ topic = "seaweedfs_filer"
[source.filer]
enabled = true
grpcAddress = "localhost:18888"
# id is to identify the notification source, avoid reprocessing the same events
id = "filer1"
# all files under this directory tree and not from this source.filer.id is replicated
directory = "/"
directory = "/buckets" # all files under this directory tree are replicated
[notification.kafka]
enabled = true
hosts = [
"localhost:9092"
]
topic = "seaweedfs_filer"
topic = "seaweedfs_filer1_to_filer2"
[sink.filer]
enabled = true
grpcAddress = "localhost:18888"
# id is to identify the notification source, avoid reprocessing the same events
id = "filer2"
# all files under this directory tree and not from this source.filer.id is replicated
directory = "/"
directory = "/backup" # all replicated files are under this directory tree
`
)