use of org.apache.gobblin.writer.AsyncDataWriter in project incubator-gobblin by apache.
the class CouchbaseWriterBuilder method build.
@Override
public DataWriter build() throws IOException {
State state = this.destination.getProperties();
Properties taskProps = state.getProperties();
Config config = ConfigUtils.propertiesToConfig(taskProps);
CouchbaseEnvironment couchbaseEnvironment = CouchbaseEnvironmentFactory.getInstance(config);
// TODO: Read config to decide whether to build a blocking writer or an async writer
// build an async couchbase writer
AsyncDataWriter couchbaseWriter = new CouchbaseWriter(couchbaseEnvironment, config);
return AsyncWriterManager.builder().asyncDataWriter(couchbaseWriter).failureAllowanceRatio(0.0).retriesEnabled(false).config(config).build();
}
Aggregations