def _build_spark_driver_kill_command(self):
        """
        Construct the spark-submit command to kill a driver.
        :return: full command to kill a driver
        """

        # If the spark_home is passed then build the spark-submit executable path using
        # the spark_home; otherwise assume that spark-submit is present in the path to
        # the executing user
        if self._connection['spark_home']:
            connection_cmd = [os.path.join(self._connection['spark_home'],
                                           'bin',
                                           self._connection['spark_binary'])]
        else:
            connection_cmd = [self._connection['spark_binary']]

        # The url ot the spark master
        connection_cmd += ["--master", self._connection['master']]

        # The actual kill command
        connection_cmd += ["--kill", self._driver_id]

        self.log.debug("Spark-Kill cmd: %s", connection_cmd)

        return connection_cmd
def _build_spark_driver_kill_command(self):
        

        
        
        
        if self._connection['spark_home']:
            connection_cmd = [os.path.join(self._connection['spark_home'],
                                           'bin',
                                           self._connection['spark_binary'])]
        else:
            connection_cmd = [self._connection['spark_binary']]

        
        connection_cmd += ["--master", self._connection['master']]

        
        connection_cmd += ["--kill", self._driver_id]

        self.log.debug("Spark-Kill cmd: %s", connection_cmd)

        return connection_cmd
def _build_spark_driver_kill_command ( self ) : # If the spark_home is passed then build the spark-submit executable path using # the spark_home; otherwise assume that spark-submit is present in the path to # the executing user if self . _connection [ 'spark_home' ] : connection_cmd = [ os . path . join ( self . _connection [ 'spark_home' ] , 'bin' , self . _connection [ 'spark_binary' ] ) ] else : connection_cmd = [ self . _connection [ 'spark_binary' ] ] # The url ot the spark master connection_cmd += [ "--master" , self . _connection [ 'master' ] ] # The actual kill command connection_cmd += [ "--kill" , self . _driver_id ] self . log . debug ( "Spark-Kill cmd: %s" , connection_cmd ) return connection_cmd
Construct the spark-submit command to kill a driver.
        :return: full command to kill a driver
Construct the spark - submit command to kill a driver . : return : full command to kill a driver