Repository: incubator-ranger Updated Branches: refs/heads/master 4b0fd5dc8 -> 2e2bdd8a1
RANGER-379: build is broken due to a API change in Hive - fixed api call Project: http://git-wip-us.apache.org/repos/asf/incubator-ranger/repo Commit: http://git-wip-us.apache.org/repos/asf/incubator-ranger/commit/f2ed9819 Tree: http://git-wip-us.apache.org/repos/asf/incubator-ranger/tree/f2ed9819 Diff: http://git-wip-us.apache.org/repos/asf/incubator-ranger/diff/f2ed9819 Branch: refs/heads/master Commit: f2ed981966246e4cfb15e94b9639618108e14b7f Parents: 4b0fd5d Author: sneethiraj <[email protected]> Authored: Wed Apr 8 07:51:30 2015 -0400 Committer: sneethiraj <[email protected]> Committed: Wed Apr 8 07:51:30 2015 -0400 ---------------------------------------------------------------------- .../authorization/hive/authorizer/RangerHiveAuthorizer.java | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) ---------------------------------------------------------------------- http://git-wip-us.apache.org/repos/asf/incubator-ranger/blob/f2ed9819/hive-agent/src/main/java/org/apache/ranger/authorization/hive/authorizer/RangerHiveAuthorizer.java ---------------------------------------------------------------------- diff --git a/hive-agent/src/main/java/org/apache/ranger/authorization/hive/authorizer/RangerHiveAuthorizer.java b/hive-agent/src/main/java/org/apache/ranger/authorization/hive/authorizer/RangerHiveAuthorizer.java index 9dcc33d..98532a9 100644 --- a/hive-agent/src/main/java/org/apache/ranger/authorization/hive/authorizer/RangerHiveAuthorizer.java +++ b/hive-agent/src/main/java/org/apache/ranger/authorization/hive/authorizer/RangerHiveAuthorizer.java @@ -757,8 +757,9 @@ public class RangerHiveAuthorizer extends RangerHiveAuthorizerBase { try { Path filePath = new Path(uri); FileSystem fs = FileSystem.get(filePath.toUri(), conf); - Path path = FileUtils.getPathOrParentThatExists(fs, filePath); - FileStatus fileStatus = fs.getFileStatus(path); + // Path path = FileUtils.getPathOrParentThatExists(fs, filePath); + // FileStatus fileStatus = fs.getFileStatus(path); + FileStatus fileStatus = FileUtils.getPathOrParentThatExists(fs, filePath); if (FileUtils.isOwnerOfFileHierarchy(fs, fileStatus, userName)) { ret = true;
