Search in sources :

Example 1 with StorageRuntimeException

use of org.apache.bookkeeper.stream.storage.exceptions.StorageRuntimeException in project bookkeeper by apache.

the class HelixStorageContainerManager method doStart.

@Override
protected void doStart() {
    // create the controller
    try (HelixStorageController controller = new HelixStorageController(zkServers)) {
        controller.addNode(clusterName, endpoint, endpointName);
    }
    StateMachineEngine sme = this.manager.getStateMachineEngine();
    StateModelFactory<StateModel> smFactory = new WriteReadStateModelFactory(registry);
    sme.registerStateModelFactory(WriteReadSMD.NAME, smFactory);
    try {
        manager.connect();
        manager.addExternalViewChangeListener(rtProvider);
    } catch (Exception e) {
        throw new StorageRuntimeException(e);
    }
}
Also used : StateMachineEngine(org.apache.helix.participant.StateMachineEngine) StateModel(org.apache.helix.participant.statemachine.StateModel) StorageRuntimeException(org.apache.bookkeeper.stream.storage.exceptions.StorageRuntimeException) IOException(java.io.IOException) StorageRuntimeException(org.apache.bookkeeper.stream.storage.exceptions.StorageRuntimeException)

Aggregations

IOException (java.io.IOException)1 StorageRuntimeException (org.apache.bookkeeper.stream.storage.exceptions.StorageRuntimeException)1 StateMachineEngine (org.apache.helix.participant.StateMachineEngine)1 StateModel (org.apache.helix.participant.statemachine.StateModel)1