return new SinkBuilder() {
@Override
public EventSink build(Context context, String... argv) {
Preconditions.checkArgument(argv.length >= 2);
String format = argv[0];
FlumeConfiguration conf = FlumeConfiguration.get();
List<String> list = Arrays.asList(argv);
list = list.subList(1, list.size());
try {
return new FailoverChainSink(context, format, list, conf
.getFailoverInitialBackoff(), conf.getFailoverMaxSingleBackoff());
} catch (FlumeSpecException e) {
LOG.error("Bad spec or format", e);
throw new IllegalArgumentException(e);
}
}