Skip to content

Commit

Permalink
feat: 增加flume文件监听以及hdfs写入配置
Browse files Browse the repository at this point in the history
  • Loading branch information
TomShiDi committed Mar 9, 2024
1 parent 008f314 commit f099569
Showing 1 changed file with 44 additions and 0 deletions.
Original file line number Diff line number Diff line change
@@ -0,0 +1,44 @@
# agent
a2.sources=r1
a2.sinks=k1
a2.channels=c1

# source
a2.sources.r1.type=TAILDIR
a2.sources.r1.positionFile=/opt/server/flume/tailddir_position.json
a2.sources.r1.filegroups=f1 f2
a2.sources.r1.filegroups.f1=/opt/server/flume/datas/tail-case/files/.*file.*
a2.sources.r1.filegroups.f2=/opt/server/flume/datas/tail-case/logs/.*log

# sink
a2.sinks.k1.type = hdfs
a2.sinks.k1.hdfs.path = hdfs://node1:8020/flume/tailDir/%Y%m%d/%H
# ???????
a2.sinks.k1.hdfs.filePrefix = tail-
# ???????????
a2.sinks.k1.hdfs.round = true
# ???????????????
a2.sinks.k1.hdfs.roundValue = 1
# ????????
a2.sinks.k1.hdfs.roundUnit = hour
# ?????????
a2.sinks.k1.hdfs.useLocalTimeStamp = true
# ?????Event?flush?HDFS??
a2.sinks.k1.hdfs.batchSize = 100
# ??????????????????CompressedStream????????DataStream?
a2.sinks.k1.hdfs.fileType = DataStream
# ??????????
a2.sinks.k1.hdfs.rollInterval = 60
# ??????????????128M
a2.sinks.k1.hdfs.rollSize = 134217700
# ??????Event????
a2.sinks.k1.hdfs.rollCount = 0

# channel
a2.channels.c1.type=memory
a2.channels.c1.capacity=1000
a2.channels.c1.transactionCapacity=100

# bind
a2.sources.r1.channels=c1
a2.sinks.k1.channel=c1

0 comments on commit f099569

Please sign in to comment.