[jira] [Commented] (HIVE-4858) Sort "show grant" result to improve usability and testability

2013-07-19 Thread Edward Capriolo (JIRA)

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

Edward Capriolo commented on HIVE-4858:
---

[~ashutoshc] That is interesting. I think we are better off fixing the problem 
at the source. Most things are easier to understand if they are sorted, unless 
there is a performance hit, or there is some other benefit to the a non sorted 
order, for example if you want to know which grant was created first.

Do you get what I am saying? Like if you had to manually audit 1000 grants and 
they were not sorted the first thing you would probably do is drop them into a 
spread sheet and sort them.

Some things should not be sorted, like hives column definitions are in the 
order of the columns in the text file. 

> Sort "show grant" result to improve usability and testability
> -
>
> Key: HIVE-4858
> URL: https://issues.apache.org/jira/browse/HIVE-4858
> Project: Hive
>  Issue Type: Improvement
>  Components: CLI
>Affects Versions: 0.10.0, 0.11.0
>Reporter: Xuefu Zhang
>Assignee: Xuefu Zhang
>Priority: Minor
> Fix For: 0.11.1
>
> Attachments: HIVE-4858.1.patch, HIVE-4858.patch
>
>
> Currently Hive outputs the result of "show grant" command in no deterministic 
> order. It outputs the set of each privilege type in the order of whatever 
> returned from DB (DataNucleus). Randomness can arise and tests (depending on 
> the order) can fail, especially in events of library upgrade (DN or JVM 
> upgrade). Sorting the result will avoid the potential randomness and make the 
> output more deterministic, thus not only improving the readability of the 
> output but also making the test more robust.  

--
This message is automatically generated by JIRA.
If you think it was sent incorrectly, please contact your JIRA administrators
For more information on JIRA, see: http://www.atlassian.com/software/jira


[jira] [Commented] (HIVE-4858) Sort "show grant" result to improve usability and testability

2013-07-19 Thread Edward Capriolo (JIRA)

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

Edward Capriolo commented on HIVE-4858:
---

Well the root of the problem is that our test infrastructure uses "diff" so we 
are always monkeying around deterministic output :)  . The diff approach has 
it's merits but it is far from sexy.

> Sort "show grant" result to improve usability and testability
> -
>
> Key: HIVE-4858
> URL: https://issues.apache.org/jira/browse/HIVE-4858
> Project: Hive
>  Issue Type: Improvement
>  Components: CLI
>Affects Versions: 0.10.0, 0.11.0
>Reporter: Xuefu Zhang
>Assignee: Xuefu Zhang
>Priority: Minor
> Fix For: 0.11.1
>
> Attachments: HIVE-4858.1.patch, HIVE-4858.patch
>
>
> Currently Hive outputs the result of "show grant" command in no deterministic 
> order. It outputs the set of each privilege type in the order of whatever 
> returned from DB (DataNucleus). Randomness can arise and tests (depending on 
> the order) can fail, especially in events of library upgrade (DN or JVM 
> upgrade). Sorting the result will avoid the potential randomness and make the 
> output more deterministic, thus not only improving the readability of the 
> output but also making the test more robust.  

--
This message is automatically generated by JIRA.
If you think it was sent incorrectly, please contact your JIRA administrators
For more information on JIRA, see: http://www.atlassian.com/software/jira


[jira] [Commented] (HIVE-4858) Sort "show grant" result to improve usability and testability

2013-07-19 Thread Ashutosh Chauhan (JIRA)

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

Ashutosh Chauhan commented on HIVE-4858:


HIVE-3775 introduced a directive -- SORT_BEFORE_DIFF specifically for this 
purpose which we can add in .q files. Advantage of that is we need not to 
modify source specifically to take care of test issues. [~xuefuz] Wondering if 
you have looked at that? Looks like that should be sufficient here as well.

> Sort "show grant" result to improve usability and testability
> -
>
> Key: HIVE-4858
> URL: https://issues.apache.org/jira/browse/HIVE-4858
> Project: Hive
>  Issue Type: Improvement
>  Components: CLI
>Affects Versions: 0.10.0, 0.11.0
>Reporter: Xuefu Zhang
>Assignee: Xuefu Zhang
>Priority: Minor
> Fix For: 0.11.1
>
> Attachments: HIVE-4858.1.patch, HIVE-4858.patch
>
>
> Currently Hive outputs the result of "show grant" command in no deterministic 
> order. It outputs the set of each privilege type in the order of whatever 
> returned from DB (DataNucleus). Randomness can arise and tests (depending on 
> the order) can fail, especially in events of library upgrade (DN or JVM 
> upgrade). Sorting the result will avoid the potential randomness and make the 
> output more deterministic, thus not only improving the readability of the 
> output but also making the test more robust.  

--
This message is automatically generated by JIRA.
If you think it was sent incorrectly, please contact your JIRA administrators
For more information on JIRA, see: http://www.atlassian.com/software/jira


[jira] [Commented] (HIVE-4858) Sort "show grant" result to improve usability and testability

2013-07-19 Thread Edward Capriolo (JIRA)

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

Edward Capriolo commented on HIVE-4858:
---

Do not have time for the review but +1 for the idea.

> Sort "show grant" result to improve usability and testability
> -
>
> Key: HIVE-4858
> URL: https://issues.apache.org/jira/browse/HIVE-4858
> Project: Hive
>  Issue Type: Improvement
>  Components: CLI
>Affects Versions: 0.10.0, 0.11.0
>Reporter: Xuefu Zhang
>Assignee: Xuefu Zhang
>Priority: Minor
> Fix For: 0.11.1
>
> Attachments: HIVE-4858.1.patch, HIVE-4858.patch
>
>
> Currently Hive outputs the result of "show grant" command in no deterministic 
> order. It outputs the set of each privilege type in the order of whatever 
> returned from DB (DataNucleus). Randomness can arise and tests (depending on 
> the order) can fail, especially in events of library upgrade (DN or JVM 
> upgrade). Sorting the result will avoid the potential randomness and make the 
> output more deterministic, thus not only improving the readability of the 
> output but also making the test more robust.  

--
This message is automatically generated by JIRA.
If you think it was sent incorrectly, please contact your JIRA administrators
For more information on JIRA, see: http://www.atlassian.com/software/jira


[jira] [Commented] (HIVE-4858) Sort "show grant" result to improve usability and testability

2013-07-19 Thread Ashutosh Chauhan (JIRA)

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

Ashutosh Chauhan commented on HIVE-4858:


In general I don't think its good idea to change software to appease test 
infra, though we do that quite a few places in Hive. In this particular 
instance argument of sorted output for ddl operations is weak in my opinion (no 
other query engine I know of promises this), but I agree there is no harm in 
that. Since, source changes are pretty straight forward, I am ok to let this 
slip in.

> Sort "show grant" result to improve usability and testability
> -
>
> Key: HIVE-4858
> URL: https://issues.apache.org/jira/browse/HIVE-4858
> Project: Hive
>  Issue Type: Improvement
>  Components: CLI
>Affects Versions: 0.10.0, 0.11.0
>Reporter: Xuefu Zhang
>Assignee: Xuefu Zhang
>Priority: Minor
> Fix For: 0.11.1
>
> Attachments: HIVE-4858.1.patch, HIVE-4858.patch
>
>
> Currently Hive outputs the result of "show grant" command in no deterministic 
> order. It outputs the set of each privilege type in the order of whatever 
> returned from DB (DataNucleus). Randomness can arise and tests (depending on 
> the order) can fail, especially in events of library upgrade (DN or JVM 
> upgrade). Sorting the result will avoid the potential randomness and make the 
> output more deterministic, thus not only improving the readability of the 
> output but also making the test more robust.  

--
This message is automatically generated by JIRA.
If you think it was sent incorrectly, please contact your JIRA administrators
For more information on JIRA, see: http://www.atlassian.com/software/jira


[jira] [Commented] (HIVE-4858) Sort "show grant" result to improve usability and testability

2013-07-19 Thread Xuefu Zhang (JIRA)

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

Xuefu Zhang commented on HIVE-4858:
---

[~ashutoshc] I didn't know about HIVE-3775, but it seems a good way to solve 
random order problem for testing purpose. However, do you think also it's a 
good idea to have a deterministic ordering for SQL outputs? For instance, it 
might seems more usable with an ordered output if user does a "show tables", 
etc.

Having a deterministic ordering in sql output is another motivation of this 
JIRA, though it only takes care of "show grants". Hive is a little inconsistent 
in this. I think "show databases" and "show tables" diffs in this behavior.

> Sort "show grant" result to improve usability and testability
> -
>
> Key: HIVE-4858
> URL: https://issues.apache.org/jira/browse/HIVE-4858
> Project: Hive
>  Issue Type: Improvement
>  Components: CLI
>Affects Versions: 0.10.0, 0.11.0
>Reporter: Xuefu Zhang
>Assignee: Xuefu Zhang
>Priority: Minor
> Fix For: 0.11.1
>
> Attachments: HIVE-4858.1.patch, HIVE-4858.patch
>
>
> Currently Hive outputs the result of "show grant" command in no deterministic 
> order. It outputs the set of each privilege type in the order of whatever 
> returned from DB (DataNucleus). Randomness can arise and tests (depending on 
> the order) can fail, especially in events of library upgrade (DN or JVM 
> upgrade). Sorting the result will avoid the potential randomness and make the 
> output more deterministic, thus not only improving the readability of the 
> output but also making the test more robust.  

--
This message is automatically generated by JIRA.
If you think it was sent incorrectly, please contact your JIRA administrators
For more information on JIRA, see: http://www.atlassian.com/software/jira


[jira] [Commented] (HIVE-4858) Sort "show grant" result to improve usability and testability

2013-07-19 Thread Brock Noland (JIRA)

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

Brock Noland commented on HIVE-4858:


Interesting, I had not seen SORT_BEFORE_DIFF as well. I don't have a strong 
opinion either way but I'd prefer deterministic output from hive itself unless 
it's expensive.

> Sort "show grant" result to improve usability and testability
> -
>
> Key: HIVE-4858
> URL: https://issues.apache.org/jira/browse/HIVE-4858
> Project: Hive
>  Issue Type: Improvement
>  Components: CLI
>Affects Versions: 0.10.0, 0.11.0
>Reporter: Xuefu Zhang
>Assignee: Xuefu Zhang
>Priority: Minor
> Fix For: 0.11.1
>
> Attachments: HIVE-4858.1.patch, HIVE-4858.patch
>
>
> Currently Hive outputs the result of "show grant" command in no deterministic 
> order. It outputs the set of each privilege type in the order of whatever 
> returned from DB (DataNucleus). Randomness can arise and tests (depending on 
> the order) can fail, especially in events of library upgrade (DN or JVM 
> upgrade). Sorting the result will avoid the potential randomness and make the 
> output more deterministic, thus not only improving the readability of the 
> output but also making the test more robust.  

--
This message is automatically generated by JIRA.
If you think it was sent incorrectly, please contact your JIRA administrators
For more information on JIRA, see: http://www.atlassian.com/software/jira


[jira] [Commented] (HIVE-4858) Sort "show grant" result to improve usability and testability

2013-07-19 Thread Brock Noland (JIRA)

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

Brock Noland commented on HIVE-4858:


+1

> Sort "show grant" result to improve usability and testability
> -
>
> Key: HIVE-4858
> URL: https://issues.apache.org/jira/browse/HIVE-4858
> Project: Hive
>  Issue Type: Improvement
>  Components: CLI
>Affects Versions: 0.10.0, 0.11.0
>Reporter: Xuefu Zhang
>Assignee: Xuefu Zhang
>Priority: Minor
> Fix For: 0.11.1
>
> Attachments: HIVE-4858.1.patch, HIVE-4858.patch
>
>
> Currently Hive outputs the result of "show grant" command in no deterministic 
> order. It outputs the set of each privilege type in the order of whatever 
> returned from DB (DataNucleus). Randomness can arise and tests (depending on 
> the order) can fail, especially in events of library upgrade (DN or JVM 
> upgrade). Sorting the result will avoid the potential randomness and make the 
> output more deterministic, thus not only improving the readability of the 
> output but also making the test more robust.  

--
This message is automatically generated by JIRA.
If you think it was sent incorrectly, please contact your JIRA administrators
For more information on JIRA, see: http://www.atlassian.com/software/jira


[jira] [Commented] (HIVE-4858) Sort "show grant" result to improve usability and testability

2013-07-18 Thread Hive QA (JIRA)

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

Hive QA commented on HIVE-4858:
---



{color:green}Overall{color}: +1 all checks pass

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

{color:green}SUCCESS:{color} +1 all tests passed

Test results: https://builds.apache.org/job/PreCommit-HIVE-Build/72/testReport
Console output: https://builds.apache.org/job/PreCommit-HIVE-Build/72/console

Messages:
Executing org.apache.hive.ptest.execution.CleanupPhase
Executing org.apache.hive.ptest.execution.PrepPhase
Executing org.apache.hive.ptest.execution.ExecutionPhase
Executing org.apache.hive.ptest.execution.ReportingPhase

This message is automatically generated.

> Sort "show grant" result to improve usability and testability
> -
>
> Key: HIVE-4858
> URL: https://issues.apache.org/jira/browse/HIVE-4858
> Project: Hive
>  Issue Type: Improvement
>  Components: CLI
>Affects Versions: 0.10.0, 0.11.0
>Reporter: Xuefu Zhang
>Assignee: Xuefu Zhang
>Priority: Minor
> Fix For: 0.11.1
>
> Attachments: HIVE-4858.1.patch, HIVE-4858.patch
>
>
> Currently Hive outputs the result of "show grant" command in no deterministic 
> order. It outputs the set of each privilege type in the order of whatever 
> returned from DB (DataNucleus). Randomness can arise and tests (depending on 
> the order) can fail, especially in events of library upgrade (DN or JVM 
> upgrade). Sorting the result will avoid the potential randomness and make the 
> output more deterministic, thus not only improving the readability of the 
> output but also making the test more robust.  

--
This message is automatically generated by JIRA.
If you think it was sent incorrectly, please contact your JIRA administrators
For more information on JIRA, see: http://www.atlassian.com/software/jira


[jira] [Commented] (HIVE-4858) Sort "show grant" result to improve usability and testability

2013-07-15 Thread Xuefu Zhang (JIRA)

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

Xuefu Zhang commented on HIVE-4858:
---

Review board: https://reviews.apache.org/r/12562/

> Sort "show grant" result to improve usability and testability
> -
>
> Key: HIVE-4858
> URL: https://issues.apache.org/jira/browse/HIVE-4858
> Project: Hive
>  Issue Type: Improvement
>  Components: CLI
>Affects Versions: 0.10.0, 0.11.0
>Reporter: Xuefu Zhang
>Assignee: Xuefu Zhang
>Priority: Minor
> Fix For: 0.11.1
>
> Attachments: HIVE-4858.patch
>
>
> Currently Hive outputs the result of "show grant" command in no deterministic 
> order. It outputs the set of each privilege type in the order of whatever 
> returned from DB (DataNucleus). Randomness can arise and tests (depending on 
> the order) can fail, especially in events of library upgrade (DN or JVM 
> upgrade). Sorting the result will avoid the potential randomness and make the 
> output more deterministic, thus not only improving the readability of the 
> output but also making the test more robust.  

--
This message is automatically generated by JIRA.
If you think it was sent incorrectly, please contact your JIRA administrators
For more information on JIRA, see: http://www.atlassian.com/software/jira