Package org.apache.helix

Examples of org.apache.helix.ExternalCommand


        timeoutValue = Long.parseLong(timeout);
      } catch (NumberFormatException e) {
        // OK to use 0
      }
    }
    ExternalCommand externalCmd = ExternalCommand.executeWithTimeout(new File(workingDir),
        cmdValue, timeoutValue, args);
   
    // debug
    // System.out.println("command output:\n" + externalCmd.getStringOutput());
   
    int exitValue = externalCmd.exitValue();
    _logger.info("Executed command: " + cmd + ", exitValue: " + exitValue);
   
    // if exit-value != 0, transition fails
    if (exitValue != 0) {
      throw new Exception("fail to execute command: " + cmd + ", exitValue: " + exitValue
          + ", error: " + externalCmd.getStringError());
    }
   
    // monitor pid if pidFile exists
    if (pidFile == null) {
      // no pid to monitor
View Full Code Here

TOP

Related Classes of org.apache.helix.ExternalCommand

Copyright © 2018 www.massapicom. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.