jerryshao opened a new issue, #13131:
URL: https://github.com/apache/gravitino/issues/13131

   ### Version
   
   main branch
   
   ### Describe what's wrong
   
   When `gravitino.jobExecutor.local.sparkHome` and `SPARK_HOME` are both unset 
(or `spark-submit` is not executable), running a Spark job template with the 
local job executor is accepted. The run is recorded as `QUEUED`, then later 
flips to `FAILED` with no reason available through the API or UI.
   
   The check lives in the `SparkProcessBuilder` constructor, which runs 
asynchronously in the executor's worker thread. The exception is only logged in 
the server log, and the run record carries status alone. So the operator cannot 
tell that a configuration is missing, or which one, without access to the 
server log.
   
   ### Error message and/or stacktrace
   
   ```
   java.lang.IllegalArgumentException: gravitino.jobExecutor.local.sparkHome or 
SPARK_HOME environment variable must be set for Spark jobs
     at 
org.apache.arrow.util.Preconditions.checkArgument(Preconditions.java:123)
     at 
org.apache.gravitino.job.local.SparkProcessBuilder.<init>(SparkProcessBuilder.java:56)
     at 
org.apache.gravitino.job.local.LocalProcessBuilder.create(LocalProcessBuilder.java:46)
     at 
org.apache.gravitino.job.local.LocalJobExecutor.runJob(LocalJobExecutor.java:269)
   ```
   
   ### How to reproduce
   
   1. Start the Gravitino server with the default local job executor, without 
`gravitino.jobExecutor.local.sparkHome` or `SPARK_HOME` set.
   2. Run a Spark job template, e.g. the built-in `builtin-sparkpi`.
   3. The run request succeeds and the job is `QUEUED`. After the next status 
poll it becomes `FAILED`, and the reason only appears in the server log.
   
   ### Additional context
   
   Proposed fix:
   - Validate Spark availability when a Spark job is submitted, and reject the 
request with the original error (HTTP 400) instead of failing asynchronously.
   - Log a warning at startup when Spark is not configured for the local job 
executor.
   
   Persisting and exposing a failure reason for all job failure paths is a 
larger change and is out of scope here.
   


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: [email protected]

For queries about this service, please contact Infrastructure at:
[email protected]

Reply via email to