public static String[] executorCommand(Config config,Config runtime,int containerIndex,List<Integer> freePorts){
  if (freePorts.size() < PORTS_REQUIRED_FOR_EXECUTOR) {
    throw new RuntimeException("Failed to find enough ports for executor");
  }
  for (  int port : freePorts) {
    if (port == -1) {
      throw new RuntimeException("Failed to find available ports for executor");
    }
  }
  List<String> ports=new LinkedList<>();
  for (  int port : freePorts) {
    ports.add(Integer.toString(port));
  }
  return getExecutorCommand(config,runtime,containerIndex,ports);
}

public static String [ ] executorCommand ( Config config , Config runtime , int containerIndex , List < Integer > freePorts ) { if ( freePorts . size ( ) < PORTS_REQUIRED_FOR_EXECUTOR ) { throw new RuntimeException ( "Failed to find enough ports for executor" ) ; } for ( int port : freePorts ) { if ( port == - 1 ) { throw new RuntimeException ( "Failed to find available ports for executor" ) ; } } List < String > ports = new LinkedList < > ( ) ; for ( int port : freePorts ) { ports . add ( Integer . toString ( port ) ) ; } return getExecutorCommand ( config , runtime , containerIndex , ports ) ; }
utils method to construct the command to start heron - executor
