java/test/src/main/java/org/ray/api/test/MultiLanguageClusterTest.java
/**
   * Execute an external command.
   * @return Whether the command succeeded.
   */
Execute an external command.
@return Whether the command succeeded.
Execute an external command . @return Whether the command succeeded .
private boolean executeCommand(List<String> command, int waitTimeoutSeconds) {
    try {
      LOGGER.info("Executing command: {}", String.join(" ", command));
      Process process = new ProcessBuilder(command).redirectOutput(Redirect.INHERIT)
          .redirectError(Redirect.INHERIT).start();
      process.waitFor(waitTimeoutSeconds, TimeUnit.SECONDS);
      return process.exitValue() == 0;
    } catch (Exception e) {
      throw new RuntimeException("Error executing command " + String.join(" ", command), e);
    }
  }
private boolean executeCommand ( List < String > command , int waitTimeoutSeconds ) { try { LOGGER . info ( "Executing command: {}" , String . join ( " " , command ) ) ; Process process = new ProcessBuilder ( command ) . redirectOutput ( Redirect . INHERIT ) . redirectError ( Redirect . INHERIT ) . start ( ) ; process . waitFor ( waitTimeoutSeconds , TimeUnit . SECONDS ) ; return process . exitValue ( ) == 0 ; } catch ( Exception e ) { throw new RuntimeException ( "Error executing command " + String . join ( " " , command ) , e ) ; } }
Execute an external command.
Execute an external command .