Search in sources :

Example 6 with MarathonException

use of mesosphere.marathon.client.MarathonException in project pravega by pravega.

the class ZookeeperService method start.

@Override
public void start(final boolean wait) {
    deleteApp("/pravega/exhibitor");
    log.info("Starting Zookeeper Service: {}", getID());
    try {
        marathonClient.createApp(createZookeeperApp());
        if (wait) {
            waitUntilServiceRunning().get(10, TimeUnit.MINUTES);
        }
    } catch (MarathonException e) {
        handleMarathonException(e);
    } catch (InterruptedException | ExecutionException | TimeoutException ex) {
        throw new TestFrameworkException(InternalError, "Exception while " + "starting Zookeeper Service", ex);
    }
}
Also used : TestFrameworkException(io.pravega.test.system.framework.TestFrameworkException) MarathonException(mesosphere.marathon.client.MarathonException) ExecutionException(java.util.concurrent.ExecutionException) TimeoutException(java.util.concurrent.TimeoutException)

Example 7 with MarathonException

use of mesosphere.marathon.client.MarathonException in project pravega by pravega.

the class PravegaSegmentStoreService method start.

@Override
public void start(final boolean wait) {
    deleteApp("/pravega/segmentstore");
    log.info("Starting Pravega SegmentStore Service: {}", getID());
    try {
        marathonClient.createApp(createPravegaSegmentStoreApp());
        if (wait) {
            waitUntilServiceRunning().get(10, TimeUnit.MINUTES);
        }
    } catch (MarathonException e) {
        handleMarathonException(e);
    } catch (InterruptedException | ExecutionException | TimeoutException ex) {
        throw new TestFrameworkException(InternalError, "Exception while " + "starting Pravega SegmentStore Service", ex);
    }
}
Also used : TestFrameworkException(io.pravega.test.system.framework.TestFrameworkException) MarathonException(mesosphere.marathon.client.MarathonException) ExecutionException(java.util.concurrent.ExecutionException) TimeoutException(java.util.concurrent.TimeoutException)

Aggregations

TestFrameworkException (io.pravega.test.system.framework.TestFrameworkException)7 MarathonException (mesosphere.marathon.client.MarathonException)7 ExecutionException (java.util.concurrent.ExecutionException)5 TimeoutException (java.util.concurrent.TimeoutException)4 App (mesosphere.marathon.client.model.v2.App)1 GetAppResponse (mesosphere.marathon.client.model.v2.GetAppResponse)1 Result (mesosphere.marathon.client.model.v2.Result)1