[jira] [Commented] (HIVE-19831) Hiveserver2 should skip doAuth checks for CREATE DATABASE/TABLE if database/table already exists

2019-07-01 Thread Rajkumar Singh (JIRA)


[ 
https://issues.apache.org/jira/browse/HIVE-19831?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel=16876461#comment-16876461
 ] 

Rajkumar Singh commented on HIVE-19831:
---

I think this will filter the database on which user don't have auth 
https://github.com/apache/hive/blob/fcd4721591e0ba7d9ba24821f9528dadb7ec16fd/standalone-metastore/metastore-common/src/main/java/org/apache/hadoop/hive/metastore/HiveMetaStoreClient.java#L1830

> Hiveserver2 should skip doAuth checks for CREATE DATABASE/TABLE if 
> database/table already exists
> 
>
> Key: HIVE-19831
> URL: https://issues.apache.org/jira/browse/HIVE-19831
> Project: Hive
>  Issue Type: Improvement
>  Components: HiveServer2
>Affects Versions: 1.2.1, 2.1.0
>Reporter: Rajkumar Singh
>Assignee: Rajkumar Singh
>Priority: Minor
>  Labels: pull-request-available
> Fix For: 4.0.0
>
> Attachments: HIVE-19831.01.patch, HIVE-19831.patch
>
>
> with sqlstdauth on, Create database if exists take TOO LONG if there are too 
> many objects inside the database directory. Hive should not run the doAuth 
> checks for all the objects within database if the database already exists.



--
This message was sent by Atlassian JIRA
(v7.6.3#76005)


[jira] [Commented] (HIVE-19831) Hiveserver2 should skip doAuth checks for CREATE DATABASE/TABLE if database/table already exists

2019-07-01 Thread Sergey Shelukhin (JIRA)


[ 
https://issues.apache.org/jira/browse/HIVE-19831?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel=16876426#comment-16876426
 ] 

Sergey Shelukhin commented on HIVE-19831:
-

Hmm... doesn't this expose the existence of the database by that name to an 
unauthorized user?

> Hiveserver2 should skip doAuth checks for CREATE DATABASE/TABLE if 
> database/table already exists
> 
>
> Key: HIVE-19831
> URL: https://issues.apache.org/jira/browse/HIVE-19831
> Project: Hive
>  Issue Type: Improvement
>  Components: HiveServer2
>Affects Versions: 1.2.1, 2.1.0
>Reporter: Rajkumar Singh
>Assignee: Rajkumar Singh
>Priority: Minor
>  Labels: pull-request-available
> Fix For: 4.0.0
>
> Attachments: HIVE-19831.01.patch, HIVE-19831.patch
>
>
> with sqlstdauth on, Create database if exists take TOO LONG if there are too 
> many objects inside the database directory. Hive should not run the doAuth 
> checks for all the objects within database if the database already exists.



--
This message was sent by Atlassian JIRA
(v7.6.3#76005)


[jira] [Commented] (HIVE-19831) Hiveserver2 should skip doAuth checks for CREATE DATABASE/TABLE if database/table already exists

2019-07-01 Thread Rajkumar Singh (JIRA)


[ 
https://issues.apache.org/jira/browse/HIVE-19831?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel=16876383#comment-16876383
 ] 

Rajkumar Singh commented on HIVE-19831:
---

Thanks [~daijy] Included the suggested comment, updated the fresh patch for a 
clean run.

> Hiveserver2 should skip doAuth checks for CREATE DATABASE/TABLE if 
> database/table already exists
> 
>
> Key: HIVE-19831
> URL: https://issues.apache.org/jira/browse/HIVE-19831
> Project: Hive
>  Issue Type: Improvement
>  Components: HiveServer2
>Affects Versions: 1.2.1, 2.1.0
>Reporter: Rajkumar Singh
>Assignee: Rajkumar Singh
>Priority: Minor
>  Labels: pull-request-available
> Attachments: HIVE-19831.01.patch, HIVE-19831.patch
>
>
> with sqlstdauth on, Create database if exists take TOO LONG if there are too 
> many objects inside the database directory. Hive should not run the doAuth 
> checks for all the objects within database if the database already exists.



--
This message was sent by Atlassian JIRA
(v7.6.3#76005)


[jira] [Commented] (HIVE-19831) Hiveserver2 should skip doAuth checks for CREATE DATABASE/TABLE if database/table already exists

2019-07-01 Thread Hive QA (JIRA)


[ 
https://issues.apache.org/jira/browse/HIVE-19831?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel=16876182#comment-16876182
 ] 

Hive QA commented on HIVE-19831:




Here are the results of testing the latest attachment:
https://issues.apache.org/jira/secure/attachment/12927542/HIVE-19831.patch

{color:red}ERROR:{color} -1 due to no test(s) being added or modified.

{color:red}ERROR:{color} -1 due to 4 failed/errored test(s), 16330 tests 
executed
*Failed tests:*
{noformat}
TestReplAcrossInstancesWithJsonMessageFormat - did not produce a TEST-*.xml 
file (likely timed out) (batchId=255)
org.apache.hive.jdbc.TestTriggersTezSessionPoolManager.testTriggerCustomCreatedDynamicPartitions
 (batchId=275)
org.apache.hive.jdbc.TestTriggersTezSessionPoolManager.testTriggerCustomCreatedDynamicPartitionsUnionAll
 (batchId=275)
org.apache.hive.jdbc.TestTriggersTezSessionPoolManager.testTriggerHighShuffleBytes
 (batchId=275)
{noformat}

Test results: 
https://builds.apache.org/job/PreCommit-HIVE-Build/17801/testReport
Console output: https://builds.apache.org/job/PreCommit-HIVE-Build/17801/console
Test logs: http://104.198.109.242/logs/PreCommit-HIVE-Build-17801/

Messages:
{noformat}
Executing org.apache.hive.ptest.execution.TestCheckPhase
Executing org.apache.hive.ptest.execution.PrepPhase
Executing org.apache.hive.ptest.execution.YetusPhase
Executing org.apache.hive.ptest.execution.ExecutionPhase
Executing org.apache.hive.ptest.execution.ReportingPhase
Tests exited with: TestsFailedException: 4 tests failed
{noformat}

This message is automatically generated.

ATTACHMENT ID: 12927542 - PreCommit-HIVE-Build

> Hiveserver2 should skip doAuth checks for CREATE DATABASE/TABLE if 
> database/table already exists
> 
>
> Key: HIVE-19831
> URL: https://issues.apache.org/jira/browse/HIVE-19831
> Project: Hive
>  Issue Type: Improvement
>  Components: HiveServer2
>Affects Versions: 1.2.1, 2.1.0
>Reporter: Rajkumar Singh
>Assignee: Rajkumar Singh
>Priority: Minor
>  Labels: pull-request-available
> Attachments: HIVE-19831.patch
>
>
> with sqlstdauth on, Create database if exists take TOO LONG if there are too 
> many objects inside the database directory. Hive should not run the doAuth 
> checks for all the objects within database if the database already exists.



--
This message was sent by Atlassian JIRA
(v7.6.3#76005)


[jira] [Commented] (HIVE-19831) Hiveserver2 should skip doAuth checks for CREATE DATABASE/TABLE if database/table already exists

2019-07-01 Thread Hive QA (JIRA)


[ 
https://issues.apache.org/jira/browse/HIVE-19831?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel=16876152#comment-16876152
 ] 

Hive QA commented on HIVE-19831:


| (x) *{color:red}-1 overall{color}* |
\\
\\
|| Vote || Subsystem || Runtime || Comment ||
|| || || || {color:brown} Prechecks {color} ||
| {color:green}+1{color} | {color:green} @author {color} | {color:green}  0m  
0s{color} | {color:green} The patch does not contain any @author tags. {color} |
|| || || || {color:brown} master Compile Tests {color} ||
| {color:green}+1{color} | {color:green} mvninstall {color} | {color:green}  8m 
33s{color} | {color:green} master passed {color} |
| {color:green}+1{color} | {color:green} compile {color} | {color:green}  1m  
8s{color} | {color:green} master passed {color} |
| {color:green}+1{color} | {color:green} checkstyle {color} | {color:green}  0m 
40s{color} | {color:green} master passed {color} |
| {color:blue}0{color} | {color:blue} findbugs {color} | {color:blue}  3m 
59s{color} | {color:blue} ql in master has 2253 extant Findbugs warnings. 
{color} |
| {color:green}+1{color} | {color:green} javadoc {color} | {color:green}  0m 
57s{color} | {color:green} master passed {color} |
|| || || || {color:brown} Patch Compile Tests {color} ||
| {color:green}+1{color} | {color:green} mvninstall {color} | {color:green}  1m 
22s{color} | {color:green} the patch passed {color} |
| {color:green}+1{color} | {color:green} compile {color} | {color:green}  1m  
5s{color} | {color:green} the patch passed {color} |
| {color:green}+1{color} | {color:green} javac {color} | {color:green}  1m  
5s{color} | {color:green} the patch passed {color} |
| {color:green}+1{color} | {color:green} checkstyle {color} | {color:green}  0m 
39s{color} | {color:green} the patch passed {color} |
| {color:red}-1{color} | {color:red} whitespace {color} | {color:red}  0m  
0s{color} | {color:red} The patch has 1 line(s) that end in whitespace. Use git 
apply --whitespace=fix <>. Refer https://git-scm.com/docs/git-apply 
{color} |
| {color:red}-1{color} | {color:red} findbugs {color} | {color:red}  4m 
18s{color} | {color:red} ql generated 1 new + 2253 unchanged - 0 fixed = 2254 
total (was 2253) {color} |
| {color:green}+1{color} | {color:green} javadoc {color} | {color:green}  1m  
0s{color} | {color:green} the patch passed {color} |
|| || || || {color:brown} Other Tests {color} ||
| {color:green}+1{color} | {color:green} asflicense {color} | {color:green}  0m 
14s{color} | {color:green} The patch does not generate ASF License warnings. 
{color} |
| {color:black}{color} | {color:black} {color} | {color:black} 24m 27s{color} | 
{color:black} {color} |
\\
\\
|| Reason || Tests ||
| FindBugs | module:ql |
|  |  Nullcheck of op at line 1136 of value previously dereferenced in 
org.apache.hadoop.hive.ql.Driver.doAuthorization(HiveOperation, 
BaseSemanticAnalyzer, String)  At Driver.java:1136 of value previously 
dereferenced in org.apache.hadoop.hive.ql.Driver.doAuthorization(HiveOperation, 
BaseSemanticAnalyzer, String)  At Driver.java:[line 1085] |
\\
\\
|| Subsystem || Report/Notes ||
| Optional Tests |  asflicense  javac  javadoc  findbugs  checkstyle  compile  |
| uname | Linux hiveptest-server-upstream 3.16.0-4-amd64 #1 SMP Debian 
3.16.43-2+deb8u5 (2017-09-19) x86_64 GNU/Linux |
| Build tool | maven |
| Personality | 
/data/hiveptest/working/yetus_PreCommit-HIVE-Build-17801/dev-support/hive-personality.sh
 |
| git revision | master / be6bf93 |
| Default Java | 1.8.0_111 |
| findbugs | v3.0.0 |
| whitespace | 
http://104.198.109.242/logs//PreCommit-HIVE-Build-17801/yetus/whitespace-eol.txt
 |
| findbugs | 
http://104.198.109.242/logs//PreCommit-HIVE-Build-17801/yetus/new-findbugs-ql.html
 |
| modules | C: ql U: ql |
| Console output | 
http://104.198.109.242/logs//PreCommit-HIVE-Build-17801/yetus.txt |
| Powered by | Apache Yetushttp://yetus.apache.org |


This message was automatically generated.



> Hiveserver2 should skip doAuth checks for CREATE DATABASE/TABLE if 
> database/table already exists
> 
>
> Key: HIVE-19831
> URL: https://issues.apache.org/jira/browse/HIVE-19831
> Project: Hive
>  Issue Type: Improvement
>  Components: HiveServer2
>Affects Versions: 1.2.1, 2.1.0
>Reporter: Rajkumar Singh
>Assignee: Rajkumar Singh
>Priority: Minor
>  Labels: pull-request-available
> Attachments: HIVE-19831.patch
>
>
> with sqlstdauth on, Create database if exists take TOO LONG if there are too 
> many objects inside the database directory. Hive should not run the doAuth 
> checks for all the objects within database if the database already exists.



--
This message was sent by Atlassian JIRA
(v7.6.3#76005)


[jira] [Commented] (HIVE-19831) Hiveserver2 should skip doAuth checks for CREATE DATABASE/TABLE if database/table already exists

2019-07-01 Thread Daniel Dai (JIRA)


[ 
https://issues.apache.org/jira/browse/HIVE-19831?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel=16876004#comment-16876004
 ] 

Daniel Dai commented on HIVE-19831:
---

Can you add a comment saying when db exists, we would expect Hive throw an 
exception so there's no need to do the auth? Otherwise from the code, it seems 
we would skip the auth check when db exists.

> Hiveserver2 should skip doAuth checks for CREATE DATABASE/TABLE if 
> database/table already exists
> 
>
> Key: HIVE-19831
> URL: https://issues.apache.org/jira/browse/HIVE-19831
> Project: Hive
>  Issue Type: Improvement
>  Components: HiveServer2
>Affects Versions: 1.2.1, 2.1.0
>Reporter: Rajkumar Singh
>Assignee: Rajkumar Singh
>Priority: Minor
>  Labels: pull-request-available
> Attachments: HIVE-19831.patch
>
>
> with sqlstdauth on, Create database if exists take TOO LONG if there are too 
> many objects inside the database directory. Hive should not run the doAuth 
> checks for all the objects within database if the database already exists.



--
This message was sent by Atlassian JIRA
(v7.6.3#76005)


[jira] [Commented] (HIVE-19831) Hiveserver2 should skip doAuth checks for CREATE DATABASE/TABLE if database/table already exists

2018-06-13 Thread Hive QA (JIRA)


[ 
https://issues.apache.org/jira/browse/HIVE-19831?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel=16511887#comment-16511887
 ] 

Hive QA commented on HIVE-19831:




Here are the results of testing the latest attachment:
https://issues.apache.org/jira/secure/attachment/12927542/HIVE-19831.patch

{color:red}ERROR:{color} -1 due to no test(s) being added or modified.

{color:green}SUCCESS:{color} +1 due to 14521 tests passed

Test results: 
https://builds.apache.org/job/PreCommit-HIVE-Build/11766/testReport
Console output: https://builds.apache.org/job/PreCommit-HIVE-Build/11766/console
Test logs: http://104.198.109.242/logs/PreCommit-HIVE-Build-11766/

Messages:
{noformat}
Executing org.apache.hive.ptest.execution.TestCheckPhase
Executing org.apache.hive.ptest.execution.PrepPhase
Executing org.apache.hive.ptest.execution.YetusPhase
Executing org.apache.hive.ptest.execution.ExecutionPhase
Executing org.apache.hive.ptest.execution.ReportingPhase
{noformat}

This message is automatically generated.

ATTACHMENT ID: 12927542 - PreCommit-HIVE-Build

> Hiveserver2 should skip doAuth checks for CREATE DATABASE/TABLE if 
> database/table already exists
> 
>
> Key: HIVE-19831
> URL: https://issues.apache.org/jira/browse/HIVE-19831
> Project: Hive
>  Issue Type: Improvement
>  Components: HiveServer2
>Affects Versions: 1.2.1, 2.1.0
>Reporter: Rajkumar Singh
>Assignee: Rajkumar Singh
>Priority: Minor
>  Labels: pull-request-available
> Attachments: HIVE-19831.patch
>
>
> with sqlstdauth on, Create database if exists take TOO LONG if there are too 
> many objects inside the database directory. Hive should not run the doAuth 
> checks for all the objects within database if the database already exists.



--
This message was sent by Atlassian JIRA
(v7.6.3#76005)


[jira] [Commented] (HIVE-19831) Hiveserver2 should skip doAuth checks for CREATE DATABASE/TABLE if database/table already exists

2018-06-13 Thread Hive QA (JIRA)


[ 
https://issues.apache.org/jira/browse/HIVE-19831?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel=16511866#comment-16511866
 ] 

Hive QA commented on HIVE-19831:


| (x) *{color:red}-1 overall{color}* |
\\
\\
|| Vote || Subsystem || Runtime || Comment ||
|| || || || {color:brown} Prechecks {color} ||
| {color:green}+1{color} | {color:green} @author {color} | {color:green}  0m  
0s{color} | {color:green} The patch does not contain any @author tags. {color} |
|| || || || {color:brown} master Compile Tests {color} ||
| {color:green}+1{color} | {color:green} mvninstall {color} | {color:green}  8m 
 3s{color} | {color:green} master passed {color} |
| {color:green}+1{color} | {color:green} compile {color} | {color:green}  1m  
2s{color} | {color:green} master passed {color} |
| {color:green}+1{color} | {color:green} checkstyle {color} | {color:green}  0m 
38s{color} | {color:green} master passed {color} |
| {color:blue}0{color} | {color:blue} findbugs {color} | {color:blue}  3m 
47s{color} | {color:blue} ql in master has 2279 extant Findbugs warnings. 
{color} |
| {color:green}+1{color} | {color:green} javadoc {color} | {color:green}  0m 
55s{color} | {color:green} master passed {color} |
|| || || || {color:brown} Patch Compile Tests {color} ||
| {color:green}+1{color} | {color:green} mvninstall {color} | {color:green}  1m 
22s{color} | {color:green} the patch passed {color} |
| {color:green}+1{color} | {color:green} compile {color} | {color:green}  1m  
1s{color} | {color:green} the patch passed {color} |
| {color:green}+1{color} | {color:green} javac {color} | {color:green}  1m  
1s{color} | {color:green} the patch passed {color} |
| {color:green}+1{color} | {color:green} checkstyle {color} | {color:green}  0m 
39s{color} | {color:green} the patch passed {color} |
| {color:red}-1{color} | {color:red} whitespace {color} | {color:red}  0m  
0s{color} | {color:red} The patch has 1 line(s) that end in whitespace. Use git 
apply --whitespace=fix <>. Refer https://git-scm.com/docs/git-apply 
{color} |
| {color:red}-1{color} | {color:red} findbugs {color} | {color:red}  4m  
5s{color} | {color:red} ql generated 1 new + 2279 unchanged - 0 fixed = 2280 
total (was 2279) {color} |
| {color:green}+1{color} | {color:green} javadoc {color} | {color:green}  0m 
53s{color} | {color:green} the patch passed {color} |
|| || || || {color:brown} Other Tests {color} ||
| {color:green}+1{color} | {color:green} asflicense {color} | {color:green}  0m 
12s{color} | {color:green} The patch does not generate ASF License warnings. 
{color} |
| {color:black}{color} | {color:black} {color} | {color:black} 23m  8s{color} | 
{color:black} {color} |
\\
\\
|| Reason || Tests ||
| FindBugs | module:ql |
|  |  Nullcheck of op at line 1082 of value previously dereferenced in 
org.apache.hadoop.hive.ql.Driver.doAuthorization(HiveOperation, 
BaseSemanticAnalyzer, String)  At Driver.java:1082 of value previously 
dereferenced in org.apache.hadoop.hive.ql.Driver.doAuthorization(HiveOperation, 
BaseSemanticAnalyzer, String)  At Driver.java:[line 1031] |
\\
\\
|| Subsystem || Report/Notes ||
| Optional Tests |  asflicense  javac  javadoc  findbugs  checkstyle  compile  |
| uname | Linux hiveptest-server-upstream 3.16.0-4-amd64 #1 SMP Debian 
3.16.36-1+deb8u1 (2016-09-03) x86_64 GNU/Linux |
| Build tool | maven |
| Personality | 
/data/hiveptest/working/yetus_PreCommit-HIVE-Build-11766/dev-support/hive-personality.sh
 |
| git revision | master / 14e3f19 |
| Default Java | 1.8.0_111 |
| findbugs | v3.0.0 |
| whitespace | 
http://104.198.109.242/logs//PreCommit-HIVE-Build-11766/yetus/whitespace-eol.txt
 |
| findbugs | 
http://104.198.109.242/logs//PreCommit-HIVE-Build-11766/yetus/new-findbugs-ql.html
 |
| modules | C: ql U: ql |
| Console output | 
http://104.198.109.242/logs//PreCommit-HIVE-Build-11766/yetus.txt |
| Powered by | Apache Yetushttp://yetus.apache.org |


This message was automatically generated.



> Hiveserver2 should skip doAuth checks for CREATE DATABASE/TABLE if 
> database/table already exists
> 
>
> Key: HIVE-19831
> URL: https://issues.apache.org/jira/browse/HIVE-19831
> Project: Hive
>  Issue Type: Improvement
>  Components: HiveServer2
>Affects Versions: 1.2.1, 2.1.0
>Reporter: Rajkumar Singh
>Assignee: Rajkumar Singh
>Priority: Minor
>  Labels: pull-request-available
> Attachments: HIVE-19831.patch
>
>
> with sqlstdauth on, Create database if exists take TOO LONG if there are too 
> many objects inside the database directory. Hive should not run the doAuth 
> checks for all the objects within database if the database already exists.



--
This message was sent by Atlassian JIRA
(v7.6.3#76005)


[jira] [Commented] (HIVE-19831) Hiveserver2 should skip doAuth checks for CREATE DATABASE/TABLE if database/table already exists

2018-06-12 Thread ASF GitHub Bot (JIRA)


[ 
https://issues.apache.org/jira/browse/HIVE-19831?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel=16510293#comment-16510293
 ] 

ASF GitHub Bot commented on HIVE-19831:
---

GitHub user rajkrrsingh opened a pull request:

https://github.com/apache/hive/pull/372

HIVE-19831: Hiveserver2 should skip doAuth checks for CREATE DATABASE…

Hiveserver2 should skip doAuth checks for CREATE DATABASE/TABLE if 
database/table already exists.
the proposed change will skip the authorization check if the database is 
already exists.

You can merge this pull request into a Git repository by running:

$ git pull https://github.com/rajkrrsingh/hive HIVE-19831

Alternatively you can review and apply these changes as the patch at:

https://github.com/apache/hive/pull/372.patch

To close this pull request, make a commit to your master/trunk branch
with (at least) the following in the commit message:

This closes #372


commit f62c4bbaf9d3bdfd762492fc3fc49772ce8b625a
Author: Rajkumar singh 
Date:   2018-06-12T22:02:41Z

HIVE-19831: Hiveserver2 should skip doAuth checks for CREATE DATABASE/TABLE 
if database/table already exists




> Hiveserver2 should skip doAuth checks for CREATE DATABASE/TABLE if 
> database/table already exists
> 
>
> Key: HIVE-19831
> URL: https://issues.apache.org/jira/browse/HIVE-19831
> Project: Hive
>  Issue Type: Improvement
>  Components: HiveServer2
>Affects Versions: 1.2.1, 2.1.0
>Reporter: Rajkumar Singh
>Priority: Minor
>  Labels: pull-request-available
>
> with sqlstdauth on, Create database if exists take TOO LONG if there are too 
> many objects inside the database directory. Hive should not run the doAuth 
> checks for all the objects within database if the database already exists.



--
This message was sent by Atlassian JIRA
(v7.6.3#76005)