You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@sentry.apache.org by ja...@apache.org on 2014/06/11 06:00:13 UTC

git commit: SENTRY-284: Create test for creating external partition

Repository: incubator-sentry
Updated Branches:
  refs/heads/master b8fd11f4c -> 13587ef40


SENTRY-284: Create test for creating external partition

(Prasad Mujumdar via Jarek Jarcec Cecho)


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

Branch: refs/heads/master
Commit: 13587ef40e72e8fc16821890bfa97ebe568dfc34
Parents: b8fd11f
Author: Jarek Jarcec Cecho <ja...@apache.org>
Authored: Tue Jun 10 20:59:14 2014 -0700
Committer: Jarek Jarcec Cecho <ja...@apache.org>
Committed: Tue Jun 10 20:59:53 2014 -0700

----------------------------------------------------------------------
 .../apache/sentry/binding/metastore/MetastoreAuthzBinding.java    | 3 ++-
 1 file changed, 2 insertions(+), 1 deletion(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/incubator-sentry/blob/13587ef4/sentry-binding/sentry-binding-hive/src/main/java/org/apache/sentry/binding/metastore/MetastoreAuthzBinding.java
----------------------------------------------------------------------
diff --git a/sentry-binding/sentry-binding-hive/src/main/java/org/apache/sentry/binding/metastore/MetastoreAuthzBinding.java b/sentry-binding/sentry-binding-hive/src/main/java/org/apache/sentry/binding/metastore/MetastoreAuthzBinding.java
index 197017b..30c3488 100644
--- a/sentry-binding/sentry-binding-hive/src/main/java/org/apache/sentry/binding/metastore/MetastoreAuthzBinding.java
+++ b/sentry-binding/sentry-binding-hive/src/main/java/org/apache/sentry/binding/metastore/MetastoreAuthzBinding.java
@@ -17,6 +17,7 @@
  */
 package org.apache.sentry.binding.metastore;
 
+import java.io.File;
 import java.io.IOException;
 import java.net.MalformedURLException;
 import java.net.URL;
@@ -251,7 +252,7 @@ public class MetastoreAuthzBinding extends MetaStorePreEventListener {
           .getHandler()
           .get_table(context.getPartition().getDbName(),
               context.getPartition().getTableName()).getSd().getLocation();
-      if (!partitionLocation.startsWith(tableLocation)) {
+      if (!partitionLocation.startsWith(tableLocation + File.separator)) {
         inputBuilder.addUriToOutput(getAuthServer(), context.getPartition()
           .getSd().getLocation());
       }