Sha256: 4330bfc56650ee7467de6067f03112e0a9af114b806ad2095cee17bf071d012f
Contents?: true
Size: 1.96 KB
Versions: 16
Compression:
Stored size: 1.96 KB
Contents
package org.embulk.exec; import org.slf4j.ILoggerFactory; import com.google.common.base.Preconditions; import com.google.inject.Module; import com.google.inject.name.Names; import com.google.inject.Binder; import com.google.inject.Scopes; import com.fasterxml.jackson.module.guice.ObjectMapperModule; import com.fasterxml.jackson.datatype.guava.GuavaModule; import com.fasterxml.jackson.datatype.joda.JodaModule; import org.embulk.config.ModelManager; import org.embulk.spi.time.DateTimeZoneSerDe; import org.embulk.spi.time.TimestampSerDe; import org.embulk.spi.ParserPlugin; import org.embulk.spi.ExecutorPlugin; import org.embulk.spi.BufferAllocator; import org.embulk.spi.util.CharsetSerDe; import static org.embulk.plugin.InjectedPluginSource.registerPluginTo; public class ExecModule implements Module { @Override public void configure(Binder binder) { Preconditions.checkNotNull(binder, "binder is null."); binder.bind(ILoggerFactory.class).toProvider(LoggerProvider.class); binder.bind(ModelManager.class).in(Scopes.SINGLETON); binder.bind(BufferAllocator.class).to(PooledBufferAllocator.class).in(Scopes.SINGLETON); // GuessExecutor registerPluginTo(binder, ParserPlugin.class, "system_guess", GuessExecutor.GuessParserPlugin.class); registerPluginTo(binder, ParserPlugin.class, "system_sampling", SamplingParserPlugin.class); // LocalExecutorPlugin binder.bind(LocalThreadExecutor.class).in(Scopes.SINGLETON); registerPluginTo(binder, ExecutorPlugin.class, "local", LocalExecutorPlugin.class); // serde ObjectMapperModule mapper = new ObjectMapperModule(); DateTimeZoneSerDe.configure(mapper); TimestampSerDe.configure(mapper); CharsetSerDe.configure(mapper); mapper.registerModule(new GuavaModule()); // jackson-datatype-guava mapper.registerModule(new JodaModule()); // jackson-datatype-joda mapper.configure(binder); } }
Version data entries
16 entries across 16 versions & 1 rubygems