Search in sources :

Example 1 with JulAppender

use of org.apache.log4j.JulAppender in project presto by prestodb.

the class AccumuloModule method configure.

@Override
public void configure(Binder binder) {
    // Add appender to Log4J root logger
    // create appender
    JulAppender appender = new JulAppender();
    appender.setLayout(new PatternLayout("%d %-5p %c - %m%n"));
    appender.setThreshold(Level.INFO);
    appender.activateOptions();
    org.apache.log4j.Logger.getRootLogger().addAppender(appender);
    binder.bind(TypeManager.class).toInstance(typeManager);
    binder.bind(AccumuloConnector.class).in(Scopes.SINGLETON);
    binder.bind(AccumuloConnectorId.class).toInstance(new AccumuloConnectorId(connectorId));
    binder.bind(AccumuloMetadata.class).in(Scopes.SINGLETON);
    binder.bind(AccumuloMetadataFactory.class).in(Scopes.SINGLETON);
    binder.bind(AccumuloClient.class).in(Scopes.SINGLETON);
    binder.bind(AccumuloSplitManager.class).in(Scopes.SINGLETON);
    binder.bind(AccumuloRecordSetProvider.class).in(Scopes.SINGLETON);
    binder.bind(AccumuloPageSinkProvider.class).in(Scopes.SINGLETON);
    binder.bind(AccumuloHandleResolver.class).in(Scopes.SINGLETON);
    binder.bind(AccumuloSessionProperties.class).in(Scopes.SINGLETON);
    binder.bind(AccumuloTableProperties.class).in(Scopes.SINGLETON);
    binder.bind(ZooKeeperMetadataManager.class).in(Scopes.SINGLETON);
    binder.bind(AccumuloTableManager.class).in(Scopes.SINGLETON);
    binder.bind(IndexLookup.class).in(Scopes.SINGLETON);
    binder.bind(ColumnCardinalityCache.class).in(Scopes.SINGLETON);
    binder.bind(Connector.class).toProvider(ConnectorProvider.class);
    configBinder(binder).bindConfig(AccumuloConfig.class);
    jsonBinder(binder).addDeserializerBinding(Type.class).to(TypeDeserializer.class);
    jsonCodecBinder(binder).bindMapJsonCodec(String.class, JsonCodec.listJsonCodec(AccumuloTable.class));
}
Also used : Connector(org.apache.accumulo.core.client.Connector) ColumnCardinalityCache(com.facebook.presto.accumulo.index.ColumnCardinalityCache) PatternLayout(org.apache.log4j.PatternLayout) AccumuloTableProperties(com.facebook.presto.accumulo.conf.AccumuloTableProperties) IndexLookup(com.facebook.presto.accumulo.index.IndexLookup) AccumuloTable(com.facebook.presto.accumulo.metadata.AccumuloTable) AccumuloPageSinkProvider(com.facebook.presto.accumulo.io.AccumuloPageSinkProvider) Type(com.facebook.presto.common.type.Type) AccumuloSessionProperties(com.facebook.presto.accumulo.conf.AccumuloSessionProperties) ZooKeeperMetadataManager(com.facebook.presto.accumulo.metadata.ZooKeeperMetadataManager) TypeManager(com.facebook.presto.common.type.TypeManager) JulAppender(org.apache.log4j.JulAppender) AccumuloRecordSetProvider(com.facebook.presto.accumulo.io.AccumuloRecordSetProvider)

Aggregations

AccumuloSessionProperties (com.facebook.presto.accumulo.conf.AccumuloSessionProperties)1 AccumuloTableProperties (com.facebook.presto.accumulo.conf.AccumuloTableProperties)1 ColumnCardinalityCache (com.facebook.presto.accumulo.index.ColumnCardinalityCache)1 IndexLookup (com.facebook.presto.accumulo.index.IndexLookup)1 AccumuloPageSinkProvider (com.facebook.presto.accumulo.io.AccumuloPageSinkProvider)1 AccumuloRecordSetProvider (com.facebook.presto.accumulo.io.AccumuloRecordSetProvider)1 AccumuloTable (com.facebook.presto.accumulo.metadata.AccumuloTable)1 ZooKeeperMetadataManager (com.facebook.presto.accumulo.metadata.ZooKeeperMetadataManager)1 Type (com.facebook.presto.common.type.Type)1 TypeManager (com.facebook.presto.common.type.TypeManager)1 Connector (org.apache.accumulo.core.client.Connector)1 JulAppender (org.apache.log4j.JulAppender)1 PatternLayout (org.apache.log4j.PatternLayout)1