Search in sources :

Example 1 with SysClusterExpressionModule

use of io.crate.operation.reference.sys.cluster.SysClusterExpressionModule in project crate by crate.

the class TestGlobalSysExpressions method prepare.

@Before
public void prepare() throws Exception {
    Injector injector = new ModulesBuilder().add(new SysClusterExpressionModule()).add((Module) binder -> {
        binder.bind(ClusterService.class).toInstance(new NoopClusterService());
        binder.bind(Settings.class).toInstance(Settings.EMPTY);
        binder.bind(ClusterName.class).toInstance(new ClusterName("cluster"));
        binder.bind(ClusterReferenceResolver.class).asEagerSingleton();
    }).createInjector();
    resolver = injector.getInstance(ClusterReferenceResolver.class);
}
Also used : NoopClusterService(org.elasticsearch.test.cluster.NoopClusterService) ClusterService(org.elasticsearch.cluster.ClusterService) SysClusterExpressionModule(io.crate.operation.reference.sys.cluster.SysClusterExpressionModule) Injector(org.elasticsearch.common.inject.Injector) ClusterName(org.elasticsearch.cluster.ClusterName) ModulesBuilder(org.elasticsearch.common.inject.ModulesBuilder) ClusterReferenceResolver(io.crate.metadata.ClusterReferenceResolver) Module(org.elasticsearch.common.inject.Module) SysClusterExpressionModule(io.crate.operation.reference.sys.cluster.SysClusterExpressionModule) NoopClusterService(org.elasticsearch.test.cluster.NoopClusterService) CrateSettings(io.crate.metadata.settings.CrateSettings) Settings(org.elasticsearch.common.settings.Settings) Before(org.junit.Before)

Example 2 with SysClusterExpressionModule

use of io.crate.operation.reference.sys.cluster.SysClusterExpressionModule 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

SysClusterExpressionModule (io.crate.operation.reference.sys.cluster.SysClusterExpressionModule)2 Module (org.elasticsearch.common.inject.Module)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 ClusterReferenceResolver (io.crate.metadata.ClusterReferenceResolver)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 CrateSettings (io.crate.metadata.settings.CrateSettings)1 MetaDataSysModule (io.crate.metadata.sys.MetaDataSysModule)1 MonitorModule (io.crate.monitor.MonitorModule)1 AggregationImplModule (io.crate.operation.aggregation.impl.AggregationImplModule)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