You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@sentry.apache.org by pr...@apache.org on 2014/09/20 00:27:59 UTC

git commit: SENTRY-452: Uri tests failing on real cluster (Sravya Tirukkovalur via Prasad Mujumdar)

Repository: incubator-sentry
Updated Branches:
  refs/heads/master d93ec7c1a -> f7f40b944


SENTRY-452: Uri tests failing on real cluster (Sravya Tirukkovalur via Prasad Mujumdar)


Project: http://git-wip-us.apache.org/repos/asf/incubator-sentry/repo
Commit: http://git-wip-us.apache.org/repos/asf/incubator-sentry/commit/f7f40b94
Tree: http://git-wip-us.apache.org/repos/asf/incubator-sentry/tree/f7f40b94
Diff: http://git-wip-us.apache.org/repos/asf/incubator-sentry/diff/f7f40b94

Branch: refs/heads/master
Commit: f7f40b94428181bd06431f1bc60118d052f40f12
Parents: d93ec7c
Author: Prasad Mujumdar <pr...@cloudera.com>
Authored: Fri Sep 19 15:27:57 2014 -0700
Committer: Prasad Mujumdar <pr...@cloudera.com>
Committed: Fri Sep 19 15:27:57 2014 -0700

----------------------------------------------------------------------
 .../main/java/org/apache/sentry/core/common/utils/PathUtils.java   | 2 ++
 1 file changed, 2 insertions(+)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/incubator-sentry/blob/f7f40b94/sentry-core/sentry-core-common/src/main/java/org/apache/sentry/core/common/utils/PathUtils.java
----------------------------------------------------------------------
diff --git a/sentry-core/sentry-core-common/src/main/java/org/apache/sentry/core/common/utils/PathUtils.java b/sentry-core/sentry-core-common/src/main/java/org/apache/sentry/core/common/utils/PathUtils.java
index 2e211f8..1cdbdb8 100644
--- a/sentry-core/sentry-core-common/src/main/java/org/apache/sentry/core/common/utils/PathUtils.java
+++ b/sentry-core/sentry-core-common/src/main/java/org/apache/sentry/core/common/utils/PathUtils.java
@@ -109,6 +109,8 @@ public class PathUtils {
     } else {
       if (uri.startsWith("file:")) {
         uri = uri.replace("file:", "file://");
+      } if (uri.startsWith("hdfs:")) {
+        uri = uri.replace("hdfs:", "hdfs://");
       } else if (uri.startsWith("/")) {
         if (warehouseDir.startsWith("hdfs:")) {
           URI warehouse = toDFSURI(warehouseDir);