use of com.scalar.db.service.StorageFactory in project scalardb by scalar-labs.
the class StorageMultiplePartitionKeyIntegrationTestBase method setUp.
@Before
public void setUp() throws Exception {
if (!initialized) {
StorageFactory factory = new StorageFactory(TestUtils.addSuffix(getDatabaseConfig(), TEST_NAME));
admin = factory.getAdmin();
namespaceBaseName = getNamespaceBaseName();
partitionKeyTypes = getPartitionKeyTypes();
executorService = Executors.newFixedThreadPool(getThreadNum());
createTables();
storage = factory.getStorage();
seed = System.currentTimeMillis();
System.out.println("The seed used in the multiple partition key integration test is " + seed);
initialized = true;
}
}
use of com.scalar.db.service.StorageFactory in project scalardb by scalar-labs.
the class StorageIntegrationTestBase method setUp.
@Before
public void setUp() throws Exception {
if (!initialized) {
initialize();
StorageFactory factory = new StorageFactory(getDatabaseConfig());
admin = factory.getAdmin();
namespace = getNamespace();
createTable();
storage = factory.getStorage();
initialized = true;
}
truncateTable();
storage.with(namespace, TABLE);
}
use of com.scalar.db.service.StorageFactory in project scalardb by scalar-labs.
the class StorageSecondaryIndexIntegrationTestBase method setUp.
@Before
public void setUp() throws Exception {
if (!initialized) {
StorageFactory factory = new StorageFactory(TestUtils.addSuffix(getDatabaseConfig(), TEST_NAME));
admin = factory.getAdmin();
namespace = getNamespace();
secondaryIndexTypes = getSecondaryIndexTypes();
createTables();
storage = factory.getStorage();
seed = System.currentTimeMillis();
System.out.println("The seed used in the secondary index integration test is " + seed);
initialized = true;
}
}
use of com.scalar.db.service.StorageFactory in project scalardb by scalar-labs.
the class SchemaLoaderIntegrationTestBase method setUp.
@Before
public void setUp() throws Exception {
if (!initialized) {
initialize();
DatabaseConfig config = getDatabaseConfig();
namespace1 = getNamespace1();
namespace2 = getNamespace2();
writeConfigFile(config.getProperties());
Map<String, Object> schemaJsonMap = getSchemaJsonMap();
writeSchemaFile(schemaJsonMap);
StorageFactory factory = new StorageFactory(config);
admin = factory.getAdmin();
consensusCommitAdmin = new ConsensusCommitAdmin(admin, new ConsensusCommitConfig(config.getProperties()));
initialized = true;
}
dropTablesIfExist();
}
use of com.scalar.db.service.StorageFactory in project scalardb by scalar-labs.
the class StorageSinglePartitionKeyIntegrationTestBase method setUp.
@Before
public void setUp() throws Exception {
if (!initialized) {
StorageFactory factory = new StorageFactory(TestUtils.addSuffix(getDatabaseConfig(), TEST_NAME));
admin = factory.getAdmin();
namespace = getNamespace();
partitionKeyTypes = getPartitionKeyTypes();
createTables();
storage = factory.getStorage();
seed = System.currentTimeMillis();
System.out.println("The seed used in the single partition key integration test is " + seed);
initialized = true;
}
}
Aggregations