use of io.cdap.cdap.data2.dataset2.lib.table.inmemory.InMemoryMetricsTableDefinition in project cdap by caskdata.
the class InMemoryMetricsTableModule method register.
@Override
public void register(DatasetDefinitionRegistry registry) {
registry.add(new InMemoryMetricsTableDefinition(InMemoryMetricsTable.class.getName()));
registry.add(new InMemoryMetricsTableDefinition(MetricsTable.class.getName()));
}
use of io.cdap.cdap.data2.dataset2.lib.table.inmemory.InMemoryMetricsTableDefinition in project cdap by caskdata.
the class SystemDatasetRuntimeModule method getInMemoryModules.
@Override
public Module getInMemoryModules() {
return new AbstractModule() {
@Override
protected void configure() {
MapBinder<String, DatasetModule> mapBinder = MapBinder.newMapBinder(binder(), String.class, DatasetModule.class, Constants.Dataset.Manager.DefaultDatasetModules.class);
// NOTE: order is important due to dependencies between modules
mapBinder.addBinding("orderedTable-memory").toInstance(new InMemoryTableModule());
mapBinder.addBinding("metricsTable-memory").toInstance(new InMemoryMetricsTableModule());
bindDefaultModules(mapBinder);
bind(String.class).annotatedWith(Names.named(Constants.Dataset.TABLE_TYPE)).toInstance("table");
bind(DatasetDefinition.class).annotatedWith(Names.named(Constants.Dataset.TABLE_TYPE)).to(InMemoryTableDefinition.class);
bind(String.class).annotatedWith(Names.named(Constants.Dataset.TABLE_TYPE_NO_TX)).toInstance("table-no-tx");
bind(DatasetDefinition.class).annotatedWith(Names.named(Constants.Dataset.TABLE_TYPE_NO_TX)).to(InMemoryMetricsTableDefinition.class);
// Direct binding for the Metrics table definition such that metrics system doesn't need to go through
// dataset service to get metrics table.
bind(new TypeLiteral<DatasetDefinition<MetricsTable, DatasetAdmin>>() {
}).toInstance(new InMemoryMetricsTableDefinition(MetricsTable.class.getName()));
}
};
}
use of io.cdap.cdap.data2.dataset2.lib.table.inmemory.InMemoryMetricsTableDefinition in project cdap by caskdata.
the class InMemoryMetricsTableModule method register.
@Override
public void register(DatasetDefinitionRegistry registry) {
registry.add(new InMemoryMetricsTableDefinition(InMemoryMetricsTable.class.getName()));
registry.add(new InMemoryMetricsTableDefinition(MetricsTable.class.getName()));
}
use of io.cdap.cdap.data2.dataset2.lib.table.inmemory.InMemoryMetricsTableDefinition in project cdap by cdapio.
the class InMemoryMetricsTableModule method register.
@Override
public void register(DatasetDefinitionRegistry registry) {
registry.add(new InMemoryMetricsTableDefinition(InMemoryMetricsTable.class.getName()));
registry.add(new InMemoryMetricsTableDefinition(MetricsTable.class.getName()));
}
use of io.cdap.cdap.data2.dataset2.lib.table.inmemory.InMemoryMetricsTableDefinition in project cdap by cdapio.
the class SystemDatasetRuntimeModule method getInMemoryModules.
@Override
public Module getInMemoryModules() {
return new AbstractModule() {
@Override
protected void configure() {
MapBinder<String, DatasetModule> mapBinder = MapBinder.newMapBinder(binder(), String.class, DatasetModule.class, Constants.Dataset.Manager.DefaultDatasetModules.class);
// NOTE: order is important due to dependencies between modules
mapBinder.addBinding("orderedTable-memory").toInstance(new InMemoryTableModule());
mapBinder.addBinding("metricsTable-memory").toInstance(new InMemoryMetricsTableModule());
bindDefaultModules(mapBinder);
bind(String.class).annotatedWith(Names.named(Constants.Dataset.TABLE_TYPE)).toInstance("table");
bind(DatasetDefinition.class).annotatedWith(Names.named(Constants.Dataset.TABLE_TYPE)).to(InMemoryTableDefinition.class);
bind(String.class).annotatedWith(Names.named(Constants.Dataset.TABLE_TYPE_NO_TX)).toInstance("table-no-tx");
bind(DatasetDefinition.class).annotatedWith(Names.named(Constants.Dataset.TABLE_TYPE_NO_TX)).to(InMemoryMetricsTableDefinition.class);
// Direct binding for the Metrics table definition such that metrics system doesn't need to go through
// dataset service to get metrics table.
bind(new TypeLiteral<DatasetDefinition<MetricsTable, DatasetAdmin>>() {
}).toInstance(new InMemoryMetricsTableDefinition(MetricsTable.class.getName()));
}
};
}
Aggregations