如何动态地为频道目录(Checkpoint& Data Dir)命名日期

时间:2016-05-13 05:06:01

标签: flume

我使用Channel作为水槽中的备份而没有任何接收器并且它正常工作。下面是我的工作代码,但如何动态提供目录或文件名? (我希望在更改日期时明确指定日期名称动态创建新目录并作为备份存在。)

# Name the components on this agent
a1.sources = r1
a1.channels =c1

# Describe/configure the source r1
a1.sources.r1.type = http
a1.sources.r1.port = 40441
a1.sources.r1.bind = X.X.X.X
a1.sources.r1.channels = c1

# Use a channel which buffers events in file
a1.channels.c1.type = file
a1.channels.c1.dataDirs = /data/disk11/flume/Test/dataDirs{**%y%m%d**}
a1.channels.c1.checkpointDir =data/disk11/flume/Test/checkpointDir{**%y%m%d**}
a1.channels.c1.capacity = 1000
a1.channels.c1.transactionCapacity = 100

0 个答案:

没有答案