private void validate(Protos.HealthCheck healthCheck) throws HealthCheckValidationException {
  if (healthCheck.hasHttp()) {
    throw new HealthCheckValidationException("The following health check contains an unsupported HTTP configuration: " + healthCheck);
  }
  if (!healthCheck.hasCommand()) {
    throw new HealthCheckValidationException("The following health check does not contain a Command: " + healthCheck);
  }
  Protos.CommandInfo commandInfo=healthCheck.getCommand();
  if (!Boolean.valueOf(commandInfo.getShell())) {
    throw new HealthCheckValidationException("Only shell based health checks are supported for health check commmand: " + commandInfo);
  }
}

private void validate ( Protos . HealthCheck healthCheck ) throws HealthCheckValidationException { if ( healthCheck . hasHttp ( ) ) { throw new HealthCheckValidationException ( "The following health check contains an unsupported HTTP configuration: " + healthCheck ) ; } if ( ! healthCheck . hasCommand ( ) ) { throw new HealthCheckValidationException ( "The following health check does not contain a Command: " + healthCheck ) ; } Protos . CommandInfo commandInfo = healthCheck . getCommand ( ) ; if ( ! Boolean . valueOf ( commandInfo . getShell ( ) ) ) { throw new HealthCheckValidationException ( "Only shell based health checks are supported for health check commmand: " + commandInfo ) ; } }
custom executors are responsible for implementing healthchecks . this custom executor implements a subset of all possible health checks describable by a healthcheckinfo object . < p > they must be command healthchecks as http is not recommended by mesos yet and is unneeded from a completeness perspective . ` curl - f ` normally is sufficient . since all healthchecks as currently implemented by this custom executor are excuted as sub - processes we further require that the healthcheck specifies that it is a " shell " command to avoid unexpected behavior .
