sentry-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From ak...@apache.org
Subject sentry git commit: SENTRY-1726: sql changes to store last notification-id processed (Kalyan Kalvagadda, reviewed by: Hao Hao, Vamsee Yarlagadda, Na Li and Lei Xu)
Date Fri, 12 May 2017 04:24:49 GMT
Repository: sentry
Updated Branches:
  refs/heads/sentry-ha-redesign 6d7677d94 -> 0acd85384


SENTRY-1726: sql changes to store last notification-id processed (Kalyan Kalvagadda, reviewed
by: Hao Hao, Vamsee Yarlagadda, Na Li and Lei Xu)


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

Branch: refs/heads/sentry-ha-redesign
Commit: 0acd85384d0a6d066336122001c71970f8e3138d
Parents: 6d7677d
Author: Alexander Kolbasov <akolb@cloudera.com>
Authored: Thu May 11 21:24:19 2017 -0700
Committer: Alexander Kolbasov <akolb@cloudera.com>
Committed: Thu May 11 21:24:19 2017 -0700

----------------------------------------------------------------------
 .../src/main/resources/008-SENTRY-1569.derby.sql        | 12 +++++++++++-
 .../src/main/resources/008-SENTRY-1569.mysql.sql        |  9 ++++++++-
 .../src/main/resources/008-SENTRY-1569.oracle.sql       |  9 +++++++++
 .../src/main/resources/008-SENTRY-1569.postgres.sql     |  7 +++++++
 .../src/main/resources/sentry-db2-1.8.0.sql             | 11 ++++++++++-
 .../src/main/resources/sentry-derby-1.8.0.sql           | 10 ++++++++++
 .../src/main/resources/sentry-mysql-1.8.0.sql           |  9 ++++++++-
 .../src/main/resources/sentry-oracle-1.8.0.sql          |  9 +++++++++
 .../src/main/resources/sentry-postgres-1.8.0.sql        |  7 +++++++
 .../resources/sentry-upgrade-db2-1.7.0-to-1.8.0.sql     |  9 +++++++++
 10 files changed, 88 insertions(+), 4 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/sentry/blob/0acd8538/sentry-provider/sentry-provider-db/src/main/resources/008-SENTRY-1569.derby.sql
----------------------------------------------------------------------
diff --git a/sentry-provider/sentry-provider-db/src/main/resources/008-SENTRY-1569.derby.sql
b/sentry-provider/sentry-provider-db/src/main/resources/008-SENTRY-1569.derby.sql
index ba70715..2a017ff 100644
--- a/sentry-provider/sentry-provider-db/src/main/resources/008-SENTRY-1569.derby.sql
+++ b/sentry-provider/sentry-provider-db/src/main/resources/008-SENTRY-1569.derby.sql
@@ -20,4 +20,14 @@ CREATE TABLE SENTRY_PATH_CHANGE
 -- Constraints for table SENTRY_PATH_CHANGE for class [org.apache.sentry.provider.db.service.model.MSentryPathChange]
 ALTER TABLE SENTRY_PATH_CHANGE ADD CONSTRAINT SENTRY_PATH_CHANGE_PK PRIMARY KEY (CHANGE_ID);
 
-CREATE UNIQUE INDEX NOTIFICATIONID ON SENTRY_PATH_CHANGE (NOTIFICATION_ID);
\ No newline at end of file
+CREATE UNIQUE INDEX NOTIFICATIONID ON SENTRY_PATH_CHANGE (NOTIFICATION_ID);
+
+
+-- Table SENTRY_HMS_NOTIFICATION_ID for classes [org.apache.sentry.provider.db.service.model.MSentryHmsNotification]
+CREATE TABLE SENTRY_HMS_NOTIFICATION_ID
+(
+    NOTIFICATION_ID BIGINT NOT NULL
+);
+
+-- Constraints for table SENTRY_HMS_NOTIFICATION_ID for class [org.apache.sentry.provider.db.service.model.MSentryHmsNotification]
+ALTER TABLE SENTRY_HMS_NOTIFICATION_ID ADD CONSTRAINT SENTRY_NOTIFICATION_PK PRIMARY KEY
(NOTIFICATION_ID);

http://git-wip-us.apache.org/repos/asf/sentry/blob/0acd8538/sentry-provider/sentry-provider-db/src/main/resources/008-SENTRY-1569.mysql.sql
----------------------------------------------------------------------
diff --git a/sentry-provider/sentry-provider-db/src/main/resources/008-SENTRY-1569.mysql.sql
b/sentry-provider/sentry-provider-db/src/main/resources/008-SENTRY-1569.mysql.sql
index 879e732..b587e40 100644
--- a/sentry-provider/sentry-provider-db/src/main/resources/008-SENTRY-1569.mysql.sql
+++ b/sentry-provider/sentry-provider-db/src/main/resources/008-SENTRY-1569.mysql.sql
@@ -18,4 +18,11 @@ CREATE TABLE `SENTRY_PATH_CHANGE`
 ) ENGINE=INNODB;
 
 -- Constraints for table SENTRY_PATH_CHANGE for class [org.apache.sentry.provider.db.service.model.MSentryPathChange]
-CREATE UNIQUE INDEX `NOTIFICATIONID` ON `SENTRY_PATH_CHANGE` (`NOTIFICATION_ID`);
\ No newline at end of file
+CREATE UNIQUE INDEX `NOTIFICATIONID` ON `SENTRY_PATH_CHANGE` (`NOTIFICATION_ID`);
+
+-- Table SENTRY_HMS_NOTIFICATION_ID for classes [org.apache.sentry.provider.db.service.model.MSentryHmsNotification]
+CREATE TABLE `SENTRY_HMS_NOTIFICATION_ID`
+(
+    `NOTIFICATION_ID` BIGINT NOT NULL,
+    CONSTRAINT `SENTRY_NOTIFICATION_PK` PRIMARY KEY (`NOTIFICATION_ID`)
+)ENGINE=INNODB;
\ No newline at end of file

http://git-wip-us.apache.org/repos/asf/sentry/blob/0acd8538/sentry-provider/sentry-provider-db/src/main/resources/008-SENTRY-1569.oracle.sql
----------------------------------------------------------------------
diff --git a/sentry-provider/sentry-provider-db/src/main/resources/008-SENTRY-1569.oracle.sql
b/sentry-provider/sentry-provider-db/src/main/resources/008-SENTRY-1569.oracle.sql
index e83ab83..860f992 100644
--- a/sentry-provider/sentry-provider-db/src/main/resources/008-SENTRY-1569.oracle.sql
+++ b/sentry-provider/sentry-provider-db/src/main/resources/008-SENTRY-1569.oracle.sql
@@ -20,3 +20,12 @@ CREATE TABLE "SENTRY_PATH_CHANGE"
 -- Constraints for table SENTRY_PATH_CHANGE for class [org.apache.sentry.provider.db.service.model.MSentryPathChange]
 CREATE UNIQUE INDEX "NOTIFICATIONID" ON "SENTRY_PATH_CHANGE" ("NOTIFICATION_ID");
 ALTER TABLE "SENTRY_PATH_CHANGE" ADD CONSTRAINT SENTRY_PATH_CHANGE_PK PRIMARY KEY ("CHANGE_ID");
+
+-- Table SENTRY_HMS_NOTIFICATION_ID for classes [org.apache.sentry.provider.db.service.model.MSentryHmsNotification]
+CREATE TABLE "SENTRY_HMS_NOTIFICATION_ID"
+(
+    "NOTIFICATION_ID" NUMBER NOT NULL
+);
+
+-- Constraints for table SENTRY_HMS_NOTIFICATION_ID for class [org.apache.sentry.provider.db.service.model.MSentryHmsNotification]
+ALTER TABLE "SENTRY_HMS_NOTIFICATION_ID" ADD CONSTRAINT "NOTIFICATION_PRIVILEGE_PK" PRIMARY
KEY ("NOTIFICATION_ID");
\ No newline at end of file

http://git-wip-us.apache.org/repos/asf/sentry/blob/0acd8538/sentry-provider/sentry-provider-db/src/main/resources/008-SENTRY-1569.postgres.sql
----------------------------------------------------------------------
diff --git a/sentry-provider/sentry-provider-db/src/main/resources/008-SENTRY-1569.postgres.sql
b/sentry-provider/sentry-provider-db/src/main/resources/008-SENTRY-1569.postgres.sql
index c28099b..c7c38e3 100644
--- a/sentry-provider/sentry-provider-db/src/main/resources/008-SENTRY-1569.postgres.sql
+++ b/sentry-provider/sentry-provider-db/src/main/resources/008-SENTRY-1569.postgres.sql
@@ -19,3 +19,10 @@ CREATE TABLE "SENTRY_PATH_CHANGE"
 
 -- Constraints for table SENTRY_PATH_CHANGE for class [org.apache.sentry.provider.db.service.model.MSentryPathChange]
 CREATE UNIQUE INDEX "NOTIFICATIONID" ON "SENTRY_PATH_CHANGE" ("NOTIFICATION_ID");
+
+-- Table SENTRY_HMS_NOTIFICATION_ID for classes [org.apache.sentry.provider.db.service.model.MSentryHmsNotification]
+CREATE TABLE "SENTRY_HMS_NOTIFICATION_ID"
+(
+    "NOTIFICATION_ID" bigint NOT NULL,
+    CONSTRAINT "NOTIFICATION_PRIVILEGE_PK" PRIMARY KEY ("NOTIFICATION_ID")
+);

http://git-wip-us.apache.org/repos/asf/sentry/blob/0acd8538/sentry-provider/sentry-provider-db/src/main/resources/sentry-db2-1.8.0.sql
----------------------------------------------------------------------
diff --git a/sentry-provider/sentry-provider-db/src/main/resources/sentry-db2-1.8.0.sql b/sentry-provider/sentry-provider-db/src/main/resources/sentry-db2-1.8.0.sql
index 841dcaa..83cbfe7 100644
--- a/sentry-provider/sentry-provider-db/src/main/resources/sentry-db2-1.8.0.sql
+++ b/sentry-provider/sentry-provider-db/src/main/resources/sentry-db2-1.8.0.sql
@@ -227,4 +227,13 @@ CREATE TABLE SENTRY_PATH_CHANGE
 
 -- Constraints for table SENTRY_PATH_CHANGE for class [org.apache.sentry.provider.db.service.model.MSentryPathChange]
 ALTER TABLE SENTRY_PATH_CHANGE ADD CONSTRAINT SENTRY_PATH_CHANGE_PK PRIMARY KEY (CHANGE_ID);
-CREATE UNIQUE INDEX NOTIFICATIONID ON SENTRY_PATH_CHANGE (NOTIFICATION_ID);
\ No newline at end of file
+CREATE UNIQUE INDEX NOTIFICATIONID ON SENTRY_PATH_CHANGE (NOTIFICATION_ID);
+
+-- Table SENTRY_HMS_NOTIFICATION_ID for classes [org.apache.sentry.provider.db.service.model.MSentryHmsNotification]
+CREATE TABLE SENTRY_HMS_NOTIFICATION_ID
+(
+    NOTIFICATION_ID bigint NOT NULL
+);
+
+-- Constraints for table SENTRY_HMS_NOTIFICATION_ID for class [org.apache.sentry.provider.db.service.model.MSentryHmsNotification]
+ALTER TABLE SENTRY_HMS_NOTIFICATION_ID ADD CONSTRAINT NOTIFICATION_PRIVILEGE_PK PRIMARY KEY
(NOTIFICATION_ID);
\ No newline at end of file

http://git-wip-us.apache.org/repos/asf/sentry/blob/0acd8538/sentry-provider/sentry-provider-db/src/main/resources/sentry-derby-1.8.0.sql
----------------------------------------------------------------------
diff --git a/sentry-provider/sentry-provider-db/src/main/resources/sentry-derby-1.8.0.sql
b/sentry-provider/sentry-provider-db/src/main/resources/sentry-derby-1.8.0.sql
index 223835e..1024e8e 100644
--- a/sentry-provider/sentry-provider-db/src/main/resources/sentry-derby-1.8.0.sql
+++ b/sentry-provider/sentry-provider-db/src/main/resources/sentry-derby-1.8.0.sql
@@ -232,3 +232,13 @@ CREATE TABLE SENTRY_PATH_CHANGE
 -- Constraints for table SENTRY_PATH_CHANGE for class [org.apache.sentry.provider.db.service.model.MSentryPathChange]
 ALTER TABLE SENTRY_PATH_CHANGE ADD CONSTRAINT SENTRY_PATH_CHANGE_PK PRIMARY KEY (CHANGE_ID);
 CREATE UNIQUE INDEX NOTIFICATIONID ON SENTRY_PATH_CHANGE (NOTIFICATION_ID);
+
+
+-- Table SENTRY_HMS_NOTIFICATION_ID for classes [org.apache.sentry.provider.db.service.model.MSentryHmsNotification]
+CREATE TABLE SENTRY_HMS_NOTIFICATION_ID
+(
+    NOTIFICATION_ID BIGINT NOT NULL
+);
+
+-- Constraints for table SENTRY_HMS_NOTIFICATION_ID for class [org.apache.sentry.provider.db.service.model.MSentryHmsNotification]
+ALTER TABLE SENTRY_HMS_NOTIFICATION_ID ADD CONSTRAINT SENTRY_NOTIFICATION_PK PRIMARY KEY
(NOTIFICATION_ID);

http://git-wip-us.apache.org/repos/asf/sentry/blob/0acd8538/sentry-provider/sentry-provider-db/src/main/resources/sentry-mysql-1.8.0.sql
----------------------------------------------------------------------
diff --git a/sentry-provider/sentry-provider-db/src/main/resources/sentry-mysql-1.8.0.sql
b/sentry-provider/sentry-provider-db/src/main/resources/sentry-mysql-1.8.0.sql
index 006d57b..2c7c8b6 100644
--- a/sentry-provider/sentry-provider-db/src/main/resources/sentry-mysql-1.8.0.sql
+++ b/sentry-provider/sentry-provider-db/src/main/resources/sentry-mysql-1.8.0.sql
@@ -268,4 +268,11 @@ CREATE TABLE `SENTRY_PATH_CHANGE`
 ) ENGINE=INNODB;
 
 -- Constraints for table SENTRY_PATH_CHANGE for class [org.apache.sentry.provider.db.service.model.MSentryPathChange]
-CREATE UNIQUE INDEX `NOTIFICATIONID` ON `SENTRY_PATH_CHANGE` (`NOTIFICATION_ID`);
\ No newline at end of file
+CREATE UNIQUE INDEX `NOTIFICATIONID` ON `SENTRY_PATH_CHANGE` (`NOTIFICATION_ID`);
+
+-- Table SENTRY_HMS_NOTIFICATION_ID for classes [org.apache.sentry.provider.db.service.model.MSentryHmsNotification]
+CREATE TABLE `SENTRY_HMS_NOTIFICATION_ID`
+(
+    `NOTIFICATION_ID` BIGINT NOT NULL,
+    CONSTRAINT `SENTRY_NOTIFICATION_PK` PRIMARY KEY (`NOTIFICATION_ID`)
+)ENGINE=INNODB;

http://git-wip-us.apache.org/repos/asf/sentry/blob/0acd8538/sentry-provider/sentry-provider-db/src/main/resources/sentry-oracle-1.8.0.sql
----------------------------------------------------------------------
diff --git a/sentry-provider/sentry-provider-db/src/main/resources/sentry-oracle-1.8.0.sql
b/sentry-provider/sentry-provider-db/src/main/resources/sentry-oracle-1.8.0.sql
index 20921ea..590d48c 100644
--- a/sentry-provider/sentry-provider-db/src/main/resources/sentry-oracle-1.8.0.sql
+++ b/sentry-provider/sentry-provider-db/src/main/resources/sentry-oracle-1.8.0.sql
@@ -248,3 +248,12 @@ CREATE TABLE "SENTRY_PATH_CHANGE"
 -- Constraints for table SENTRY_PATH_CHANGE for class [org.apache.sentry.provider.db.service.model.MSentryPathChange]
 CREATE UNIQUE INDEX "NOTIFICATIONID" ON "SENTRY_PATH_CHANGE" ("NOTIFICATION_ID");
 ALTER TABLE "SENTRY_PATH_CHANGE" ADD CONSTRAINT SENTRY_PATH_CHANGE_PK PRIMARY KEY ("CHANGE_ID");
+
+-- Table SENTRY_HMS_NOTIFICATION_ID for classes [org.apache.sentry.provider.db.service.model.MSentryHmsNotification]
+CREATE TABLE "SENTRY_HMS_NOTIFICATION_ID"
+(
+    "NOTIFICATION_ID" NUMBER NOT NULL
+);
+
+-- Constraints for table SENTRY_HMS_NOTIFICATION_ID for class [org.apache.sentry.provider.db.service.model.MSentryHmsNotification]
+ALTER TABLE "SENTRY_HMS_NOTIFICATION_ID" ADD CONSTRAINT "NOTIFICATION_PRIVILEGE_PK" PRIMARY
KEY ("NOTIFICATION_ID");
\ No newline at end of file

http://git-wip-us.apache.org/repos/asf/sentry/blob/0acd8538/sentry-provider/sentry-provider-db/src/main/resources/sentry-postgres-1.8.0.sql
----------------------------------------------------------------------
diff --git a/sentry-provider/sentry-provider-db/src/main/resources/sentry-postgres-1.8.0.sql
b/sentry-provider/sentry-provider-db/src/main/resources/sentry-postgres-1.8.0.sql
index 489ad66..125be9e 100644
--- a/sentry-provider/sentry-provider-db/src/main/resources/sentry-postgres-1.8.0.sql
+++ b/sentry-provider/sentry-provider-db/src/main/resources/sentry-postgres-1.8.0.sql
@@ -258,4 +258,11 @@ CREATE TABLE "SENTRY_PATH_CHANGE"
 -- Constraints for table SENTRY_PATH_CHANGE for class [org.apache.sentry.provider.db.service.model.MSentryPathChange]
 CREATE UNIQUE INDEX "NOTIFICATIONID" ON "SENTRY_PATH_CHANGE" ("NOTIFICATION_ID");
 
+-- Table SENTRY_HMS_NOTIFICATION_ID for classes [org.apache.sentry.provider.db.service.model.MSentryHmsNotification]
+CREATE TABLE "SENTRY_HMS_NOTIFICATION_ID"
+(
+    "NOTIFICATION_ID" bigint NOT NULL,
+    CONSTRAINT "NOTIFICATION_PRIVILEGE_PK" PRIMARY KEY ("NOTIFICATION_ID")
+);
+
 COMMIT;

http://git-wip-us.apache.org/repos/asf/sentry/blob/0acd8538/sentry-provider/sentry-provider-db/src/main/resources/sentry-upgrade-db2-1.7.0-to-1.8.0.sql
----------------------------------------------------------------------
diff --git a/sentry-provider/sentry-provider-db/src/main/resources/sentry-upgrade-db2-1.7.0-to-1.8.0.sql
b/sentry-provider/sentry-provider-db/src/main/resources/sentry-upgrade-db2-1.7.0-to-1.8.0.sql
index ec50912..c7d11d3 100644
--- a/sentry-provider/sentry-provider-db/src/main/resources/sentry-upgrade-db2-1.7.0-to-1.8.0.sql
+++ b/sentry-provider/sentry-provider-db/src/main/resources/sentry-upgrade-db2-1.7.0-to-1.8.0.sql
@@ -75,5 +75,14 @@ CREATE TABLE SENTRY_PATH_CHANGE
 ALTER TABLE SENTRY_PATH_CHANGE ADD CONSTRAINT SENTRY_PATH_CHANGE_PK PRIMARY KEY (CHANGE_ID);
 CREATE UNIQUE INDEX NOTIFICATIONID ON SENTRY_PATH_CHANGE (NOTIFICATION_ID);
 
+-- Table SENTRY_HMS_NOTIFICATION_ID for classes [org.apache.sentry.provider.db.service.model.MSentryHmsNotification]
+CREATE TABLE SENTRY_HMS_NOTIFICATION_ID
+(
+    NOTIFICATION_ID bigint NOT NULL
+);
+
+-- Constraints for table SENTRY_HMS_NOTIFICATION_ID for class [org.apache.sentry.provider.db.service.model.MSentryHmsNotification]
+ALTER TABLE SENTRY_HMS_NOTIFICATION_ID ADD CONSTRAINT NOTIFICATION_PRIVILEGE_PK PRIMARY KEY
(NOTIFICATION_ID);
+
 -- Version update
 UPDATE SENTRY_VERSION SET SCHEMA_VERSION='1.8.0', VERSION_COMMENT='Sentry release version
1.8.0' WHERE VER_ID=1;


Mime
View raw message