You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@ranger.apache.org by ga...@apache.org on 2016/11/07 10:58:19 UTC
incubator-ranger git commit: RANGER-1197: track downloaded and active
policy/tag versions in plugins
Repository: incubator-ranger
Updated Branches:
refs/heads/master 5fe203f59 -> 3c395a53e
RANGER-1197: track downloaded and active policy/tag versions in plugins
Signed-off-by: Gautam Borad <ga...@apache.org>
Project: http://git-wip-us.apache.org/repos/asf/incubator-ranger/repo
Commit: http://git-wip-us.apache.org/repos/asf/incubator-ranger/commit/3c395a53
Tree: http://git-wip-us.apache.org/repos/asf/incubator-ranger/tree/3c395a53
Diff: http://git-wip-us.apache.org/repos/asf/incubator-ranger/diff/3c395a53
Branch: refs/heads/master
Commit: 3c395a53e3d9dc7a21be08765f4293ed9fdb5133
Parents: 5fe203f
Author: pradeep agrawal <pr...@freestoneinfotech.com>
Authored: Mon Nov 7 14:56:38 2016 +0530
Committer: Gautam Borad <ga...@apache.org>
Committed: Mon Nov 7 16:27:52 2016 +0530
----------------------------------------------------------------------
.../025-create-schema-for-plugin-info.sql | 16 ++---
.../025-create-schema-for-plugin-info.sql | 32 ++++++++++
.../025-create-schema-for-plugin-info.sql | 12 ++--
.../025-create-schema-for-plugin-info.sql | 33 ++++++++++
.../025-create-schema-for-plugin-info.sql | 65 ++++++++++++++++++++
5 files changed, 144 insertions(+), 14 deletions(-)
----------------------------------------------------------------------
http://git-wip-us.apache.org/repos/asf/incubator-ranger/blob/3c395a53/security-admin/db/mysql/patches/025-create-schema-for-plugin-info.sql
----------------------------------------------------------------------
diff --git a/security-admin/db/mysql/patches/025-create-schema-for-plugin-info.sql b/security-admin/db/mysql/patches/025-create-schema-for-plugin-info.sql
index 732f2cf..85d1f0a 100644
--- a/security-admin/db/mysql/patches/025-create-schema-for-plugin-info.sql
+++ b/security-admin/db/mysql/patches/025-create-schema-for-plugin-info.sql
@@ -16,18 +16,18 @@
DROP TABLE IF EXISTS `x_plugin_info`;
-CREATE TABLE x_plugin_info (
+CREATE TABLE IF NOT EXISTS `x_plugin_info`(
`id` bigint(20) NOT NULL AUTO_INCREMENT,
-`create_time` datetime NOT NULL,
-`update_time` datetime NOT NULL,
+`create_time` datetime NULL DEFAULT NULL,
+`update_time` datetime NULL DEFAULT NULL,
`service_name` varchar(255) NOT NULL,
`app_type` varchar(128) NOT NULL,
-`host_name` varchar(64) NOT NULL,
+`host_name` varchar(255) NOT NULL,
`ip_address` varchar(64) NOT NULL,
`info` varchar(1024) NOT NULL,
PRIMARY KEY (`id`),
- CREATE UNIQUE INDEX x_plugin_info_IDX_unique ON x_plugin_info(service_name, host_name, app_type),
- CREATE INDEX x_plugin_info_IDX_service_name ON x_plugin_info(service_name),
- CREATE INDEX x_plugin_info_IDX_host_name ON x_plugin_info(host_name)
-) ENGINE=InnoDB DEFAULT CHARSET=latin1;
+ UNIQUE KEY `x_plugin_info_UK`(`service_name`, `host_name`, `app_type`),
+ KEY `x_plugin_info_IDX_service_name`(`service_name`),
+ KEY `x_plugin_info_IDX_host_name`(`host_name`)
+);
http://git-wip-us.apache.org/repos/asf/incubator-ranger/blob/3c395a53/security-admin/db/oracle/patches/025-create-schema-for-plugin-info.sql
----------------------------------------------------------------------
diff --git a/security-admin/db/oracle/patches/025-create-schema-for-plugin-info.sql b/security-admin/db/oracle/patches/025-create-schema-for-plugin-info.sql
new file mode 100644
index 0000000..bedd0a2
--- /dev/null
+++ b/security-admin/db/oracle/patches/025-create-schema-for-plugin-info.sql
@@ -0,0 +1,32 @@
+-- Licensed to the Apache Software Foundation (ASF) under one or more
+-- contributor license agreements. See the NOTICE file distributed with
+-- this work for additional information regarding copyright ownership.
+-- The ASF licenses this file to You under the Apache License, Version 2.0
+-- (the "License"); you may not use this file except in compliance with
+-- the License. You may obtain a copy of the License at
+--
+-- http://www.apache.org/licenses/LICENSE-2.0
+--
+-- Unless required by applicable law or agreed to in writing, software
+-- distributed under the License is distributed on an "AS IS" BASIS,
+-- WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+-- See the License for the specific language governing permissions and
+-- limitations under the License.
+
+/
+CREATE SEQUENCE X_PLUGIN_INFO_SEQ START WITH 1 INCREMENT BY 1 NOCACHE NOCYCLE;
+CREATE TABLE x_plugin_info(
+id NUMBER(20) NOT NULL,
+create_time DATE DEFAULT NULL NULL,
+update_time DATE DEFAULT NULL NULL,
+service_name VARCHAR(255) NOT NULL,
+app_type VARCHAR(128) NOT NULL,
+host_name VARCHAR(255) NOT NULL,
+ip_address VARCHAR(64) NOT NULL,
+info VARCHAR(1024) NOT NULL,
+PRIMARY KEY (id),
+CONSTRAINT x_plugin_info_UK UNIQUE (service_name, host_name, app_type)
+);
+CREATE INDEX x_plugin_info_IDX_service_name ON x_plugin_info(service_name);
+CREATE INDEX x_plugin_info_IDX_host_name ON x_plugin_info(host_name);
+commit;
\ No newline at end of file
http://git-wip-us.apache.org/repos/asf/incubator-ranger/blob/3c395a53/security-admin/db/postgres/patches/025-create-schema-for-plugin-info.sql
----------------------------------------------------------------------
diff --git a/security-admin/db/postgres/patches/025-create-schema-for-plugin-info.sql b/security-admin/db/postgres/patches/025-create-schema-for-plugin-info.sql
index 1b12915..c780060 100644
--- a/security-admin/db/postgres/patches/025-create-schema-for-plugin-info.sql
+++ b/security-admin/db/postgres/patches/025-create-schema-for-plugin-info.sql
@@ -13,23 +13,23 @@
-- See the License for the specific language governing permissions and
-- limitations under the License.
-DROP TABLE IF EXISTS x_plugin_info;
+DROP TABLE IF EXISTS x_plugin_info CASCADE;
DROP SEQUENCE IF EXISTS x_plugin_info_seq;
CREATE SEQUENCE x_plugin_info_seq;
CREATE TABLE x_plugin_info (
id BIGINT DEFAULT nextval('x_plugin_info_seq'::regclass),
-create_time TIMESTAMP NOT NULL,
-update_time TIMESTAMP NOT NULL,
+create_time TIMESTAMP DEFAULT NULL NULL,
+update_time TIMESTAMP DEFAULT NULL NULL,
service_name varchar(255) NOT NULL,
app_type varchar(128) NOT NULL,
-host_name varchar(64) NOT NULL,
+host_name varchar(255) NOT NULL,
ip_address varchar(64) NOT NULL,
info varchar(1024) NOT NULL,
-primary key (id)
+primary key (id),
+CONSTRAINT x_plugin_info_UK UNIQUE (service_name, host_name, app_type)
);
-CREATE UNIQUE INDEX x_plugin_info_IDX_unique ON x_plugin_info(service_name, host_name, app_type);
CREATE INDEX x_plugin_info_IDX_service_name ON x_plugin_info(service_name);
CREATE INDEX x_plugin_info_IDX_host_name ON x_plugin_info(host_name);
http://git-wip-us.apache.org/repos/asf/incubator-ranger/blob/3c395a53/security-admin/db/sqlanywhere/patches/025-create-schema-for-plugin-info.sql
----------------------------------------------------------------------
diff --git a/security-admin/db/sqlanywhere/patches/025-create-schema-for-plugin-info.sql b/security-admin/db/sqlanywhere/patches/025-create-schema-for-plugin-info.sql
new file mode 100644
index 0000000..6e94779
--- /dev/null
+++ b/security-admin/db/sqlanywhere/patches/025-create-schema-for-plugin-info.sql
@@ -0,0 +1,33 @@
+-- Licensed to the Apache Software Foundation (ASF) under one or more
+-- contributor license agreements. See the NOTICE file distributed with
+-- this work for additional information regarding copyright ownership.
+-- The ASF licenses this file to You under the Apache License, Version 2.0
+-- (the "License"); you may not use this file except in compliance with
+-- the License. You may obtain a copy of the License at
+--
+-- http://www.apache.org/licenses/LICENSE-2.0
+--
+-- Unless required by applicable law or agreed to in writing, software
+-- distributed under the License is distributed on an "AS IS" BASIS,
+-- WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+-- See the License for the specific language governing permissions and
+-- limitations under the License.
+
+CREATE TABLE dbo.x_plugin_info(
+ id bigint IDENTITY NOT NULL,
+ create_time datetime DEFAULT NULL NULL,
+ update_time datetime DEFAULT NULL NULL,
+ service_name varchar(255) NOT NULL,
+ app_type varchar(128) NOT NULL,
+ host_name varchar(255) NOT NULL,
+ ip_address varchar(64) NOT NULL,
+ info varchar(1024) NOT NULL,
+ CONSTRAINT x_plugin_info_PK_id PRIMARY KEY CLUSTERED(id),
+ CONSTRAINT x_plugin_info_UK UNIQUE NONCLUSTERED (service_name, host_name, app_type)
+)
+GO
+CREATE NONCLUSTERED INDEX x_plugin_info_IDX_service_name ON dbo.x_plugin_info(service_name ASC)
+GO
+CREATE NONCLUSTERED INDEX x_plugin_info_IDX_host_name ON dbo.x_plugin_info(host_name ASC)
+GO
+exit
http://git-wip-us.apache.org/repos/asf/incubator-ranger/blob/3c395a53/security-admin/db/sqlserver/patches/025-create-schema-for-plugin-info.sql
----------------------------------------------------------------------
diff --git a/security-admin/db/sqlserver/patches/025-create-schema-for-plugin-info.sql b/security-admin/db/sqlserver/patches/025-create-schema-for-plugin-info.sql
new file mode 100644
index 0000000..07723e3
--- /dev/null
+++ b/security-admin/db/sqlserver/patches/025-create-schema-for-plugin-info.sql
@@ -0,0 +1,65 @@
+-- Licensed to the Apache Software Foundation (ASF) under one or more
+-- contributor license agreements. See the NOTICE file distributed with
+-- this work for additional information regarding copyright ownership.
+-- The ASF licenses this file to You under the Apache License, Version 2.0
+-- (the "License"); you may not use this file except in compliance with
+-- the License. You may obtain a copy of the License at
+--
+-- http://www.apache.org/licenses/LICENSE-2.0
+--
+-- Unless required by applicable law or agreed to in writing, software
+-- distributed under the License is distributed on an "AS IS" BASIS,
+-- WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+-- See the License for the specific language governing permissions and
+-- limitations under the License.
+
+GO
+IF (OBJECT_ID('x_plugin_info_UK') IS NOT NULL)
+BEGIN
+ ALTER TABLE [dbo].[x_plugin_info] DROP CONSTRAINT x_plugin_info_UK
+END
+GO
+IF (OBJECT_ID('x_plugin_info') IS NOT NULL)
+BEGIN
+ DROP TABLE [dbo].[x_plugin_info]
+END
+GO
+SET ANSI_NULLS ON
+GO
+SET QUOTED_IDENTIFIER ON
+GO
+SET ANSI_PADDING ON
+GO
+CREATE TABLE [dbo].[x_plugin_info](
+ [id] [bigint] IDENTITY(1,1) NOT NULL,
+ [create_time] [datetime2] DEFAULT NULL NULL,
+ [update_time] [datetime2] DEFAULT NULL NULL,
+ [service_name] [varchar](255) NOT NULL,
+ [app_type] [varchar](128) NOT NULL,
+ [host_name] [varchar](255) NOT NULL,
+ [ip_address] [varchar](64) NOT NULL,
+ [info] [varchar](1024) NOT NULL,
+ PRIMARY KEY CLUSTERED
+(
+ [id] ASC
+)WITH (PAD_INDEX = OFF, STATISTICS_NORECOMPUTE = OFF, IGNORE_DUP_KEY = OFF, ALLOW_ROW_LOCKS = ON, ALLOW_PAGE_LOCKS = ON) ON [PRIMARY],
+CONSTRAINT [x_plugin_info$x_plugin_info_UK] UNIQUE NONCLUSTERED
+(
+ [service_name] ASC, [host_name] ASC, [app_type] ASC
+)WITH (PAD_INDEX = OFF,STATISTICS_NORECOMPUTE = OFF,IGNORE_DUP_KEY = OFF,ALLOW_ROW_LOCKS = ON,ALLOW_PAGE_LOCKS = ON) ON [PRIMARY]
+) ON [PRIMARY]
+GO
+CREATE NONCLUSTERED INDEX [x_plugin_info_IDX_service_name] ON [x_plugin_info]
+(
+ [service_name] ASC
+)
+WITH (SORT_IN_TEMPDB = OFF, DROP_EXISTING = OFF, IGNORE_DUP_KEY = OFF, ONLINE = OFF) ON [PRIMARY]
+GO
+CREATE NONCLUSTERED INDEX [x_plugin_info_IDX_host_name] ON [x_plugin_info]
+(
+ [host_name] ASC
+)
+WITH (SORT_IN_TEMPDB = OFF, DROP_EXISTING = OFF, IGNORE_DUP_KEY = OFF, ONLINE = OFF) ON [PRIMARY]
+GO
+
+exit