ambari-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From alejan...@apache.org
Subject [1/2] ambari git commit: AMBARI-10209. ClusterHostMapping table prevents cluster deployment, missing host_id column (alejandro)
Date Wed, 25 Mar 2015 19:04:21 GMT
Repository: ambari
Updated Branches:
  refs/heads/trunk 907166990 -> ae9c18141


AMBARI-10209. ClusterHostMapping table prevents cluster deployment, missing host_id column
(alejandro)


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

Branch: refs/heads/trunk
Commit: ae9c18141f5d612942bd210e5d64e352e2f23846
Parents: d44a478
Author: Alejandro Fernandez <afernandez@hortonworks.com>
Authored: Wed Mar 25 11:22:34 2015 -0700
Committer: Alejandro Fernandez <afernandez@hortonworks.com>
Committed: Wed Mar 25 12:03:20 2015 -0700

----------------------------------------------------------------------
 ambari-server/src/main/resources/Ambari-DDL-MySQL-CREATE.sql  | 6 ++----
 ambari-server/src/main/resources/Ambari-DDL-Oracle-CREATE.sql | 6 ++----
 .../src/main/resources/Ambari-DDL-Postgres-CREATE.sql         | 6 ++----
 .../main/resources/Ambari-DDL-Postgres-EMBEDDED-CREATE.sql    | 6 ++----
 .../src/main/resources/Ambari-DDL-SQLServer-CREATE.sql        | 7 ++++++-
 5 files changed, 14 insertions(+), 17 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/ambari/blob/ae9c1814/ambari-server/src/main/resources/Ambari-DDL-MySQL-CREATE.sql
----------------------------------------------------------------------
diff --git a/ambari-server/src/main/resources/Ambari-DDL-MySQL-CREATE.sql b/ambari-server/src/main/resources/Ambari-DDL-MySQL-CREATE.sql
index f241544..214d980 100644
--- a/ambari-server/src/main/resources/Ambari-DDL-MySQL-CREATE.sql
+++ b/ambari-server/src/main/resources/Ambari-DDL-MySQL-CREATE.sql
@@ -320,10 +320,8 @@ CREATE TABLE metainfo (
 
 CREATE TABLE ClusterHostMapping (
   cluster_id BIGINT NOT NULL,
-  host_name VARCHAR(255) NOT NULL,
-  --host_id BIGINT NOT NULL,
-  PRIMARY KEY (cluster_id, host_name));
-  --PRIMARY KEY (cluster_id, host_id));
+  host_id BIGINT NOT NULL,
+  PRIMARY KEY (cluster_id, host_id));
 
 CREATE TABLE ambari_sequences (
   sequence_name VARCHAR(255),

http://git-wip-us.apache.org/repos/asf/ambari/blob/ae9c1814/ambari-server/src/main/resources/Ambari-DDL-Oracle-CREATE.sql
----------------------------------------------------------------------
diff --git a/ambari-server/src/main/resources/Ambari-DDL-Oracle-CREATE.sql b/ambari-server/src/main/resources/Ambari-DDL-Oracle-CREATE.sql
index ab55141..f0815ba 100644
--- a/ambari-server/src/main/resources/Ambari-DDL-Oracle-CREATE.sql
+++ b/ambari-server/src/main/resources/Ambari-DDL-Oracle-CREATE.sql
@@ -310,10 +310,8 @@ CREATE TABLE metainfo (
 
 CREATE TABLE ClusterHostMapping (
   cluster_id NUMBER(19) NOT NULL,
-  host_name VARCHAR2(255) NOT NULL,
-  --host_id NUMBER(19) NOT NULL,
-  PRIMARY KEY (cluster_id, host_name));
-  --PRIMARY KEY (cluster_id, host_id));
+  host_id NUMBER(19) NOT NULL,
+  PRIMARY KEY (cluster_id, host_id));
 
 CREATE TABLE ambari_sequences (
   sequence_name VARCHAR2(50) NOT NULL,

http://git-wip-us.apache.org/repos/asf/ambari/blob/ae9c1814/ambari-server/src/main/resources/Ambari-DDL-Postgres-CREATE.sql
----------------------------------------------------------------------
diff --git a/ambari-server/src/main/resources/Ambari-DDL-Postgres-CREATE.sql b/ambari-server/src/main/resources/Ambari-DDL-Postgres-CREATE.sql
index dcf6fba..fc5ad50 100644
--- a/ambari-server/src/main/resources/Ambari-DDL-Postgres-CREATE.sql
+++ b/ambari-server/src/main/resources/Ambari-DDL-Postgres-CREATE.sql
@@ -290,10 +290,8 @@ CREATE TABLE requestoperationlevel (
 
 CREATE TABLE ClusterHostMapping (
   cluster_id BIGINT NOT NULL,
-  host_name VARCHAR(255) NOT NULL,
-  --host_id BIGINT NOT NULL,
-  PRIMARY KEY (cluster_id, host_name));
-  --PRIMARY KEY (cluster_id, host_id));
+  host_id BIGINT NOT NULL,
+  PRIMARY KEY (cluster_id, host_id));
 
 CREATE TABLE key_value_store (
   "key" VARCHAR(255),

http://git-wip-us.apache.org/repos/asf/ambari/blob/ae9c1814/ambari-server/src/main/resources/Ambari-DDL-Postgres-EMBEDDED-CREATE.sql
----------------------------------------------------------------------
diff --git a/ambari-server/src/main/resources/Ambari-DDL-Postgres-EMBEDDED-CREATE.sql b/ambari-server/src/main/resources/Ambari-DDL-Postgres-EMBEDDED-CREATE.sql
index a291bc4..369e8ac 100644
--- a/ambari-server/src/main/resources/Ambari-DDL-Postgres-EMBEDDED-CREATE.sql
+++ b/ambari-server/src/main/resources/Ambari-DDL-Postgres-EMBEDDED-CREATE.sql
@@ -327,10 +327,8 @@ GRANT ALL PRIVILEGES ON TABLE ambari.requestoperationlevel TO :username;
 
 CREATE TABLE ambari.ClusterHostMapping (
   cluster_id BIGINT NOT NULL,
-  host_name VARCHAR(255) NOT NULL,
-  --host_id BIGINT NOT NULL,
-  PRIMARY KEY (cluster_id, host_name));
-  --PRIMARY KEY (cluster_id, host_id));
+  host_id BIGINT NOT NULL,
+  PRIMARY KEY (cluster_id, host_id));
 GRANT ALL PRIVILEGES ON TABLE ambari.ClusterHostMapping TO :username;
 
 CREATE TABLE ambari.key_value_store (

http://git-wip-us.apache.org/repos/asf/ambari/blob/ae9c1814/ambari-server/src/main/resources/Ambari-DDL-SQLServer-CREATE.sql
----------------------------------------------------------------------
diff --git a/ambari-server/src/main/resources/Ambari-DDL-SQLServer-CREATE.sql b/ambari-server/src/main/resources/Ambari-DDL-SQLServer-CREATE.sql
index 566562f..2f2f383 100644
--- a/ambari-server/src/main/resources/Ambari-DDL-SQLServer-CREATE.sql
+++ b/ambari-server/src/main/resources/Ambari-DDL-SQLServer-CREATE.sql
@@ -84,7 +84,12 @@ CREATE TABLE stage (stage_id BIGINT NOT NULL, request_id BIGINT NOT NULL,
cluste
 CREATE TABLE request (request_id BIGINT NOT NULL, cluster_id BIGINT, command_name VARCHAR(255),
create_time BIGINT NOT NULL, end_time BIGINT NOT NULL, exclusive_execution BIT NOT NULL DEFAULT
0, inputs VARBINARY(8000), request_context VARCHAR(255), request_type VARCHAR(255), request_schedule_id
BIGINT, start_time BIGINT NOT NULL, status VARCHAR(255), PRIMARY KEY CLUSTERED (request_id));
 CREATE TABLE requestresourcefilter (filter_id BIGINT NOT NULL, request_id BIGINT NOT NULL,
service_name VARCHAR(255), component_name VARCHAR(255), hosts VARBINARY(8000), PRIMARY KEY
CLUSTERED (filter_id));
 CREATE TABLE requestoperationlevel (operation_level_id BIGINT NOT NULL, request_id BIGINT
NOT NULL, level_name VARCHAR(255), cluster_name VARCHAR(255), service_name VARCHAR(255), host_component_name
VARCHAR(255), host_name VARCHAR(255), PRIMARY KEY CLUSTERED (operation_level_id));
-CREATE TABLE ClusterHostMapping (cluster_id BIGINT NOT NULL, host_name VARCHAR(255) NOT NULL,
PRIMARY KEY CLUSTERED (cluster_id, host_name));
+
+CREATE TABLE ClusterHostMapping (
+  cluster_id BIGINT NOT NULL,
+  host_id BIGINT NOT NULL,
+  PRIMARY KEY CLUSTERED (cluster_id, host_id));
+
 CREATE TABLE key_value_store ([key] VARCHAR(255), [value] VARCHAR(MAX), PRIMARY KEY CLUSTERED
([key]));
 CREATE TABLE hostconfigmapping (cluster_id BIGINT NOT NULL, host_name VARCHAR(255) NOT NULL,
type_name VARCHAR(255) NOT NULL, version_tag VARCHAR(255) NOT NULL, service_name VARCHAR(255),
create_timestamp BIGINT NOT NULL, selected INTEGER NOT NULL DEFAULT 0, user_name VARCHAR(255)
NOT NULL DEFAULT '_db', PRIMARY KEY CLUSTERED (cluster_id, host_name, type_name, create_timestamp));
 CREATE TABLE metainfo ([metainfo_key] VARCHAR(255), [metainfo_value] VARCHAR(255), PRIMARY
KEY CLUSTERED ([metainfo_key]));


Mime
View raw message