学海舟舟_林 2020-03-25 18:44 采纳率: 0%
浏览 199

把Flume的spooldir目录中的文件传到HDFS失败——java.io.IOException:File type DataStream not supported

这个问题困扰两天了——Flume能检测到Spooldir目录中的文件增加,但是就是传不到hdfs中,总是报错:java.io.IOException:File type DataStream not supported
我的hadoop集群第一台是master,另外两台是slave。
图片说明图片说明

flume的配置如下:

Name the components on this agent

 
agent1.sources = spooldirSource
 
agent1.channels = fileChannel
 
agent1.sinks = hdfsSink
 
 
 

Describe/configure the source

 
agent1.sources.spooldirSource.type=spooldir
 
agent1.sources.spooldirSource.spoolDir=/usr/local/flume/data/spooldir
 
 
 

Describe the sink

 
agent1.sinks.hdfsSink.type=hdfs
 
agent1.sinks.hdfsSink.hdfs.path=hdfs://192.168.174.128:9000/flume/%y-%m-%d/%H%M/%S
 
agent1.sinks.hdfsSink.hdfs.round = true
 
agent1.sinks.hdfsSink.hdfs.roundValue = 10
 
agent1.sinks.hdfsSink.hdfs.roundUnit = minute
 
agent1.sinks.hdfsSink.hdfs.useLocalTimeStamp = true
 
agent1.sinks.hdfsSink.hdfs.fileType=DataStream  
 
 
 

Describe the channel

 
agent1.channels.fileChannel.type = file
 
agent1.channels.fileChannel.dataDirs=/hadoop/flume/datadir
 
 
 

Bind the source and sink to the channel

 
agent1.sources.spooldirSource.channels=fileChannel
 
agent1.sinks.hdfsSink.channel=fileChannel

另外,/hadoop/flume/datadir这个目录是在master上会自动创建的目录吗,不太懂。

  • 写回答

0条回答 默认 最新

    报告相同问题?

    悬赏问题

    • ¥15 overleaf中论文编辑,报错`pages' is a missing field, not a string, for entry 4
    • ¥15 vhdl+MODELSIM
    • ¥20 simulink中怎么使用solve函数?
    • ¥30 dspbuilder中使用signalcompiler时报错Error during compilation: Fitter failed,求解决办法
    • ¥15 gwas 分析-数据质控之过滤稀有突变中出现的问题
    • ¥15 没有注册类 (异常来自 HRESULT: 0x80040154 (REGDB_E_CLASSNOTREG))
    • ¥15 知识蒸馏实战博客问题
    • ¥15 用PLC设计纸袋糊底机送料系统
    • ¥15 simulink仿真中dtc控制永磁同步电机如何控制开关频率
    • ¥15 用C语言输入方程怎么