Madhukar525722 opened a new pull request, #6779:
URL: https://github.com/apache/kyuubi/pull/6779

   …groups
   
   # :mag: Description
   ## Issue References 🔗
   <!-- Append the issue number after #. If there is no issue for you to link 
create one or -->
   <!-- If there are no issues to link, please provide details here. -->
   
   This pull request fixes #6402 
   
   ## Describe Your Solution 🔧
   
   Currently, the group level engine is getting launched with the first user 
group itself. This change will allow user to pass in which group they want to 
launch the engine. 
   
   The flow of implementation is :
   - Take input of preferred group
       - If it is not defined, take the default route, pick the first group 
from the list
       - If its defined
           - User is not part of preferred group, raise ERROR
           - User is part of preferred group, 
               - If group engine don’t exists, then create a engine with group 
name owned by first sessionUser
               - If group engine exists, use the existing one
   
   1. In this way, for every group there will be single engine, which can be 
re-used.
   2. First user launching the engine is implemented to handle the scenarios 
where Hadoop groups are not the yarn users.
   3. For security concerns in 2nd point, we can have fine grained access 
control on session level, using Apache Ranger. 
   
   ## Types of changes :bookmark:
   <!--- What types of changes does your code introduce? Put an `x` in all the 
boxes that apply: -->
   - [x] Bugfix (non-breaking change which fixes an issue)
   - [ ] New feature (non-breaking change which adds functionality)
   - [ ] Breaking change (fix or feature that would cause existing 
functionality to change)
   
   ## Test Results🧪
   1. When PREFERRED_GROUP was not defined, it used the first group from the 
list
   Spark application name: 
kyuubi_GROUP_SPARK_SQL_Internet_Users_default_d2826b5b-3f1e-48a0-b42f-d248da914b7c
   application ID: application_1728291907264_43966
   Start time: 2024-10-23T20:48:52.415
   User: madlnu
   
   2. When valid PREFERRED_GROUP was defined
   Spark application name: 
kyuubi_GROUP_SPARK_SQL_kyuubi_test_b_default_be9a16a8-be38-4ab6-bee9-1934f8556f18
   application ID: application_1728291907264_43968
   Start time: 2024-10-23T20:50:25.944
   User: madlnu
   
   3. When invalid PREFERRED_GROUP was defined
   Error: org.apache.kyuubi.KyuubiSQLException: Error operating LaunchEngine: 
java.lang.IllegalArgumentException: User is not part of the preferred group: 
kyuubi_test_x
   
   4. When any other user X tries to access the existing GROUP engine, it uses 
the same engine
   Spark application name: 
kyuubi_GROUP_SPARK_SQL_Internet_Users_default_d2826b5b-3f1e-48a0-b42f-d248da914b7c
   application ID: application_1728291907264_43966
   Start time: 2024-10-23T20:48:52.415
   User: madlnu
   
   ---
   
   # Checklist 📝
   <!--- Go over all the following points, and put an `x` in all the boxes that 
apply. -->
   <!--- If you're unsure about any of these, don't hesitate to ask. We're here 
to help! -->
   
   - [ ] This patch was not authored or co-authored using [Generative 
Tooling](https://www.apache.org/legal/generative-tooling.html)
   
   **Be nice. Be informative.**
   


-- 
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: notifications-unsubscr...@kyuubi.apache.org

For queries about this service, please contact Infrastructure at:
us...@infra.apache.org


---------------------------------------------------------------------
To unsubscribe, e-mail: notifications-unsubscr...@kyuubi.apache.org
For additional commands, e-mail: notifications-h...@kyuubi.apache.org

Reply via email to