You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@sentry.apache.org by ak...@apache.org on 2017/07/28 17:06:57 UTC

[39/50] [abbrv] sentry git commit: SENTRY-1845 - LOAD + OVERWRITE not supported in Hive v2. plugin - Reviewed by Na Li, Brian Towles, Sergio Pena.

SENTRY-1845 - LOAD + OVERWRITE not supported in Hive v2. plugin
 - Reviewed by Na Li, Brian Towles, Sergio Pena.


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

Branch: refs/heads/master
Commit: 073b9e9f8c1d6a8423c4d29410cc1e0ffa31c8e5
Parents: 4cdb506
Author: Colm O hEigeartaigh <co...@apache.org>
Authored: Wed Jul 19 11:25:40 2017 +0100
Committer: Colm O hEigeartaigh <co...@apache.org>
Committed: Wed Jul 19 11:26:43 2017 +0100

----------------------------------------------------------------------
 .../binding/hive/v2/util/SimpleSemanticAnalyzer.java  | 14 +++++++-------
 1 file changed, 7 insertions(+), 7 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/sentry/blob/073b9e9f/sentry-binding/sentry-binding-hive-v2/src/main/java/org/apache/sentry/binding/hive/v2/util/SimpleSemanticAnalyzer.java
----------------------------------------------------------------------
diff --git a/sentry-binding/sentry-binding-hive-v2/src/main/java/org/apache/sentry/binding/hive/v2/util/SimpleSemanticAnalyzer.java b/sentry-binding/sentry-binding-hive-v2/src/main/java/org/apache/sentry/binding/hive/v2/util/SimpleSemanticAnalyzer.java
index 4a3753b..85afe52 100644
--- a/sentry-binding/sentry-binding-hive-v2/src/main/java/org/apache/sentry/binding/hive/v2/util/SimpleSemanticAnalyzer.java
+++ b/sentry-binding/sentry-binding-hive-v2/src/main/java/org/apache/sentry/binding/hive/v2/util/SimpleSemanticAnalyzer.java
@@ -122,7 +122,7 @@ public class SimpleSemanticAnalyzer {
       + "([A-Za-z0-9._]+)";
 
   private static final String LOAD = "^LOAD\\s+" + "DATA\\s+" + "(LOCAL\\s+)?" + "INPATH\\s+"
-      + "([A-Za-z0-9._':///-]+)" +"\\s" + "INTO\\s" + "TABLE\\s" + "([A-Za-z0-9._]+)";
+      + "([A-Za-z0-9._':///-]+)" +"\\s" + "(OVERWRITE\\s+)?" + "INTO\\s" + "TABLE\\s" + "([A-Za-z0-9._]+)";
 
   /**
    * LOCK DATABASE dbname;
@@ -279,7 +279,7 @@ public class SimpleSemanticAnalyzer {
       String tbName = matcher.group(matcher.groupCount());
       extractDbAndTb(tbName.trim());
     } else {
-      throw new HiveAuthzPluginException("this command " + cmd + " is not match table meta grammar");
+      throw new HiveAuthzPluginException("this command " + cmd + " does not match the table meta grammar");
     }
   }
 
@@ -291,7 +291,7 @@ public class SimpleSemanticAnalyzer {
       currentDb = dbName;
       currentTb = Table.SOME.getName();
     } else {
-      throw new HiveAuthzPluginException("this command " + cmd + " is not match table meta grammar");
+      throw new HiveAuthzPluginException("this command " + cmd + " does not match the table meta grammar");
     }
   }
 
@@ -313,7 +313,7 @@ public class SimpleSemanticAnalyzer {
       currentDb = matcher.group(matcher.groupCount());
     } else {
       throw new HiveAuthzPluginException("this command " + cmd
-          + " is not match database meta grammar");
+          + " does not match the database meta grammar");
     }
   }
 
@@ -324,7 +324,7 @@ public class SimpleSemanticAnalyzer {
       String tbName = matcher.group(matcher.groupCount());
       extractDbAndTb(tbName.trim());
     } else {
-      throw new HiveAuthzPluginException("this command " + cmd + " is not match table meta grammar");
+      throw new HiveAuthzPluginException("this command " + cmd + " does not match the table meta grammar");
     }
   }
 
@@ -341,7 +341,7 @@ public class SimpleSemanticAnalyzer {
         extractDbAndTb(tbName);
       }
     } else {
-      throw new HiveAuthzPluginException("this command " + cmd + " is not match show index grammar");
+      throw new HiveAuthzPluginException("this command " + cmd + " does not match the show index grammar");
     }
   }
 
@@ -357,7 +357,7 @@ public class SimpleSemanticAnalyzer {
       }
     } else {
       throw new HiveAuthzPluginException("this command " + cmd
-          + " is not match create function grammar");
+          + " does not match the create function grammar");
     }
   }