private void start() {
        System.out.print("Starting " + DISPLAY_NAME + "...");
        System.out.flush();

        // Consume configuration from Grakn config file into Cassandra config file
        initialiseConfig();

        Future<Executor.Result> result = daemonExecutor.executeAsync(storageCommand(), graknHome.toFile());

        LocalDateTime timeout = LocalDateTime.now().plusSeconds(STORAGE_STARTUP_TIMEOUT_SECOND);

        while (LocalDateTime.now().isBefore(timeout) && !result.isDone()) {
            System.out.print(".");
            System.out.flush();

            if (storageStatus().equals("running")) {
                System.out.println("SUCCESS");
                return;
            }

            try {
                Thread.sleep(WAIT_INTERVAL_SECOND * 1000);
            } catch (InterruptedException e) {
                Thread.currentThread().interrupt();
            }
        }

        System.out.println("FAILED!");
        System.err.println("Unable to start " + DISPLAY_NAME + ".");
        try {
            String errorMessage = "Process exited with code '" + result.get().exitCode() + "': '" + result.get().stderr() + "'";
            System.err.println(errorMessage);
            throw new GraknDaemonException(errorMessage);
        } catch (InterruptedException | ExecutionException e) {
            throw new GraknDaemonException(e.getMessage(), e);
        }
    }
private void start ( ) { System . out . print ( "Starting " + DISPLAY_NAME + "..." ) ; System . out . flush ( ) ; initialiseConfig ( ) ; Future < Executor . Result > result = daemonExecutor . executeAsync ( storageCommand ( ) , graknHome . toFile ( ) ) ; LocalDateTime timeout = LocalDateTime . now ( ) . plusSeconds ( STORAGE_STARTUP_TIMEOUT_SECOND ) ; while ( LocalDateTime . now ( ) . isBefore ( timeout ) && ! result . isDone ( ) ) { System . out . print ( "." ) ; System . out . flush ( ) ; if ( storageStatus ( ) . equals ( "running" ) ) { System . out . println ( "SUCCESS" ) ; return ; } try { Thread . sleep ( WAIT_INTERVAL_SECOND * 1000 ) ; } catch ( InterruptedException e ) { Thread . currentThread ( ) . interrupt ( ) ; } } System . out . println ( "FAILED!" ) ; System . err . println ( "Unable to start " + DISPLAY_NAME + "." ) ; try { String errorMessage = "Process exited with code '" + result . get ( ) . exitCode ( ) + "': '" + result . get ( ) . stderr ( ) + "'" ; System . err . println ( errorMessage ) ; throw new GraknDaemonException ( errorMessage ) ; } catch ( InterruptedException | ExecutionException e ) { throw new GraknDaemonException ( e . getMessage ( ) , e ) ; } }
Attempt to start Storage and perform periodic polling until it is ready. The readiness check is performed with nodetool.
<p>
A {@link GraknDaemonException} will be thrown if Storage does not start after a timeout specified
in the 'WAIT_INTERVAL_SECOND' field.

@throws GraknDaemonException