incubator-ambari-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From smoha...@apache.org
Subject git commit: AMBARI-3213. Ambari throws SQL exception when dfs.datanode.data.dir exceeds 10000 characters.
Date Thu, 12 Sep 2013 22:48:19 GMT
Updated Branches:
  refs/heads/trunk d6ad2991c -> fb7e4a212


AMBARI-3213. Ambari throws SQL exception when dfs.datanode.data.dir exceeds 10000 characters.


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

Branch: refs/heads/trunk
Commit: fb7e4a2127736e7978010f91c1075ad86dc1b160
Parents: d6ad299
Author: Sumit Mohanty <smohanty@hortonworks.com>
Authored: Thu Sep 12 14:24:59 2013 -0700
Committer: Sumit Mohanty <smohanty@hortonworks.com>
Committed: Thu Sep 12 15:48:02 2013 -0700

----------------------------------------------------------------------
 .../java/org/apache/ambari/server/orm/entities/HostEntity.java   | 2 +-
 ambari-server/src/main/resources/Ambari-DDL-Postgres-CREATE.sql  | 4 ++--
 .../resources/upgrade/ddl/Ambari-DDL-Postgres-UPGRADE-1.3.0.sql  | 2 +-
 3 files changed, 4 insertions(+), 4 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/incubator-ambari/blob/fb7e4a21/ambari-server/src/main/java/org/apache/ambari/server/orm/entities/HostEntity.java
----------------------------------------------------------------------
diff --git a/ambari-server/src/main/java/org/apache/ambari/server/orm/entities/HostEntity.java
b/ambari-server/src/main/java/org/apache/ambari/server/orm/entities/HostEntity.java
index 06ea84d..8a9db0d 100644
--- a/ambari-server/src/main/java/org/apache/ambari/server/orm/entities/HostEntity.java
+++ b/ambari-server/src/main/java/org/apache/ambari/server/orm/entities/HostEntity.java
@@ -65,7 +65,7 @@ public class HostEntity {
 
   @Lob
   @Column(name = "disks_info", nullable = false, insertable = true,
-      updatable = true, length = 10000)
+      updatable = true, length = 32000)
   @Basic
   private String disksInfo = "";
 

http://git-wip-us.apache.org/repos/asf/incubator-ambari/blob/fb7e4a21/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 551827f..63a8d49 100644
--- a/ambari-server/src/main/resources/Ambari-DDL-Postgres-CREATE.sql
+++ b/ambari-server/src/main/resources/Ambari-DDL-Postgres-CREATE.sql
@@ -58,7 +58,7 @@ GRANT ALL PRIVILEGES ON TABLE ambari.hostcomponentdesiredstate TO :username;
 CREATE TABLE ambari.hostcomponentstate (cluster_id BIGINT NOT NULL, component_name VARCHAR(255)
NOT NULL, current_stack_version VARCHAR(255) NOT NULL, current_state VARCHAR(255) NOT NULL,
host_name VARCHAR(255) NOT NULL, service_name VARCHAR(255) NOT NULL, PRIMARY KEY (cluster_id,
component_name, host_name, service_name));
 GRANT ALL PRIVILEGES ON TABLE ambari.hostcomponentstate TO :username;
 
-CREATE TABLE ambari.hosts (host_name VARCHAR(255) NOT NULL, cpu_count INTEGER NOT NULL, ph_cpu_count
INTEGER, cpu_info VARCHAR(255) NOT NULL, discovery_status VARCHAR(2000) NOT NULL, disks_info
VARCHAR(10000) NOT NULL, host_attributes VARCHAR(20000) NOT NULL, ipv4 VARCHAR(255), ipv6
VARCHAR(255), public_host_name VARCHAR(255), last_registration_time BIGINT NOT NULL, os_arch
VARCHAR(255) NOT NULL, os_info VARCHAR(1000) NOT NULL, os_type VARCHAR(255) NOT NULL, rack_info
VARCHAR(255) NOT NULL, total_mem BIGINT NOT NULL, PRIMARY KEY (host_name));
+CREATE TABLE ambari.hosts (host_name VARCHAR(255) NOT NULL, cpu_count INTEGER NOT NULL, ph_cpu_count
INTEGER, cpu_info VARCHAR(255) NOT NULL, discovery_status VARCHAR(2000) NOT NULL, disks_info
VARCHAR(32000) NOT NULL, host_attributes VARCHAR(20000) NOT NULL, ipv4 VARCHAR(255), ipv6
VARCHAR(255), public_host_name VARCHAR(255), last_registration_time BIGINT NOT NULL, os_arch
VARCHAR(255) NOT NULL, os_info VARCHAR(1000) NOT NULL, os_type VARCHAR(255) NOT NULL, rack_info
VARCHAR(255) NOT NULL, total_mem BIGINT NOT NULL, PRIMARY KEY (host_name));
 GRANT ALL PRIVILEGES ON TABLE ambari.hosts TO :username;
 
 CREATE TABLE ambari.hoststate (agent_version VARCHAR(255) NOT NULL, available_mem BIGINT
NOT NULL, current_state VARCHAR(255) NOT NULL, health_status VARCHAR(255), host_name VARCHAR(255)
NOT NULL, time_in_state BIGINT NOT NULL, PRIMARY KEY (host_name));
@@ -272,4 +272,4 @@ CREATE TABLE clusterEvent (
   error     TEXT, data TEXT,
   host      TEXT, rack TEXT
 );
-GRANT ALL PRIVILEGES ON TABLE clusterEvent TO "mapred";
\ No newline at end of file
+GRANT ALL PRIVILEGES ON TABLE clusterEvent TO "mapred";

http://git-wip-us.apache.org/repos/asf/incubator-ambari/blob/fb7e4a21/ambari-server/src/main/resources/upgrade/ddl/Ambari-DDL-Postgres-UPGRADE-1.3.0.sql
----------------------------------------------------------------------
diff --git a/ambari-server/src/main/resources/upgrade/ddl/Ambari-DDL-Postgres-UPGRADE-1.3.0.sql
b/ambari-server/src/main/resources/upgrade/ddl/Ambari-DDL-Postgres-UPGRADE-1.3.0.sql
index 22ee297..4a211f9 100644
--- a/ambari-server/src/main/resources/upgrade/ddl/Ambari-DDL-Postgres-UPGRADE-1.3.0.sql
+++ b/ambari-server/src/main/resources/upgrade/ddl/Ambari-DDL-Postgres-UPGRADE-1.3.0.sql
@@ -49,7 +49,7 @@ $_$ LANGUAGE plpgsql;
 -- Upgrade from 1.2.0
 ALTER TABLE ambari.hosts
   ADD COLUMN ph_cpu_count INTEGER,
-  ALTER COLUMN disks_info TYPE VARCHAR(10000);
+  ALTER COLUMN disks_info TYPE VARCHAR(32000);
 
 -- Upgrade to 1.3.0
 


Mime
View raw message