hadoop - Apache Flume-错误的时间戳

标签 hadoop flume

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

# 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创建文件夹flume / ads / 70-01-17 / 02。该文件夹包含文件“FlumeData.timestamp”,该时间戳有十二位数字。

我得到一个不正确的文件夹名称。

我能做什么?

最佳答案

我找到了。

在“接收器”部分中,应为:

a1.sinks.k1.hdfs.useLocalTimeStamp = True 

关于hadoop - Apache Flume-错误的时间戳,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/20907540/

相关文章:

读取 Hive 表中的 JSON 数据

twitter - 多个水槽Twitter代理

hadoop - Flume 将数据从 MySQL 迁移到 Hadoop

apache-zookeeper - Zookeeper 不断收到警告 : "caught end of stream exception"

hadoop - 将Facebook帖子提取到Hdfs中

hadoop - 如何使用flume将数据从本地机器加载到hdfs

sql - 汇总 hive 中的每周数据

hadoop - 为什么对 pig 中的元素计数比 hive 慢得多

hadoop - 是 FileOutputFormat.setCompressOutput(job, true);选修的?

hadoop - 为什么hadoop不将文件分发到所有节点?