[ 
https://issues.apache.org/jira/browse/HIVE-29170?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel
 ]

László Bodor updated HIVE-29170:
--------------------------------
    Description: 
we should not allow this on session level:
{code}
set hive.query.history.enabled=true
set hive.query.history.enabled=false
{code}
the service is initialized on HS2 startup, so this doesn't make sense and it's 
problematic in 2 ways:

1. originally false, and user tries to set it to true, this exception is hit: 
https://github.com/apache/hive/blob/1d6179dbff10d3594c31e319cdde2e7d2e08136b/ql/src/java/org/apache/hadoop/hive/ql/queryhistory/QueryHistoryService.java#L130
{code}
QueryHistoryService is not present when asked for the singleton instance
{code}


2. originally true and user trues to set it to false:
undefined behavior, or even worse, query history is turned off manually, which 
compromises transparency



  was:
we should not allow this:
{code}
set hive.query.history.enabled=true
set hive.query.history.enabled=false
{code}
the service is initialized on HS2 startup, so this doesn't make sense and it's 
problematic in 2 ways:

1. originally false, and user tries to set it to true, this exception is hit: 
https://github.com/apache/hive/blob/1d6179dbff10d3594c31e319cdde2e7d2e08136b/ql/src/java/org/apache/hadoop/hive/ql/queryhistory/QueryHistoryService.java#L130
{code}
QueryHistoryService is not present when asked for the singleton instance
{code}


2. originally true and user trues to set it to false:
undefined behavior, or even worse, query history is turned off manually, which 
compromises transparency




> Restrict the Query History service from being modified at the session level
> ---------------------------------------------------------------------------
>
>                 Key: HIVE-29170
>                 URL: https://issues.apache.org/jira/browse/HIVE-29170
>             Project: Hive
>          Issue Type: Bug
>            Reporter: László Bodor
>            Priority: Major
>
> we should not allow this on session level:
> {code}
> set hive.query.history.enabled=true
> set hive.query.history.enabled=false
> {code}
> the service is initialized on HS2 startup, so this doesn't make sense and 
> it's problematic in 2 ways:
> 1. originally false, and user tries to set it to true, this exception is hit: 
> https://github.com/apache/hive/blob/1d6179dbff10d3594c31e319cdde2e7d2e08136b/ql/src/java/org/apache/hadoop/hive/ql/queryhistory/QueryHistoryService.java#L130
> {code}
> QueryHistoryService is not present when asked for the singleton instance
> {code}
> 2. originally true and user trues to set it to false:
> undefined behavior, or even worse, query history is turned off manually, 
> which compromises transparency



--
This message was sent by Atlassian Jira
(v8.20.10#820010)

Reply via email to