use of com.scalar.db.service.StorageFactory in project scalardb by scalar-labs.
the class MultiStorageIntegrationTest method initStorage1AndAdmin1.
private void initStorage1AndAdmin1() throws ExecutionException {
StorageFactory factory = StorageFactory.create(MultiStorageEnv.getPropertiesForStorage1());
admin1 = factory.getAdmin();
createTables(admin1);
storage1 = factory.getStorage();
}
use of com.scalar.db.service.StorageFactory in project scalardb by scalar-labs.
the class MultiStorageIntegrationTest method initStorage2AndAdmin2.
private void initStorage2AndAdmin2() throws ExecutionException {
StorageFactory factory = StorageFactory.create(MultiStorageEnv.getPropertiesForStorage2());
admin2 = factory.getAdmin();
createTables(admin2);
storage2 = factory.getStorage();
}
use of com.scalar.db.service.StorageFactory in project scalardb by scalar-labs.
the class MultiStorageAdminIntegrationTest method initAdmin1.
private void initAdmin1() throws ExecutionException {
StorageFactory factory = StorageFactory.create(MultiStorageEnv.getPropertiesForStorage1());
admin1 = factory.getAdmin();
// create tables
admin1.createNamespace(NAMESPACE1, true);
TableMetadata tableMetadata = TableMetadata.newBuilder().addPartitionKey(COL_NAME1).addClusteringKey(COL_NAME4).addColumn(COL_NAME1, DataType.INT).addColumn(COL_NAME2, DataType.TEXT).addColumn(COL_NAME3, DataType.INT).addColumn(COL_NAME4, DataType.INT).addColumn(COL_NAME5, DataType.BOOLEAN).build();
for (String table : Arrays.asList(TABLE1, TABLE2, TABLE3)) {
admin1.createTable(NAMESPACE1, table, tableMetadata, true);
}
admin1.createNamespace(NAMESPACE2, true);
admin1.createTable(NAMESPACE2, TABLE1, tableMetadata, true);
}
use of com.scalar.db.service.StorageFactory in project scalardb by scalar-labs.
the class MultiStorageAdminIntegrationTest method initAdmin2.
private void initAdmin2() throws ExecutionException {
StorageFactory factory = StorageFactory.create(MultiStorageEnv.getPropertiesForStorage2());
admin2 = factory.getAdmin();
// create tables
admin2.createNamespace(NAMESPACE1, true);
TableMetadata tableMetadata = TableMetadata.newBuilder().addColumn(COL_NAME1, DataType.TEXT).addColumn(COL_NAME2, DataType.INT).addColumn(COL_NAME3, DataType.BOOLEAN).addPartitionKey(COL_NAME1).build();
for (String table : Arrays.asList(TABLE1, TABLE2, TABLE3)) {
admin2.createTable(NAMESPACE1, table, tableMetadata, true);
}
admin2.createNamespace(NAMESPACE2, true);
admin2.createTable(NAMESPACE2, TABLE1, tableMetadata, true);
}
use of com.scalar.db.service.StorageFactory in project scalardb by scalar-labs.
the class DistributedStorageMultipleClusteringKeyScanIntegrationTestBase method beforeAll.
@BeforeAll
public void beforeAll() throws Exception {
initialize();
StorageFactory factory = StorageFactory.create(TestUtils.addSuffix(getProperties(), TEST_NAME));
admin = factory.getAdmin();
namespaceBaseName = getNamespaceBaseName();
clusteringKeyTypes = getClusteringKeyTypes();
executorService = Executors.newFixedThreadPool(getThreadNum());
createTables();
storage = factory.getStorage();
seed = System.currentTimeMillis();
System.out.println("The seed used in the multiple clustering key scan integration test is " + seed);
}
Aggregations