return new SourceBuilder() {
@Override
public EventSource build(Context ctx, String... argv) {
Preconditions.checkArgument(argv.length <= 3,
"usage: twitter[(name[,pw[,url]])]");
FlumeConfiguration conf = FlumeConfiguration.get();
String name = conf.getTwitterName();
if (argv.length >= 1)
name = argv[0];
String pw = conf.getTwitterPW();
if (argv.length >= 2)
pw = argv[1];
String url = conf.getTwitterURL();
if (argv.length >= 3)
url = argv[2];
return new TwitterStreamSource(url, name, pw);
}