Search in sources :

Example 1 with DefaultNamespaceAdmin

use of io.cdap.cdap.internal.app.namespace.DefaultNamespaceAdmin in project cdap by caskdata.

the class SqlDefaultStoreTest method beforeClass.

@BeforeClass
public static void beforeClass() throws Exception {
    CConfiguration cConf = CConfiguration.create();
    pg = PostgresInstantiator.createAndStart(cConf, TEMP_FOLDER.newFolder());
    Injector injector = AppFabricTestHelper.getInjector(cConf);
    StoreDefinition.createAllTables(injector.getInstance(StructuredTableAdmin.class));
    TransactionRunner transactionRunner = injector.getInstance(TransactionRunner.class);
    store = new DefaultStore(transactionRunner);
    nsStore = new DefaultNamespaceStore(transactionRunner);
    nsAdmin = new DefaultNamespaceAdmin(nsStore, store, injector.getInstance(DatasetFramework.class), injector.getInstance(MetricsCollectionService.class), injector.getProvider(NamespaceResourceDeleter.class), injector.getProvider(StorageProviderNamespaceAdmin.class), injector.getInstance(CConfiguration.class), injector.getInstance(Impersonator.class), injector.getInstance(AccessEnforcer.class), injector.getInstance(AuthenticationContext.class));
}
Also used : Injector(com.google.inject.Injector) StructuredTableAdmin(io.cdap.cdap.spi.data.StructuredTableAdmin) TransactionRunner(io.cdap.cdap.spi.data.transaction.TransactionRunner) DefaultNamespaceStore(io.cdap.cdap.store.DefaultNamespaceStore) DefaultNamespaceAdmin(io.cdap.cdap.internal.app.namespace.DefaultNamespaceAdmin) CConfiguration(io.cdap.cdap.common.conf.CConfiguration) BeforeClass(org.junit.BeforeClass)

Aggregations

Injector (com.google.inject.Injector)1 CConfiguration (io.cdap.cdap.common.conf.CConfiguration)1 DefaultNamespaceAdmin (io.cdap.cdap.internal.app.namespace.DefaultNamespaceAdmin)1 StructuredTableAdmin (io.cdap.cdap.spi.data.StructuredTableAdmin)1 TransactionRunner (io.cdap.cdap.spi.data.transaction.TransactionRunner)1 DefaultNamespaceStore (io.cdap.cdap.store.DefaultNamespaceStore)1 BeforeClass (org.junit.BeforeClass)1