This is an automated email from the ASF dual-hosted git repository.

chengpan pushed a commit to branch master
in repository https://gitbox.apache.org/repos/asf/kyuubi.git


The following commit(s) were added to refs/heads/master by this push:
     new d7ea20236 [KYUUBI #5878] Hive engine should recognize 
`hiveserver2-site.xml`
d7ea20236 is described below

commit d7ea20236b88de62347fb2e89c45ad9f17971ddc
Author: yikaifei <[email protected]>
AuthorDate: Fri Dec 22 20:57:48 2023 +0800

    [KYUUBI #5878] Hive engine should recognize `hiveserver2-site.xml`
    
    # :mag: Description
    ## Issue References ๐Ÿ”—
    
    This pull request fixes https://github.com/apache/kyuubi/issues/5878, It 
aims to incorporate the `hiveserver2-site.xml` configuration into hiveConf for 
the Hive engine
    
    ## Describe Your Solution ๐Ÿ”ง
    
    Please include a summary of the change and which issue is fixed. Please 
also include relevant motivation and context. List any dependencies that are 
required for this change.
    
    ## Types of changes :bookmark:
    
    - [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 Plan ๐Ÿงช
    
    #### Behavior Without This Pull Request :coffin:
    
    #### Behavior With This Pull Request :tada:
    
    #### Related Unit Tests
    
    ---
    
    # Checklists
    ## ๐Ÿ“ Author Self Checklist
    
    - [ ] My code follows the [style 
guidelines](https://kyuubi.readthedocs.io/en/master/contributing/code/style.html)
 of this project
    - [ ] I have performed a self-review
    - [ ] I have commented my code, particularly in hard-to-understand areas
    - [ ] I have made corresponding changes to the documentation
    - [ ] My changes generate no new warnings
    - [ ] I have added tests that prove my fix is effective or that my feature 
works
    - [ ] New and existing unit tests pass locally with my changes
    - [x] This patch was not authored or co-authored using [Generative 
Tooling](https://www.apache.org/legal/generative-tooling.html)
    
    ## ๐Ÿ“ Committer Pre-Merge Checklist
    
    - [ ] Pull request title is okay.
    - [ ] No license issues.
    - [ ] Milestone correctly set?
    - [ ] Test coverage is ok
    - [ ] Assignees are selected.
    - [ ] Minimum number of approvals
    - [ ] No changes are requested
    
    **Be nice. Be informative.**
    
    Closes #5907 from Yikf/hiveserver2-site.
    
    Closes #5878
    
    c4a9268c7 [Cheng Pan] Update 
externals/kyuubi-hive-sql-engine/src/main/scala/org/apache/kyuubi/engine/hive/HiveSQLEngine.scala
    ba59186b6 [yikaifei] add hiveserver2-site to hiveconf
    
    Lead-authored-by: yikaifei <[email protected]>
    Co-authored-by: Cheng Pan <[email protected]>
    Signed-off-by: Cheng Pan <[email protected]>
---
 .../main/scala/org/apache/kyuubi/engine/hive/HiveSQLEngine.scala  | 8 ++++++++
 1 file changed, 8 insertions(+)

diff --git 
a/externals/kyuubi-hive-sql-engine/src/main/scala/org/apache/kyuubi/engine/hive/HiveSQLEngine.scala
 
b/externals/kyuubi-hive-sql-engine/src/main/scala/org/apache/kyuubi/engine/hive/HiveSQLEngine.scala
index 3e6b8729d..f22e281fb 100644
--- 
a/externals/kyuubi-hive-sql-engine/src/main/scala/org/apache/kyuubi/engine/hive/HiveSQLEngine.scala
+++ 
b/externals/kyuubi-hive-sql-engine/src/main/scala/org/apache/kyuubi/engine/hive/HiveSQLEngine.scala
@@ -79,6 +79,14 @@ object HiveSQLEngine extends Logging {
     kyuubiConf.setIfMissing(KyuubiConf.FRONTEND_THRIFT_BINARY_BIND_PORT, 0)
     kyuubiConf.setIfMissing(HA_ZK_CONN_RETRY_POLICY, 
RetryPolicies.N_TIME.toString)
 
+    // align with the operational behavior of HiveServer2, it is necessary to
+    // include the `hiveserver2-site.xml` configuration within the HiveConf 
settings.
+    // for instance, upon the installation of the Hive Ranger plugin, 
authorization
+    // configurations are appended to the `hiveserver2-site.xml` file. 
Similarly, to activate
+    // the Ranger plugin for the Hive engine within Kyuubi, it is essential 
for the Hive engine
+    // to load the `hiveserver2-site.xml` file. This ensures that the Hive 
engine's
+    // security features are consistent with those managed by HiveServer2. See 
[KYUUBI #5878].
+    hiveConf.addResource("hiveserver2-site.xml")
     for ((k, v) <- kyuubiConf.getAll) {
       hiveConf.set(k, v)
     }

Reply via email to