Apache Flume - 不正确的时间戳

时间:2014-01-03 15:51:30

标签: hadoop flume

当我使用Apache Flume时,我得到一个毫秒时间戳rahter然后是第二个时间戳。 这是我的水文配置文件:

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

# Describe/configure the source
a1.sources.r1.type = org.apache.flume.source.http.HTTPSource
a1.sources.r1.port = 44444

# Describe the sink
a1.sinks.k1.type = hdfs
a1.sinks.k1.hdfs.path = flume/ads/%y-%m-%d/%H
a1.sinks.k1.hdfs.fileType = DataStream

# Use a channel which buffers events in memory
a1.channels.c1.type = memory
a1.channels.c1.capacity = 10000

# Bind the source and sink to the channel
a1.sources.r1.channels = c1
a1.sinks.k1.channel = c1

Flume创建了文件夹水槽/ ads / 70-01-17 / 02。该文件夹包含文件“FlumeData.timestamp”,此时间戳有12位数字。

我收到了错误的文件夹名称。

我该怎么办?

1 个答案:

答案 0 :(得分:1)

我找到了。

在节应该是:

a1.sinks.k1.hdfs.useLocalTimeStamp = True