学海舟舟_林 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 shape_predictor_68_face_landmarks.dat
    • ¥15 slam rangenet++配置
    • ¥15 有没有研究水声通信方面的帮我改俩matlab代码
    • ¥15 对于相关问题的求解与代码
    • ¥15 ubuntu子系统密码忘记
    • ¥15 信号傅里叶变换在matlab上遇到的小问题请求帮助
    • ¥15 保护模式-系统加载-段寄存器
    • ¥15 电脑桌面设定一个区域禁止鼠标操作
    • ¥15 求NPF226060磁芯的详细资料
    • ¥15 使用R语言marginaleffects包进行边际效应图绘制