Repository: incubator-sentry Updated Branches: refs/heads/master 1cd882208 -> 642037105
SENTRY-487: TestPrivilegesAtFunctionScope fails on the real cluster (Prasad Mujumdar, reviewed by Lenni Kuff) Project: http://git-wip-us.apache.org/repos/asf/incubator-sentry/repo Commit: http://git-wip-us.apache.org/repos/asf/incubator-sentry/commit/64203710 Tree: http://git-wip-us.apache.org/repos/asf/incubator-sentry/tree/64203710 Diff: http://git-wip-us.apache.org/repos/asf/incubator-sentry/diff/64203710 Branch: refs/heads/master Commit: 64203710529cd301018faa12e92bd7df24065faa Parents: 1cd8822 Author: Prasad Mujumdar <[email protected]> Authored: Thu Oct 2 11:07:37 2014 -0700 Committer: Prasad Mujumdar <[email protected]> Committed: Thu Oct 2 11:07:37 2014 -0700 ---------------------------------------------------------------------- .../sentry/tests/e2e/hive/TestPrivilegesAtFunctionScope.java | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) ---------------------------------------------------------------------- http://git-wip-us.apache.org/repos/asf/incubator-sentry/blob/64203710/sentry-tests/sentry-tests-hive/src/test/java/org/apache/sentry/tests/e2e/hive/TestPrivilegesAtFunctionScope.java ---------------------------------------------------------------------- diff --git a/sentry-tests/sentry-tests-hive/src/test/java/org/apache/sentry/tests/e2e/hive/TestPrivilegesAtFunctionScope.java b/sentry-tests/sentry-tests-hive/src/test/java/org/apache/sentry/tests/e2e/hive/TestPrivilegesAtFunctionScope.java index 8325a5c..dc99fda 100644 --- a/sentry-tests/sentry-tests-hive/src/test/java/org/apache/sentry/tests/e2e/hive/TestPrivilegesAtFunctionScope.java +++ b/sentry-tests/sentry-tests-hive/src/test/java/org/apache/sentry/tests/e2e/hive/TestPrivilegesAtFunctionScope.java @@ -85,7 +85,8 @@ public class TestPrivilegesAtFunctionScope extends AbstractTestWithStaticConfigu .addPermissionsToRole("db1_all", "server=server1->db=" + DB1) .addPermissionsToRole("db1_tab1", "server=server1->db=" + DB1 + "->table=" + tableName1) .addPermissionsToRole("UDF_JAR", "server=server1->uri=file://" + udfLocation) - .addPermissionsToRole("data_read", "server=server1->URI=file://" + dataFile.getPath()); + .addPermissionsToRole("data_read", "server=server1->URI=" + + fileSystem.getDefaultUri(fileSystem.getConf()) + "/tmp"); writePolicyFile(policyFile); // user1 should be able create/drop temp functions @@ -105,7 +106,7 @@ public class TestPrivilegesAtFunctionScope extends AbstractTestWithStaticConfigu // test perm UDF with 'using file' syntax statement .execute("CREATE FUNCTION printf_test_perm AS 'org.apache.hadoop.hive.ql.udf.generic.GenericUDFPrintf' " - + " using file '" + "file://" + dataFile.getPath() + "'"); + + " using file '" + fileSystem.getDefaultUri(fileSystem.getConf()) + "/tmp" + "'"); statement.execute("DROP FUNCTION printf_test_perm"); context.close();
