use of io.cdap.cdap.data2.dataset2.module.lib.hbase.HBaseMetricsTableModule in project cdap by caskdata.
the class SystemDatasetRuntimeModule method getDistributedModules.
@Override
public Module getDistributedModules() {
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-hbase").toProvider(OrderedTableModuleProvider.class).in(Singleton.class);
mapBinder.addBinding("metricsTable-hbase").toInstance(new HBaseMetricsTableModule());
bindDefaultModules(mapBinder);
mapBinder.addBinding("queueDataset").toInstance(new HBaseQueueDatasetModule());
}
};
}
use of io.cdap.cdap.data2.dataset2.module.lib.hbase.HBaseMetricsTableModule in project cdap by cdapio.
the class SystemDatasetRuntimeModule method getDistributedModules.
@Override
public Module getDistributedModules() {
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-hbase").toProvider(OrderedTableModuleProvider.class).in(Singleton.class);
mapBinder.addBinding("metricsTable-hbase").toInstance(new HBaseMetricsTableModule());
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(HBaseTableDefinition.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(HBaseMetricsTableDefinition.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 HBaseMetricsTableDefinition(MetricsTable.class.getName()));
}
};
}
use of io.cdap.cdap.data2.dataset2.module.lib.hbase.HBaseMetricsTableModule in project cdap by caskdata.
the class DataMigration method createRegisteredDatasetFramework.
/**
* Sets up a {@link DatasetFramework} instance for standalone usage. NOTE: should NOT be used by applications!!!
*/
public static DatasetFramework createRegisteredDatasetFramework(Injector injector) throws DatasetManagementException, IOException {
DatasetDefinitionRegistryFactory registryFactory = injector.getInstance(DatasetDefinitionRegistryFactory.class);
DatasetFramework datasetFramework = new InMemoryDatasetFramework(registryFactory);
// TODO: this doesn't sound right. find out why its needed.
datasetFramework.addModule(NamespaceId.SYSTEM.datasetModule("table"), new HBaseTableModule());
datasetFramework.addModule(NamespaceId.SYSTEM.datasetModule("metricsTable"), new HBaseMetricsTableModule());
datasetFramework.addModule(NamespaceId.SYSTEM.datasetModule("core"), new CoreDatasetsModule());
datasetFramework.addModule(NamespaceId.SYSTEM.datasetModule("fileSet"), new FileSetModule());
return datasetFramework;
}
use of io.cdap.cdap.data2.dataset2.module.lib.hbase.HBaseMetricsTableModule in project cdap by caskdata.
the class SystemDatasetRuntimeModule method getDistributedModules.
@Override
public Module getDistributedModules() {
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-hbase").toProvider(OrderedTableModuleProvider.class).in(Singleton.class);
mapBinder.addBinding("metricsTable-hbase").toInstance(new HBaseMetricsTableModule());
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(HBaseTableDefinition.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(HBaseMetricsTableDefinition.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 HBaseMetricsTableDefinition(MetricsTable.class.getName()));
}
};
}
Aggregations