Search in sources :

Example 1 with AggregationImplModule

use of io.crate.operation.aggregation.impl.AggregationImplModule in project crate by crate.

the class GroupingBytesRefCollectorBenchmark method createGroupingCollector.

@Setup
public void createGroupingCollector() {
    Functions functions = new ModulesBuilder().add(new AggregationImplModule()).createInjector().getInstance(Functions.class);
    groupByMinCollector = createGroupByMinBytesRefCollector(functions);
    List<BytesRef> keys = new ArrayList<>(Locale.getISOCountries().length);
    for (String s : Locale.getISOCountries()) {
        keys.add(new BytesRef(s));
    }
    rows = new ArrayList<>(20_000_000);
    for (int i = 0; i < 20_000_000; i++) {
        rows.add(new Row1(keys.get(i % keys.size())));
    }
}
Also used : ArrayList(java.util.ArrayList) Functions(io.crate.metadata.Functions) ModulesBuilder(org.elasticsearch.common.inject.ModulesBuilder) BytesRef(org.apache.lucene.util.BytesRef) AggregationImplModule(io.crate.operation.aggregation.impl.AggregationImplModule)

Example 2 with AggregationImplModule

use of io.crate.operation.aggregation.impl.AggregationImplModule in project crate by crate.

the class GroupingIntegerCollectorBenchmark method createGroupingCollector.

@Setup
public void createGroupingCollector() {
    Functions functions = new ModulesBuilder().add(new AggregationImplModule()).createInjector().getInstance(Functions.class);
    groupBySumCollector = createGroupBySumCollector(functions);
    rows = new ArrayList<>(20_000_000);
    for (int i = 0; i < 20_000_000; i++) {
        rows.add(new Row1(i % 200));
    }
}
Also used : Functions(io.crate.metadata.Functions) ModulesBuilder(org.elasticsearch.common.inject.ModulesBuilder) AggregationImplModule(io.crate.operation.aggregation.impl.AggregationImplModule)

Example 3 with AggregationImplModule

use of io.crate.operation.aggregation.impl.AggregationImplModule in project crate by crate.

the class SQLPlugin method nodeModules.

@Override
public Collection<Module> nodeModules() {
    Collection<Module> modules = newArrayList();
    modules.add(new SQLModule());
    modules.add(new CircuitBreakerModule());
    modules.add(new TransportExecutorModule());
    modules.add(new JobModule());
    modules.add(new CollectOperationModule());
    modules.add(new FileCollectModule());
    modules.add(new MetaDataModule());
    modules.add(new MetaDataSysModule());
    modules.add(new MetaDataBlobModule());
    modules.add(new PgCatalogModule());
    modules.add(new MetaDataInformationModule());
    modules.add(new OperatorModule());
    modules.add(new PredicateModule());
    modules.add(new MonitorModule(settings));
    modules.add(new SysClusterExpressionModule());
    modules.add(new SysNodeExpressionModule());
    modules.add(new AggregationImplModule());
    modules.add(new ScalarFunctionModule());
    modules.add(new TableFunctionModule());
    modules.add(new BulkModule());
    modules.add(new SysChecksModule());
    modules.add(new SysNodeChecksModule());
    modules.add(new RepositorySettingsModule());
    modules.add(new SysRepositoriesModule());
    return modules;
}
Also used : FileCollectModule(io.crate.operation.collect.files.FileCollectModule) TableFunctionModule(io.crate.operation.tablefunctions.TableFunctionModule) SysClusterExpressionModule(io.crate.operation.reference.sys.cluster.SysClusterExpressionModule) MetaDataModule(io.crate.metadata.MetaDataModule) CircuitBreakerModule(io.crate.breaker.CircuitBreakerModule) MetaDataSysModule(io.crate.metadata.sys.MetaDataSysModule) SysNodeExpressionModule(io.crate.operation.reference.sys.node.local.SysNodeExpressionModule) AggregationImplModule(io.crate.operation.aggregation.impl.AggregationImplModule) JobModule(io.crate.jobs.JobModule) CollectOperationModule(io.crate.operation.collect.CollectOperationModule) TransportExecutorModule(io.crate.executor.transport.TransportExecutorModule) SysRepositoriesModule(io.crate.operation.reference.sys.repositories.SysRepositoriesModule) SysNodeChecksModule(io.crate.operation.reference.sys.check.node.SysNodeChecksModule) BulkModule(org.elasticsearch.action.bulk.BulkModule) MetaDataInformationModule(io.crate.metadata.information.MetaDataInformationModule) MetaDataBlobModule(io.crate.metadata.blob.MetaDataBlobModule) SysChecksModule(io.crate.operation.reference.sys.check.SysChecksModule) RepositorySettingsModule(io.crate.analyze.repositories.RepositorySettingsModule) MonitorModule(io.crate.monitor.MonitorModule) OperatorModule(io.crate.operation.operator.OperatorModule) PredicateModule(io.crate.operation.predicate.PredicateModule) RestModule(org.elasticsearch.rest.RestModule) BulkModule(org.elasticsearch.action.bulk.BulkModule) SysRepositoriesModule(io.crate.operation.reference.sys.repositories.SysRepositoriesModule) SysChecksModule(io.crate.operation.reference.sys.check.SysChecksModule) PredicateModule(io.crate.operation.predicate.PredicateModule) SysNodeChecksModule(io.crate.operation.reference.sys.check.node.SysNodeChecksModule) ClusterModule(org.elasticsearch.cluster.ClusterModule) MetaDataInformationModule(io.crate.metadata.information.MetaDataInformationModule) MetaDataBlobModule(io.crate.metadata.blob.MetaDataBlobModule) AggregationImplModule(io.crate.operation.aggregation.impl.AggregationImplModule) Module(org.elasticsearch.common.inject.Module) PgCatalogModule(io.crate.metadata.pg_catalog.PgCatalogModule) MetaDataSysModule(io.crate.metadata.sys.MetaDataSysModule) MetaDataModule(io.crate.metadata.MetaDataModule) IndicesModule(org.elasticsearch.indices.IndicesModule) FileCollectModule(io.crate.operation.collect.files.FileCollectModule) CircuitBreakerModule(io.crate.breaker.CircuitBreakerModule) SysNodeExpressionModule(io.crate.operation.reference.sys.node.local.SysNodeExpressionModule) TableFunctionModule(io.crate.operation.tablefunctions.TableFunctionModule) TransportExecutorModule(io.crate.executor.transport.TransportExecutorModule) MonitorModule(io.crate.monitor.MonitorModule) SysClusterExpressionModule(io.crate.operation.reference.sys.cluster.SysClusterExpressionModule) RepositorySettingsModule(io.crate.analyze.repositories.RepositorySettingsModule) JobModule(io.crate.jobs.JobModule) ScalarFunctionModule(io.crate.operation.scalar.ScalarFunctionModule) CrateIndexModule(io.crate.lucene.CrateIndexModule) OperatorModule(io.crate.operation.operator.OperatorModule) CollectOperationModule(io.crate.operation.collect.CollectOperationModule) ScalarFunctionModule(io.crate.operation.scalar.ScalarFunctionModule) PgCatalogModule(io.crate.metadata.pg_catalog.PgCatalogModule)

Aggregations

AggregationImplModule (io.crate.operation.aggregation.impl.AggregationImplModule)3 Functions (io.crate.metadata.Functions)2 ModulesBuilder (org.elasticsearch.common.inject.ModulesBuilder)2 RepositorySettingsModule (io.crate.analyze.repositories.RepositorySettingsModule)1 CircuitBreakerModule (io.crate.breaker.CircuitBreakerModule)1 TransportExecutorModule (io.crate.executor.transport.TransportExecutorModule)1 JobModule (io.crate.jobs.JobModule)1 CrateIndexModule (io.crate.lucene.CrateIndexModule)1 MetaDataModule (io.crate.metadata.MetaDataModule)1 MetaDataBlobModule (io.crate.metadata.blob.MetaDataBlobModule)1 MetaDataInformationModule (io.crate.metadata.information.MetaDataInformationModule)1 PgCatalogModule (io.crate.metadata.pg_catalog.PgCatalogModule)1 MetaDataSysModule (io.crate.metadata.sys.MetaDataSysModule)1 MonitorModule (io.crate.monitor.MonitorModule)1 CollectOperationModule (io.crate.operation.collect.CollectOperationModule)1 FileCollectModule (io.crate.operation.collect.files.FileCollectModule)1 OperatorModule (io.crate.operation.operator.OperatorModule)1 PredicateModule (io.crate.operation.predicate.PredicateModule)1 SysChecksModule (io.crate.operation.reference.sys.check.SysChecksModule)1 SysNodeChecksModule (io.crate.operation.reference.sys.check.node.SysNodeChecksModule)1