use of com.scalar.db.storage.rpc.GrpcConfig in project scalardb by scalar-labs.
the class TwoPhaseCommitTransactionServiceWithTwoPhaseConsensusCommitWithExtraReadIntegrationTest method setUpBeforeClass.
@BeforeClass
public static void setUpBeforeClass() throws ExecutionException, IOException {
ServerConfig serverConfig = ServerEnv.getServerConfig(Isolation.SERIALIZABLE, SerializableStrategy.EXTRA_READ);
if (serverConfig != null) {
server = new ScalarDbServer(serverConfig);
server.start();
}
GrpcConfig grpcConfig = ServerEnv.getGrpcConfig();
StorageFactory factory = new StorageFactory(grpcConfig);
admin = factory.getAdmin();
consensusCommitAdmin = new ConsensusCommitAdmin(admin, new ConsensusCommitConfig(grpcConfig.getProperties()));
createTables(admin, consensusCommitAdmin);
manager = new GrpcTwoPhaseCommitTransactionManager(grpcConfig);
}
use of com.scalar.db.storage.rpc.GrpcConfig in project scalardb by scalar-labs.
the class TwoPhaseCommitTransactionServiceWithTwoPhaseConsensusCommitWithExtraWriteIntegrationTest method setUpBeforeClass.
@BeforeClass
public static void setUpBeforeClass() throws ExecutionException, IOException {
ServerConfig serverConfig = ServerEnv.getServerConfig(Isolation.SERIALIZABLE, SerializableStrategy.EXTRA_WRITE);
if (serverConfig != null) {
server = new ScalarDbServer(serverConfig);
server.start();
}
GrpcConfig grpcConfig = ServerEnv.getGrpcConfig();
StorageFactory factory = new StorageFactory(grpcConfig);
admin = factory.getAdmin();
consensusCommitAdmin = new ConsensusCommitAdmin(admin, new ConsensusCommitConfig(grpcConfig.getProperties()));
createTables(admin, consensusCommitAdmin);
manager = new GrpcTwoPhaseCommitTransactionManager(grpcConfig);
}
use of com.scalar.db.storage.rpc.GrpcConfig in project scalardb by scalar-labs.
the class DistributedTransactionServiceWithJdbcTransactionIntegrationTest method setUpBeforeClass.
@BeforeClass
public static void setUpBeforeClass() throws ExecutionException, IOException {
ServerConfig serverConfig = ServerEnv.getServerConfigWithJdbc();
if (serverConfig != null) {
server = new ScalarDbServer(serverConfig);
server.start();
}
GrpcConfig grpcConfig = ServerEnv.getGrpcConfig();
StorageFactory factory = new StorageFactory(grpcConfig);
admin = factory.getAdmin();
createTable();
manager = new GrpcTransactionManager(grpcConfig);
}
use of com.scalar.db.storage.rpc.GrpcConfig in project scalardb by scalar-labs.
the class DistributedTransactionServiceWithConsensusCommitIntegrationTest method setUpBeforeClass.
@BeforeClass
public static void setUpBeforeClass() throws ExecutionException, IOException {
ServerConfig serverConfig = ServerEnv.getServerConfig();
if (serverConfig != null) {
server = new ScalarDbServer(serverConfig);
server.start();
}
GrpcConfig grpcConfig = ServerEnv.getGrpcConfig();
StorageFactory factory = new StorageFactory(grpcConfig);
admin = factory.getAdmin();
consensusCommitAdmin = new ConsensusCommitAdmin(admin, new ConsensusCommitConfig(grpcConfig.getProperties()));
createTables(admin, consensusCommitAdmin);
manager = new GrpcTransactionManager(grpcConfig);
}
use of com.scalar.db.storage.rpc.GrpcConfig in project scalardb by scalar-labs.
the class DistributedTransactionServiceWithConsensusCommitWithExtraReadIntegrationTest method setUpBeforeClass.
@BeforeClass
public static void setUpBeforeClass() throws ExecutionException, IOException {
ServerConfig serverConfig = ServerEnv.getServerConfig(Isolation.SERIALIZABLE, SerializableStrategy.EXTRA_READ);
if (serverConfig != null) {
server = new ScalarDbServer(serverConfig);
server.start();
}
GrpcConfig grpcConfig = ServerEnv.getGrpcConfig();
StorageFactory factory = new StorageFactory(grpcConfig);
admin = factory.getAdmin();
consensusCommitAdmin = new ConsensusCommitAdmin(admin, new ConsensusCommitConfig(grpcConfig.getProperties()));
createTables(admin, consensusCommitAdmin);
manager = new GrpcTransactionManager(grpcConfig);
}
Aggregations