use of com.scalar.db.service.StorageFactory in project scalardb by scalar-labs.
the class SchemaLoaderIntegrationTestBase method beforeAll.
@BeforeAll
public void beforeAll() throws Exception {
initialize();
Properties properties = getProperties();
namespace1 = getNamespace1();
namespace2 = getNamespace2();
writeConfigFile(properties);
Map<String, Object> schemaJsonMap = getSchemaJsonMap();
writeSchemaFile(schemaJsonMap);
StorageFactory factory = StorageFactory.create(properties);
admin = factory.getAdmin();
consensusCommitAdmin = new ConsensusCommitAdmin(admin, new DatabaseConfig(properties));
}
use of com.scalar.db.service.StorageFactory in project scalardb by scalar-labs.
the class ConsensusCommitSpecificIntegrationTestBase method beforeAll.
@BeforeAll
public void beforeAll() throws Exception {
initialize();
Properties properties = TestUtils.addSuffix(getProperties(), TEST_NAME);
StorageFactory factory = StorageFactory.create(properties);
admin = factory.getAdmin();
databaseConfig = new DatabaseConfig(properties);
consensusCommitConfig = new ConsensusCommitConfig(databaseConfig);
consensusCommitAdmin = new ConsensusCommitAdmin(admin, consensusCommitConfig);
namespace1 = getNamespace1();
namespace2 = getNamespace2();
createTables();
originalStorage = factory.getStorage();
parallelExecutor = new ParallelExecutor(consensusCommitConfig);
}
use of com.scalar.db.service.StorageFactory in project scalardb by scalar-labs.
the class TwoPhaseConsensusCommitSpecificIntegrationTestBase method beforeAll.
@BeforeAll
public void beforeAll() throws Exception {
initialize();
Properties properties = TestUtils.addSuffix(getProperties(), TEST_NAME);
namespace = getNamespace();
StorageFactory factory = StorageFactory.create(properties);
admin = factory.getAdmin();
DatabaseConfig databaseConfig = new DatabaseConfig(properties);
ConsensusCommitConfig consensusCommitConfig = new ConsensusCommitConfig(databaseConfig);
consensusCommitAdmin = new ConsensusCommitAdmin(admin, consensusCommitConfig);
createTables();
storage = factory.getStorage();
initManagerAndCoordinator(databaseConfig, consensusCommitConfig);
}
use of com.scalar.db.service.StorageFactory in project scalardb by scalar-labs.
the class AdminIntegrationTestBase method setUp.
@Before
public void setUp() throws Exception {
if (!initialized) {
initialize();
StorageFactory factory = new StorageFactory(TestUtils.addSuffix(getDatabaseConfig(), TEST_NAME));
admin = factory.getAdmin();
namespace1 = getNamespace1();
namespace2 = getNamespace2();
namespace3 = getNamespace3();
createTables();
storage = factory.getStorage();
initialized = true;
}
}
use of com.scalar.db.service.StorageFactory in project scalardb by scalar-labs.
the class StorageColumnValueIntegrationTestBase method setUp.
@Before
public void setUp() throws Exception {
if (!initialized) {
StorageFactory factory = new StorageFactory(TestUtils.addSuffix(getDatabaseConfig(), TEST_NAME));
admin = factory.getAdmin();
namespace = getNamespace();
createTable();
storage = factory.getStorage();
seed = System.currentTimeMillis();
System.out.println("The seed used in the column value integration test is " + seed);
initialized = true;
}
admin.truncateTable(namespace, TABLE);
}
Aggregations