You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@sentry.apache.org by Ke Jia <ke...@intel.com> on 2016/05/27 01:33:37 UTC

Review Request 47937: SENTRY-1134: Add user defined udf test case.

-----------------------------------------------------------
This is an automatically generated e-mail. To reply, visit:
https://reviews.apache.org/r/47937/
-----------------------------------------------------------

Review request for sentry, Anne Yu and Dapeng Sun.


Bugs: SENTRY-1134
    https://issues.apache.org/jira/browse/SENTRY-1134


Repository: sentry


Description
-------

Add user defined UDF test, user create a jar then create udf from this jar.


Diffs
-----

  .gitignore 80d5c03 
  sentry-tests/sentry-tests-hive/src/test/java/org/apache/sentry/tests/e2e/hive/TestPrivilegesAtFunctionScope.java ef7a86c 
  sentry-tests/sentry-tests-hive/src/test/resources/myudfs.jar PRE-CREATION 

Diff: https://reviews.apache.org/r/47937/diff/


Testing
-------

Testing


Thanks,

Ke Jia


Re: Review Request 47937: SENTRY-1134: Add user defined udf test case.

Posted by Ke Jia <ke...@intel.com>.

> On May 27, 2016, 10:28 p.m., Anne Yu wrote:
> > sentry-tests/sentry-tests-hive/src/test/java/org/apache/sentry/tests/e2e/hive/TestPrivilegesAtFunctionScope.java, line 120
> > <https://reviews.apache.org/r/47937/diff/1/?file=1396019#file1396019line120>
> >
> >     BTW, can you add myudfs.java then let compiler compiles it, once create myudfs.jar will be put into target dir; your test can have access from there. So no need to check in myudfs.jar. Not sure if your compiled version will work on different systems or not (jdk7, 8 etc.)

I have updated the patch. And I created a TestUDF.java to let compiler compile it and access it from the target dir.


- Ke


-----------------------------------------------------------
This is an automatically generated e-mail. To reply, visit:
https://reviews.apache.org/r/47937/#review135336
-----------------------------------------------------------


On June 1, 2016, 2:09 a.m., Ke Jia wrote:
> 
> -----------------------------------------------------------
> This is an automatically generated e-mail. To reply, visit:
> https://reviews.apache.org/r/47937/
> -----------------------------------------------------------
> 
> (Updated June 1, 2016, 2:09 a.m.)
> 
> 
> Review request for sentry, Anne Yu and Dapeng Sun.
> 
> 
> Bugs: SENTRY-1134
>     https://issues.apache.org/jira/browse/SENTRY-1134
> 
> 
> Repository: sentry
> 
> 
> Description
> -------
> 
> Add user defined UDF test, user create a jar then create udf from this jar.
> 
> 
> Diffs
> -----
> 
>   sentry-tests/sentry-tests-hive/src/test/java/org/apache/sentry/tests/e2e/hive/TestPrivilegesAtFunctionScope.java ef7a86c 
>   sentry-tests/sentry-tests-hive/src/test/java/org/apache/sentry/tests/e2e/hive/TestUDF.java PRE-CREATION 
> 
> Diff: https://reviews.apache.org/r/47937/diff/
> 
> 
> Testing
> -------
> 
> Testing
> 
> 
> Thanks,
> 
> Ke Jia
> 
>


Re: Review Request 47937: SENTRY-1134: Add user defined udf test case.

Posted by Anne Yu <an...@cloudera.com>.
-----------------------------------------------------------
This is an automatically generated e-mail. To reply, visit:
https://reviews.apache.org/r/47937/#review135336
-----------------------------------------------------------




sentry-tests/sentry-tests-hive/src/test/java/org/apache/sentry/tests/e2e/hive/TestPrivilegesAtFunctionScope.java (line 118)
<https://reviews.apache.org/r/47937/#comment200362>

    Belive this is not necessary; If you put any resource file into resources dir with the same root as src, shouldn't call this fashion of absolute path.



sentry-tests/sentry-tests-hive/src/test/java/org/apache/sentry/tests/e2e/hive/TestPrivilegesAtFunctionScope.java (line 119)
<https://reviews.apache.org/r/47937/#comment200364>

    Can you double check if sentry support add command? Seems we have blacklisted it for any user. Even if you grant permissions to user, he can't add resources. https://issues.apache.org/jira/browse/HIVE-5400



sentry-tests/sentry-tests-hive/src/test/java/org/apache/sentry/tests/e2e/hive/TestPrivilegesAtFunctionScope.java (line 120)
<https://reviews.apache.org/r/47937/#comment200365>

    BTW, can you add myudfs.java then let compiler compiles it, once create myudfs.jar will be put into target dir; your test can have access from there. So no need to check in myudfs.jar. Not sure if your compiled version will work on different systems or not (jdk7, 8 etc.)


- Anne Yu


On May 27, 2016, 1:33 a.m., Ke Jia wrote:
> 
> -----------------------------------------------------------
> This is an automatically generated e-mail. To reply, visit:
> https://reviews.apache.org/r/47937/
> -----------------------------------------------------------
> 
> (Updated May 27, 2016, 1:33 a.m.)
> 
> 
> Review request for sentry, Anne Yu and Dapeng Sun.
> 
> 
> Bugs: SENTRY-1134
>     https://issues.apache.org/jira/browse/SENTRY-1134
> 
> 
> Repository: sentry
> 
> 
> Description
> -------
> 
> Add user defined UDF test, user create a jar then create udf from this jar.
> 
> 
> Diffs
> -----
> 
>   .gitignore 80d5c03 
>   sentry-tests/sentry-tests-hive/src/test/java/org/apache/sentry/tests/e2e/hive/TestPrivilegesAtFunctionScope.java ef7a86c 
>   sentry-tests/sentry-tests-hive/src/test/resources/myudfs.jar PRE-CREATION 
> 
> Diff: https://reviews.apache.org/r/47937/diff/
> 
> 
> Testing
> -------
> 
> Testing
> 
> 
> Thanks,
> 
> Ke Jia
> 
>


Re: Review Request 47937: SENTRY-1134: Add user defined udf test case.

Posted by Anne Yu <an...@cloudera.com>.
-----------------------------------------------------------
This is an automatically generated e-mail. To reply, visit:
https://reviews.apache.org/r/47937/#review136148
-----------------------------------------------------------


Ship it!




LGTM. Please check in after addressing all the other reviewers' comments.

- Anne Yu


On June 1, 2016, 2:09 a.m., Ke Jia wrote:
> 
> -----------------------------------------------------------
> This is an automatically generated e-mail. To reply, visit:
> https://reviews.apache.org/r/47937/
> -----------------------------------------------------------
> 
> (Updated June 1, 2016, 2:09 a.m.)
> 
> 
> Review request for sentry, Anne Yu and Dapeng Sun.
> 
> 
> Bugs: SENTRY-1134
>     https://issues.apache.org/jira/browse/SENTRY-1134
> 
> 
> Repository: sentry
> 
> 
> Description
> -------
> 
> Add user defined UDF test, user create a jar then create udf from this jar.
> 
> 
> Diffs
> -----
> 
>   sentry-tests/sentry-tests-hive/src/test/java/org/apache/sentry/tests/e2e/hive/TestPrivilegesAtFunctionScope.java ef7a86c 
>   sentry-tests/sentry-tests-hive/src/test/java/org/apache/sentry/tests/e2e/hive/TestUDF.java PRE-CREATION 
> 
> Diff: https://reviews.apache.org/r/47937/diff/
> 
> 
> Testing
> -------
> 
> Testing
> 
> 
> Thanks,
> 
> Ke Jia
> 
>


Re: Review Request 47937: SENTRY-1134: Add user defined udf test case.

Posted by Dapeng Sun <da...@intel.com>.
-----------------------------------------------------------
This is an automatically generated e-mail. To reply, visit:
https://reviews.apache.org/r/47937/#review137913
-----------------------------------------------------------


Ship it!




Ship It!

- Dapeng Sun


On \u516d\u6708 1, 2016, 10:09 a.m., Ke Jia wrote:
> 
> -----------------------------------------------------------
> This is an automatically generated e-mail. To reply, visit:
> https://reviews.apache.org/r/47937/
> -----------------------------------------------------------
> 
> (Updated \u516d\u6708 1, 2016, 10:09 a.m.)
> 
> 
> Review request for sentry, Anne Yu and Dapeng Sun.
> 
> 
> Bugs: SENTRY-1134
>     https://issues.apache.org/jira/browse/SENTRY-1134
> 
> 
> Repository: sentry
> 
> 
> Description
> -------
> 
> Add user defined UDF test, user create a jar then create udf from this jar.
> 
> 
> Diffs
> -----
> 
>   sentry-tests/sentry-tests-hive/src/test/java/org/apache/sentry/tests/e2e/hive/TestPrivilegesAtFunctionScope.java ef7a86c 
>   sentry-tests/sentry-tests-hive/src/test/java/org/apache/sentry/tests/e2e/hive/TestUDF.java PRE-CREATION 
> 
> Diff: https://reviews.apache.org/r/47937/diff/
> 
> 
> Testing
> -------
> 
> Testing
> 
> 
> Thanks,
> 
> Ke Jia
> 
>


Re: Review Request 47937: SENTRY-1134: Add user defined udf test case.

Posted by Ke Jia <ke...@intel.com>.

> On June 3, 2016, 7:43 a.m., Dapeng Sun wrote:
> > sentry-tests/sentry-tests-hive/src/test/java/org/apache/sentry/tests/e2e/hive/TestPrivilegesAtFunctionScope.java, line 116
> > <https://reviews.apache.org/r/47937/diff/2/?file=1401485#file1401485line116>
> >
> >     Could we add a negative test before? for example, user2or3 can't create it.

Thanks dapeng for comment. I have added a negative case.


- Ke


-----------------------------------------------------------
This is an automatically generated e-mail. To reply, visit:
https://reviews.apache.org/r/47937/#review136048
-----------------------------------------------------------


On June 1, 2016, 2:09 a.m., Ke Jia wrote:
> 
> -----------------------------------------------------------
> This is an automatically generated e-mail. To reply, visit:
> https://reviews.apache.org/r/47937/
> -----------------------------------------------------------
> 
> (Updated June 1, 2016, 2:09 a.m.)
> 
> 
> Review request for sentry, Anne Yu and Dapeng Sun.
> 
> 
> Bugs: SENTRY-1134
>     https://issues.apache.org/jira/browse/SENTRY-1134
> 
> 
> Repository: sentry
> 
> 
> Description
> -------
> 
> Add user defined UDF test, user create a jar then create udf from this jar.
> 
> 
> Diffs
> -----
> 
>   sentry-tests/sentry-tests-hive/src/test/java/org/apache/sentry/tests/e2e/hive/TestPrivilegesAtFunctionScope.java ef7a86c 
>   sentry-tests/sentry-tests-hive/src/test/java/org/apache/sentry/tests/e2e/hive/TestUDF.java PRE-CREATION 
> 
> Diff: https://reviews.apache.org/r/47937/diff/
> 
> 
> Testing
> -------
> 
> Testing
> 
> 
> Thanks,
> 
> Ke Jia
> 
>


Re: Review Request 47937: SENTRY-1134: Add user defined udf test case.

Posted by Dapeng Sun <da...@intel.com>.
-----------------------------------------------------------
This is an automatically generated e-mail. To reply, visit:
https://reviews.apache.org/r/47937/#review136048
-----------------------------------------------------------




sentry-tests/sentry-tests-hive/src/test/java/org/apache/sentry/tests/e2e/hive/TestPrivilegesAtFunctionScope.java (line 116)
<https://reviews.apache.org/r/47937/#comment201039>

    Could we add a negative test before? for example, user2or3 can't create it.


Thank Ke, only one comment left

- Dapeng Sun


On \u516d\u6708 1, 2016, 10:09 a.m., Ke Jia wrote:
> 
> -----------------------------------------------------------
> This is an automatically generated e-mail. To reply, visit:
> https://reviews.apache.org/r/47937/
> -----------------------------------------------------------
> 
> (Updated \u516d\u6708 1, 2016, 10:09 a.m.)
> 
> 
> Review request for sentry, Anne Yu and Dapeng Sun.
> 
> 
> Bugs: SENTRY-1134
>     https://issues.apache.org/jira/browse/SENTRY-1134
> 
> 
> Repository: sentry
> 
> 
> Description
> -------
> 
> Add user defined UDF test, user create a jar then create udf from this jar.
> 
> 
> Diffs
> -----
> 
>   sentry-tests/sentry-tests-hive/src/test/java/org/apache/sentry/tests/e2e/hive/TestPrivilegesAtFunctionScope.java ef7a86c 
>   sentry-tests/sentry-tests-hive/src/test/java/org/apache/sentry/tests/e2e/hive/TestUDF.java PRE-CREATION 
> 
> Diff: https://reviews.apache.org/r/47937/diff/
> 
> 
> Testing
> -------
> 
> Testing
> 
> 
> Thanks,
> 
> Ke Jia
> 
>


Re: Review Request 47937: SENTRY-1134: Add user defined udf test case.

Posted by Ke Jia <ke...@intel.com>.
-----------------------------------------------------------
This is an automatically generated e-mail. To reply, visit:
https://reviews.apache.org/r/47937/
-----------------------------------------------------------

(Updated June 1, 2016, 2:09 a.m.)


Review request for sentry, Anne Yu and Dapeng Sun.


Bugs: SENTRY-1134
    https://issues.apache.org/jira/browse/SENTRY-1134


Repository: sentry


Description
-------

Add user defined UDF test, user create a jar then create udf from this jar.


Diffs (updated)
-----

  sentry-tests/sentry-tests-hive/src/test/java/org/apache/sentry/tests/e2e/hive/TestPrivilegesAtFunctionScope.java ef7a86c 
  sentry-tests/sentry-tests-hive/src/test/java/org/apache/sentry/tests/e2e/hive/TestUDF.java PRE-CREATION 

Diff: https://reviews.apache.org/r/47937/diff/


Testing
-------

Testing


Thanks,

Ke Jia