sentry-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From vam...@apache.org
Subject [18/52] [abbrv] sentry git commit: SENTRY-1726: sql changes to store last notification-id processed
Date Wed, 14 Jun 2017 00:56:56 GMT
SENTRY-1726: sql changes to store last notification-id processed

CDH-53800 (Backport)

Change-Id: I6d7c4da55d6f5daed180c9c9c6b5dffb4b9ea1d5
Reviewed-on: http://gerrit.sjc.cloudera.com:8080/22596
Tested-by: Jenkins User
Reviewed-by: Kalyan Kumar Kalvagadda <kkalyan@cloudera.com>


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

Branch: refs/for/cdh5-1.5.1_ha
Commit: 18feedf2f8be651ee47f11927d21fe422691361c
Parents: 451de28
Author: Alexander Kolbasov <akolb@cloudera.com>
Authored: Thu May 11 21:24:19 2017 -0700
Committer: Kalyan Kumar Kalvagadda <kkalyan@cloudera.com>
Committed: Fri May 12 17:07:11 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.5.0-cdh5.sql        | 11 ++++++++++-
 .../src/main/resources/sentry-derby-1.5.0-cdh5.sql      | 10 ++++++++++
 .../src/main/resources/sentry-mysql-1.5.0-cdh5.sql      |  9 ++++++++-
 .../src/main/resources/sentry-oracle-1.5.0-cdh5.sql     |  9 +++++++++
 .../src/main/resources/sentry-postgres-1.5.0-cdh5.sql   |  7 +++++++
 .../sentry-upgrade-db2-1.5.0-to-1.5.0-cdh5.sql          |  9 +++++++++
 10 files changed, 88 insertions(+), 4 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/sentry/blob/18feedf2/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/18feedf2/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/18feedf2/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/18feedf2/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/18feedf2/sentry-provider/sentry-provider-db/src/main/resources/sentry-db2-1.5.0-cdh5.sql
----------------------------------------------------------------------
diff --git a/sentry-provider/sentry-provider-db/src/main/resources/sentry-db2-1.5.0-cdh5.sql
b/sentry-provider/sentry-provider-db/src/main/resources/sentry-db2-1.5.0-cdh5.sql
index af3d7f0..67a89f7 100644
--- a/sentry-provider/sentry-provider-db/src/main/resources/sentry-db2-1.5.0-cdh5.sql
+++ b/sentry-provider/sentry-provider-db/src/main/resources/sentry-db2-1.5.0-cdh5.sql
@@ -199,4 +199,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/18feedf2/sentry-provider/sentry-provider-db/src/main/resources/sentry-derby-1.5.0-cdh5.sql
----------------------------------------------------------------------
diff --git a/sentry-provider/sentry-provider-db/src/main/resources/sentry-derby-1.5.0-cdh5.sql
b/sentry-provider/sentry-provider-db/src/main/resources/sentry-derby-1.5.0-cdh5.sql
index c026beb..9c3d1ba 100644
--- a/sentry-provider/sentry-provider-db/src/main/resources/sentry-derby-1.5.0-cdh5.sql
+++ b/sentry-provider/sentry-provider-db/src/main/resources/sentry-derby-1.5.0-cdh5.sql
@@ -204,3 +204,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/18feedf2/sentry-provider/sentry-provider-db/src/main/resources/sentry-mysql-1.5.0-cdh5.sql
----------------------------------------------------------------------
diff --git a/sentry-provider/sentry-provider-db/src/main/resources/sentry-mysql-1.5.0-cdh5.sql
b/sentry-provider/sentry-provider-db/src/main/resources/sentry-mysql-1.5.0-cdh5.sql
index d18bf0d..11fe4d3 100644
--- a/sentry-provider/sentry-provider-db/src/main/resources/sentry-mysql-1.5.0-cdh5.sql
+++ b/sentry-provider/sentry-provider-db/src/main/resources/sentry-mysql-1.5.0-cdh5.sql
@@ -239,4 +239,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/18feedf2/sentry-provider/sentry-provider-db/src/main/resources/sentry-oracle-1.5.0-cdh5.sql
----------------------------------------------------------------------
diff --git a/sentry-provider/sentry-provider-db/src/main/resources/sentry-oracle-1.5.0-cdh5.sql
b/sentry-provider/sentry-provider-db/src/main/resources/sentry-oracle-1.5.0-cdh5.sql
index 207b300..5179101 100644
--- a/sentry-provider/sentry-provider-db/src/main/resources/sentry-oracle-1.5.0-cdh5.sql
+++ b/sentry-provider/sentry-provider-db/src/main/resources/sentry-oracle-1.5.0-cdh5.sql
@@ -219,3 +219,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/18feedf2/sentry-provider/sentry-provider-db/src/main/resources/sentry-postgres-1.5.0-cdh5.sql
----------------------------------------------------------------------
diff --git a/sentry-provider/sentry-provider-db/src/main/resources/sentry-postgres-1.5.0-cdh5.sql
b/sentry-provider/sentry-provider-db/src/main/resources/sentry-postgres-1.5.0-cdh5.sql
index e0bfed0..4acb0c6 100644
--- a/sentry-provider/sentry-provider-db/src/main/resources/sentry-postgres-1.5.0-cdh5.sql
+++ b/sentry-provider/sentry-provider-db/src/main/resources/sentry-postgres-1.5.0-cdh5.sql
@@ -229,4 +229,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/18feedf2/sentry-provider/sentry-provider-db/src/main/resources/sentry-upgrade-db2-1.5.0-to-1.5.0-cdh5.sql
----------------------------------------------------------------------
diff --git a/sentry-provider/sentry-provider-db/src/main/resources/sentry-upgrade-db2-1.5.0-to-1.5.0-cdh5.sql
b/sentry-provider/sentry-provider-db/src/main/resources/sentry-upgrade-db2-1.5.0-to-1.5.0-cdh5.sql
index 7eb47d5..61a3503 100644
--- a/sentry-provider/sentry-provider-db/src/main/resources/sentry-upgrade-db2-1.5.0-to-1.5.0-cdh5.sql
+++ b/sentry-provider/sentry-provider-db/src/main/resources/sentry-upgrade-db2-1.5.0-to-1.5.0-cdh5.sql
@@ -46,5 +46,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.5.0-cdh5', VERSION_COMMENT='Sentry release version
1.5.0-cdh5' WHERE VER_ID=1;
\ No newline at end of file


Mime
View raw message