You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@flume.apache.org by "Mike Percy (JIRA)" <ji...@apache.org> on 2013/06/23 11:23:20 UTC
[jira] [Updated] (FLUME-1405) Tools to generate configuration file
[ https://issues.apache.org/jira/browse/FLUME-1405?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]
Mike Percy updated FLUME-1405:
------------------------------
Fix Version/s: (was: v1.4.0)
Interesting patch but it's been hanging around without activity for a while. I'm going to clear v1.4.0 from the fixVersion.
> Tools to generate configuration file
> ------------------------------------
>
> Key: FLUME-1405
> URL: https://issues.apache.org/jira/browse/FLUME-1405
> Project: Flume
> Issue Type: Improvement
> Components: Configuration
> Affects Versions: v1.2.0
> Reporter: Denny Ye
> Assignee: Denny Ye
> Priority: Minor
> Attachments: FLUME-1405.patch
>
>
> If there are several flows in Flume, the configuration file may be hard to maintain. Even there is tiny difference.
> Under this condition, I would like to create configuration file with Java code. It's easy to build concrete file with loop and combination.
> Code example :
> Agent agent = new Agent().setName("agent");
>
> Source source = new Source("scribe")
> .setProperty("port", "1499")
> .setType(SourceType.OTHER,"org.apache.flume.source.scribe.ScribeSource");
>
> agent.registerSource(source);
>
> for (int i = 0; i < 5; i++) {
> Channel channel = new Channel("mc" + i)
> .setProperty("capacity", "1000000")
> .setType(ChannelType.MEMORY, null);
>
> agent.registerChannel(channel);
>
> Sink sink = new Sink("hfds" + i)
> .setType(SinkType.HDFS, null)
> .setProperty("hfds.txtEventMax", "1000")
> .setProperty("hdfs.path", "/flume_test/data" + i)
> .connectChannel(channel);
> agent.registerSink(sink);
> source.connectChannel(channel);
> }
> ConfGenerator.generateConf(agent, new File("XXXXX"));
--
This message is automatically generated by JIRA.
If you think it was sent incorrectly, please contact your JIRA administrators
For more information on JIRA, see: http://www.atlassian.com/software/jira