nileshrathi345 opened a new pull request, #531:
URL: https://github.com/apache/livy/pull/531

   ## What changes were proposed in this pull request?
   
   This is a follow-up fix for 
[LIVY-1059](https://github.com/apache/livy/pull/529).
   
   When a client sends `"queue": ""` in the session create JSON, Livy was 
treating it as a valid queue value instead of falling back to the server 
default `livy.spark.yarn.queue`.
   
   This change treats an empty queue string the same as a missing queue, so the 
default YARN queue from Livy config is used when the client passes "".
   
   Updated in both batch and interactive session creation:
   `request.queue.filterNot(_.isEmpty).orElse(livyConf.sparkYarnQueue())`
   
   ## How was this patch tested?
   
   - Added unit test in `BatchSessionSpec` for `queue = Some("")` and verified 
the default queue is passed to spark-submit
   - Added unit test in `InteractiveSessionSpec` for `queue = Some("")` and 
verified the session uses the default queue from `LivyConf`
   - Existing tests for `queue = None` and user-provided queue values still pass


-- 
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