[ 
https://issues.apache.org/jira/browse/FLUME-1190?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=13270151#comment-13270151
 ] 

Mubarak Seyed commented on FLUME-1190:
--------------------------------------

Configuration for file channel type

{code}
agent.sources = avro-source1
agent.sinks = hdfs-sink1
agent.channels = file-channel-1

#sources
agent.sources.avro-source1.channels = file-channel-1
agent.sources.avro-source1.type = avro
agent.sources.avro-source1.bind = 0.0.0.0
agent.sources.avro-source1.port = 9090

#channels
agent.channels.file-channel-1.type = file
agent.channels.file-channel-1.capacity = 100000
agent.channels.file-channel-1.checkpointDir = 
<location_of_checkpoint_dir>/checkpoint1 
agent.channels.file-channel-1.dataDirs = <location_of_data_dirs>/data1

#sinks
agent.sinks.hdfs-sink1.channel = file-channel-1
agent.sinks.hdfs-sink1.type = hdfs
agent.sinks.hdfs-sink1.hdfs.batchSize = 1000
agent.sinks.hdfs-sink1.hdfs.fileType = DataStream
agent.sinks.hdfs-sink1.hdfs.rollCount = 0
agent.sinks.hdfs-sink1.hdfs.rollInterval = 0
agent.sinks.hdfs-sink1.serializer = avro_event
agent.sinks.hdfs-sink1.serializer.compressionCodec = snappy
agent.sinks.hdfs-sink1.hdfs.path = hdfs://NN/logs/category1/%m%d%Y/%H
{code}
                
> DurableFileChannel requires FILE enum definition in ChannelConfigurationType
> ----------------------------------------------------------------------------
>
>                 Key: FLUME-1190
>                 URL: https://issues.apache.org/jira/browse/FLUME-1190
>             Project: Flume
>          Issue Type: Bug
>          Components: Channel
>            Reporter: Mubarak Seyed
>              Labels: newbie
>         Attachments: FLUME-trunk-1190.patch
>
>
> I tried to test FLUME-1085 from trunk, file type channel creation failed as 
> FILE type enum is missing and it throws
> {code}
> 2012-05-08 01:55:48,882 ERROR conf.ComponentConfigurationFactory: No enum 
> const class 
> org.apache.flume.conf.channel.ChannelConfiguration$ChannelConfigurationType.FILE
> java.lang.IllegalArgumentException: No enum const class 
> org.apache.flume.conf.channel.ChannelConfiguration$ChannelConfigurationType.FILE
>         at java.lang.Enum.valueOf(Enum.java:196)
>         at 
> org.apache.flume.conf.channel.ChannelConfiguration$ChannelConfigurationType.valueOf(ChannelConfiguration.java:35)
>         at 
> org.apache.flume.conf.ComponentConfigurationFactory.create(ComponentConfigurationFactory.java:61)
>         at 
> org.apache.flume.conf.FlumeConfiguration$AgentConfiguration.validateChannels(FlumeConfiguration.java:427)
>         at 
> org.apache.flume.conf.FlumeConfiguration$AgentConfiguration.isValid(FlumeConfiguration.java:295)
>         at 
> org.apache.flume.conf.FlumeConfiguration$AgentConfiguration.access$000(FlumeConfiguration.java:195)
>         at 
> org.apache.flume.conf.FlumeConfiguration.validateConfiguration(FlumeConfiguration.java:109)
>         at 
> org.apache.flume.conf.FlumeConfiguration.<init>(FlumeConfiguration.java:91)
>         at 
> org.apache.flume.conf.properties.PropertiesFileConfigurationProvider.load(PropertiesFileConfigurationProvider.java:215)
> {code}
> The proposed fix would be
> {code}
> public enum ChannelConfigurationType {
>     ..    
>     FILE("org.apache.flume.conf.channel.FileChannelConfiguration"),
>     ..
> {code}

--
This message is automatically generated by JIRA.
If you think it was sent incorrectly, please contact your JIRA administrators: 
https://issues.apache.org/jira/secure/ContactAdministrators!default.jspa
For more information on JIRA, see: http://www.atlassian.com/software/jira

        

Reply via email to