ambari-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From mpapirkovs...@apache.org
Subject ambari git commit: AMBARI-12976. DDL create script for SQLA is outdated. (mpapirkovskyy)
Date Wed, 02 Sep 2015 13:31:42 GMT
Repository: ambari
Updated Branches:
  refs/heads/trunk c93d2b932 -> 32d485ae1


AMBARI-12976. DDL create script for SQLA is outdated. (mpapirkovskyy)


Project: http://git-wip-us.apache.org/repos/asf/ambari/repo
Commit: http://git-wip-us.apache.org/repos/asf/ambari/commit/32d485ae
Tree: http://git-wip-us.apache.org/repos/asf/ambari/tree/32d485ae
Diff: http://git-wip-us.apache.org/repos/asf/ambari/diff/32d485ae

Branch: refs/heads/trunk
Commit: 32d485ae169da97272c555eea9a2b3c774bd0a51
Parents: c93d2b9
Author: Myroslav Papirkovskyy <mpapyrkovskyy@hortonworks.com>
Authored: Wed Sep 2 16:17:29 2015 +0300
Committer: Myroslav Papirkovskyy <mpapyrkovskyy@hortonworks.com>
Committed: Wed Sep 2 16:17:29 2015 +0300

----------------------------------------------------------------------
 .../src/main/resources/Ambari-DDL-SQLAnywhere-CREATE.sql       | 6 +++++-
 1 file changed, 5 insertions(+), 1 deletion(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/ambari/blob/32d485ae/ambari-server/src/main/resources/Ambari-DDL-SQLAnywhere-CREATE.sql
----------------------------------------------------------------------
diff --git a/ambari-server/src/main/resources/Ambari-DDL-SQLAnywhere-CREATE.sql b/ambari-server/src/main/resources/Ambari-DDL-SQLAnywhere-CREATE.sql
index 8abd6ab..97b5e11 100644
--- a/ambari-server/src/main/resources/Ambari-DDL-SQLAnywhere-CREATE.sql
+++ b/ambari-server/src/main/resources/Ambari-DDL-SQLAnywhere-CREATE.sql
@@ -109,6 +109,7 @@ CREATE TABLE hostcomponentdesiredstate (
 );
 
 CREATE TABLE hostcomponentstate (
+  id NUMERIC(19) NOT NULL,
   cluster_id NUMERIC(19) NOT NULL,
   component_name VARCHAR(255) NOT NULL,
   version VARCHAR(32) NOT NULL DEFAULT 'UNKNOWN',
@@ -118,9 +119,11 @@ CREATE TABLE hostcomponentstate (
   service_name VARCHAR(255) NOT NULL,
   upgrade_state VARCHAR(32) NOT NULL DEFAULT 'NONE',
   security_state VARCHAR(32) NOT NULL DEFAULT 'UNSECURED',
-  PRIMARY KEY (cluster_id, component_name, host_id, service_name)
+  PRIMARY KEY (id)
 );
 
+CREATE INDEX idx_host_component_state on hostcomponentstate(host_id, component_name, service_name,
cluster_id);
+
 CREATE TABLE hosts (
   host_id NUMERIC(19) NOT NULL,
   host_name VARCHAR(255) NOT NULL,
@@ -936,6 +939,7 @@ INSERT INTO ambari_sequences(sequence_name, sequence_value) values ('topology_lo
 INSERT INTO ambari_sequences(sequence_name, sequence_value) values ('topology_logical_task_id_seq',
0);
 INSERT INTO ambari_sequences(sequence_name, sequence_value) values ('topology_request_id_seq',
0);
 INSERT INTO ambari_sequences(sequence_name, sequence_value) values ('topology_host_group_id_seq',
0);
+INSERT INTO ambari_sequences(sequence_name, sequence_value) values ('hostcomponentstate_id_seq',
0);
 
 insert into adminresourcetype (resource_type_id, resource_type_name)
   select 1, 'AMBARI'


Mime
View raw message