incubator-ambari-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From dmitriu...@apache.org
Subject git commit: AMBARI-3116. HBase start failed post install : Port already in use (dlysnichenko)
Date Thu, 05 Sep 2013 19:42:09 GMT
Updated Branches:
  refs/heads/trunk c05f22cda -> a84161762


AMBARI-3116. HBase start failed post install : Port already in use (dlysnichenko)


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

Branch: refs/heads/trunk
Commit: a841617628a93939ec216366b47fcf4eadf0086e
Parents: c05f22c
Author: Lisnichenko Dmitro <dlysnichenko@hortonworks.com>
Authored: Thu Sep 5 22:40:52 2013 +0300
Committer: Lisnichenko Dmitro <dlysnichenko@hortonworks.com>
Committed: Thu Sep 5 22:40:52 2013 +0300

----------------------------------------------------------------------
 .../server/metadata/RoleCommandOrder.java       | 93 ++++++++++++++++++++
 .../ambari/server/metadata/RoleGraphTest.java   | 48 +++++++++-
 .../server/stageplanner/TestStagePlanner.java   |  2 +-
 3 files changed, 141 insertions(+), 2 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/incubator-ambari/blob/a8416176/ambari-server/src/main/java/org/apache/ambari/server/metadata/RoleCommandOrder.java
----------------------------------------------------------------------
diff --git a/ambari-server/src/main/java/org/apache/ambari/server/metadata/RoleCommandOrder.java
b/ambari-server/src/main/java/org/apache/ambari/server/metadata/RoleCommandOrder.java
index 37d9648..9e1f319 100644
--- a/ambari-server/src/main/java/org/apache/ambari/server/metadata/RoleCommandOrder.java
+++ b/ambari-server/src/main/java/org/apache/ambari/server/metadata/RoleCommandOrder.java
@@ -127,6 +127,10 @@ public class RoleCommandOrder {
             RoleCommand.START);
         addDependency(Role.ZKFC, RoleCommand.START, Role.NAMENODE,
             RoleCommand.START);
+        addDependency(Role.NAGIOS_SERVER, RoleCommand.START, Role.ZKFC,
+                RoleCommand.START);
+        addDependency(Role.NAGIOS_SERVER, RoleCommand.START, Role.JOURNALNODE,
+                RoleCommand.START);
       }
       addDependency(Role.HBASE_MASTER, RoleCommand.START, Role.ZOOKEEPER_SERVER,
           RoleCommand.START);
@@ -160,6 +164,43 @@ public class RoleCommandOrder {
           RoleCommand.START); 
       addDependency(Role.FLUME_SERVER, RoleCommand.START, Role.OOZIE_SERVER,
           RoleCommand.START);
+      // Nagios
+      addDependency(Role.NAGIOS_SERVER, RoleCommand.START, Role.HBASE_MASTER,
+              RoleCommand.START);
+      addDependency(Role.NAGIOS_SERVER, RoleCommand.START, Role.HBASE_REGIONSERVER,
+              RoleCommand.START);
+      addDependency(Role.NAGIOS_SERVER, RoleCommand.START, Role.GANGLIA_SERVER,
+              RoleCommand.START);
+      addDependency(Role.NAGIOS_SERVER, RoleCommand.START, Role.GANGLIA_MONITOR,
+              RoleCommand.START);
+      addDependency(Role.NAGIOS_SERVER, RoleCommand.START, Role.HCAT,
+              RoleCommand.START);
+      addDependency(Role.NAGIOS_SERVER, RoleCommand.START, Role.HIVE_SERVER,
+              RoleCommand.START);
+      addDependency(Role.NAGIOS_SERVER, RoleCommand.START, Role.HIVE_METASTORE,
+              RoleCommand.START);
+      addDependency(Role.NAGIOS_SERVER, RoleCommand.START, Role.HUE_SERVER,
+              RoleCommand.START);
+      addDependency(Role.NAGIOS_SERVER, RoleCommand.START, Role.JOBTRACKER,
+              RoleCommand.START);
+      addDependency(Role.NAGIOS_SERVER, RoleCommand.START, Role.TASKTRACKER,
+              RoleCommand.START);
+      addDependency(Role.NAGIOS_SERVER, RoleCommand.START, Role.ZOOKEEPER_SERVER,
+              RoleCommand.START);
+      addDependency(Role.NAGIOS_SERVER, RoleCommand.START, Role.MYSQL_SERVER,
+              RoleCommand.START);
+      addDependency(Role.NAGIOS_SERVER, RoleCommand.START, Role.OOZIE_SERVER,
+              RoleCommand.START);
+      addDependency(Role.NAGIOS_SERVER, RoleCommand.START, Role.PIG,
+              RoleCommand.START);
+      addDependency(Role.NAGIOS_SERVER, RoleCommand.START, Role.SQOOP,
+              RoleCommand.START);
+      addDependency(Role.NAGIOS_SERVER, RoleCommand.START, Role.WEBHCAT_SERVER,
+              RoleCommand.START);
+      addDependency(Role.NAGIOS_SERVER, RoleCommand.START, Role.FLUME_SERVER,
+              RoleCommand.START);
+
+
 
       // Service checks
       addDependency(Role.HCFS_SERVICE_CHECK, RoleCommand.EXECUTE, Role.PEERSTATUS,
@@ -285,6 +326,10 @@ public class RoleCommandOrder {
             RoleCommand.START);
         addDependency(Role.ZKFC, RoleCommand.START, Role.NAMENODE,
             RoleCommand.START);
+        addDependency(Role.NAGIOS_SERVER, RoleCommand.START, Role.ZKFC,
+                RoleCommand.START);
+        addDependency(Role.NAGIOS_SERVER, RoleCommand.START, Role.JOURNALNODE,
+                RoleCommand.START);
       }
       
       addDependency(Role.SECONDARY_NAMENODE, RoleCommand.START, Role.NAMENODE,
@@ -345,6 +390,54 @@ public class RoleCommandOrder {
         RoleCommand.START);
       addDependency(Role.FLUME_SERVER, RoleCommand.START, Role.OOZIE_SERVER,
         RoleCommand.START);
+      // Nagios
+      addDependency(Role.NAGIOS_SERVER, RoleCommand.START, Role.NAMENODE,
+              RoleCommand.START);
+      addDependency(Role.NAGIOS_SERVER, RoleCommand.START, Role.SECONDARY_NAMENODE,
+              RoleCommand.START);
+      addDependency(Role.NAGIOS_SERVER, RoleCommand.START, Role.DATANODE,
+              RoleCommand.START);
+      addDependency(Role.NAGIOS_SERVER, RoleCommand.START, Role.RESOURCEMANAGER,
+              RoleCommand.START);
+      addDependency(Role.NAGIOS_SERVER, RoleCommand.START, Role.NODEMANAGER,
+              RoleCommand.START);
+      addDependency(Role.NAGIOS_SERVER, RoleCommand.START, Role.HBASE_MASTER,
+              RoleCommand.START);
+      addDependency(Role.NAGIOS_SERVER, RoleCommand.START, Role.HBASE_REGIONSERVER,
+              RoleCommand.START);
+      addDependency(Role.NAGIOS_SERVER, RoleCommand.START, Role.GANGLIA_SERVER,
+              RoleCommand.START);
+      addDependency(Role.NAGIOS_SERVER, RoleCommand.START, Role.GANGLIA_MONITOR,
+              RoleCommand.START);
+      addDependency(Role.NAGIOS_SERVER, RoleCommand.START, Role.HCAT,
+              RoleCommand.START);
+      addDependency(Role.NAGIOS_SERVER, RoleCommand.START, Role.HISTORYSERVER,
+              RoleCommand.START);
+      addDependency(Role.NAGIOS_SERVER, RoleCommand.START, Role.HIVE_SERVER,
+              RoleCommand.START);
+      addDependency(Role.NAGIOS_SERVER, RoleCommand.START, Role.HIVE_METASTORE,
+              RoleCommand.START);
+      addDependency(Role.NAGIOS_SERVER, RoleCommand.START, Role.HUE_SERVER,
+              RoleCommand.START);
+      addDependency(Role.NAGIOS_SERVER, RoleCommand.START, Role.JOBTRACKER,
+              RoleCommand.START);
+      addDependency(Role.NAGIOS_SERVER, RoleCommand.START, Role.TASKTRACKER,
+              RoleCommand.START);
+      addDependency(Role.NAGIOS_SERVER, RoleCommand.START, Role.ZOOKEEPER_SERVER,
+              RoleCommand.START);
+      addDependency(Role.NAGIOS_SERVER, RoleCommand.START, Role.MYSQL_SERVER,
+              RoleCommand.START);
+      addDependency(Role.NAGIOS_SERVER, RoleCommand.START, Role.OOZIE_SERVER,
+              RoleCommand.START);
+      addDependency(Role.NAGIOS_SERVER, RoleCommand.START, Role.PIG,
+              RoleCommand.START);
+      addDependency(Role.NAGIOS_SERVER, RoleCommand.START, Role.SQOOP,
+              RoleCommand.START);
+      addDependency(Role.NAGIOS_SERVER, RoleCommand.START, Role.WEBHCAT_SERVER,
+              RoleCommand.START);
+      addDependency(Role.NAGIOS_SERVER, RoleCommand.START, Role.FLUME_SERVER,
+              RoleCommand.START);
+
 
       // Service checks
       addDependency(Role.HDFS_SERVICE_CHECK, RoleCommand.EXECUTE, Role.NAMENODE,

http://git-wip-us.apache.org/repos/asf/incubator-ambari/blob/a8416176/ambari-server/src/test/java/org/apache/ambari/server/metadata/RoleGraphTest.java
----------------------------------------------------------------------
diff --git a/ambari-server/src/test/java/org/apache/ambari/server/metadata/RoleGraphTest.java
b/ambari-server/src/test/java/org/apache/ambari/server/metadata/RoleGraphTest.java
index 5013208..3f8f55d 100644
--- a/ambari-server/src/test/java/org/apache/ambari/server/metadata/RoleGraphTest.java
+++ b/ambari-server/src/test/java/org/apache/ambari/server/metadata/RoleGraphTest.java
@@ -165,6 +165,7 @@ public class RoleGraphTest {
     RoleGraphNode datanode_start = new RoleGraphNode(Role.DATANODE, RoleCommand.START);
     RoleGraphNode datanode_install = new RoleGraphNode(Role.DATANODE, RoleCommand.INSTALL);
     RoleGraphNode jobtracker_start = new RoleGraphNode(Role.JOBTRACKER, RoleCommand.START);
+    RoleGraphNode tasktracker_start = new RoleGraphNode(Role.TASKTRACKER, RoleCommand.START);
     Assert.assertEquals(1, rco.order(datanode_start, datanode_install));
     Assert.assertEquals(1, rco.order(jobtracker_start, datanode_start));
     Assert.assertEquals(0, rco.order(jobtracker_start, jobtracker_start));
@@ -196,6 +197,7 @@ public class RoleGraphTest {
     RoleGraphNode rm_start = new RoleGraphNode(Role.RESOURCEMANAGER, RoleCommand.START);
     RoleGraphNode nm_start = new RoleGraphNode(Role.NODEMANAGER, RoleCommand.START);
     RoleGraphNode hs_start = new RoleGraphNode(Role.HISTORYSERVER, RoleCommand.START);
+    RoleGraphNode nagios_start = new RoleGraphNode(Role.NAGIOS_SERVER, RoleCommand.START);
     Assert.assertEquals(-1, rco.order(rm_start, mapred2_service_check));
     Assert.assertEquals(-1, rco.order(nm_start, mapred2_service_check)); 
     Assert.assertEquals(-1, rco.order(hs_start, mapred2_service_check));
@@ -206,12 +208,51 @@ public class RoleGraphTest {
     RoleGraphNode nn_start = new RoleGraphNode(Role.NAMENODE, RoleCommand.START);
     RoleGraphNode jn_start = new RoleGraphNode(Role.JOURNALNODE, RoleCommand.START);
     RoleGraphNode zk_server_start = new RoleGraphNode(Role.ZOOKEEPER_SERVER, RoleCommand.START);
+    RoleGraphNode hbase_master_start = new RoleGraphNode(Role.HBASE_MASTER, RoleCommand.START);
+    RoleGraphNode hbase_reg_srv_start = new RoleGraphNode(Role.HBASE_REGIONSERVER, RoleCommand.START);
+    RoleGraphNode ganglia_server_start = new RoleGraphNode(Role.GANGLIA_SERVER, RoleCommand.START);
+    RoleGraphNode ganglia_monitor_start = new RoleGraphNode(Role.GANGLIA_MONITOR, RoleCommand.START);
+    RoleGraphNode hcat_start = new RoleGraphNode(Role.HCAT, RoleCommand.START);
+    RoleGraphNode hive_srv_start = new RoleGraphNode(Role.HIVE_SERVER, RoleCommand.START);
+    RoleGraphNode hive_ms_start = new RoleGraphNode(Role.HIVE_METASTORE, RoleCommand.START);
+    RoleGraphNode hue_start = new RoleGraphNode(Role.HUE_SERVER, RoleCommand.START);
+    RoleGraphNode mysql_start = new RoleGraphNode(Role.MYSQL_SERVER, RoleCommand.START);
+    RoleGraphNode oozie_srv_start = new RoleGraphNode(Role.OOZIE_SERVER, RoleCommand.START);
+    RoleGraphNode pig_start = new RoleGraphNode(Role.PIG, RoleCommand.START);
+    RoleGraphNode sqoop_start = new RoleGraphNode(Role.SQOOP, RoleCommand.START);
+    RoleGraphNode webhcat_srv_start = new RoleGraphNode(Role.WEBHCAT_SERVER, RoleCommand.START);
+    RoleGraphNode flume_start = new RoleGraphNode(Role.FLUME_SERVER, RoleCommand.START);
     RoleGraphNode zkfc_start = new RoleGraphNode(Role.ZKFC, RoleCommand.START);
     
     Assert.assertEquals(0, rco.order(nn_start, jn_start));
     Assert.assertEquals(0, rco.order(nn_start, zk_server_start));
     Assert.assertEquals(0, rco.order(zkfc_start, nn_start));
-    
+    // Check that Nagios starts after other components
+    Assert.assertEquals(1, rco.order(nagios_start, nn_start));
+    Assert.assertEquals(1, rco.order(nagios_start, snamenode_start));
+    Assert.assertEquals(1, rco.order(nagios_start, datanode_start));
+    Assert.assertEquals(1, rco.order(nagios_start, resourcemanager_start));
+    Assert.assertEquals(1, rco.order(nagios_start, nm_start));
+    Assert.assertEquals(1, rco.order(nagios_start, hbase_master_start));
+    Assert.assertEquals(1, rco.order(nagios_start, hbase_reg_srv_start));
+    Assert.assertEquals(1, rco.order(nagios_start, ganglia_server_start));
+    Assert.assertEquals(1, rco.order(nagios_start, ganglia_monitor_start));
+    Assert.assertEquals(1, rco.order(nagios_start, hcat_start));
+    Assert.assertEquals(1, rco.order(nagios_start, hs_start));
+    Assert.assertEquals(1, rco.order(nagios_start, hive_srv_start));
+    Assert.assertEquals(1, rco.order(nagios_start, hue_start));
+    Assert.assertEquals(1, rco.order(nagios_start, jobtracker_start));
+    Assert.assertEquals(1, rco.order(nagios_start, tasktracker_start));
+    Assert.assertEquals(1, rco.order(nagios_start, zk_server_start));
+    Assert.assertEquals(1, rco.order(nagios_start, mysql_start));
+    Assert.assertEquals(1, rco.order(nagios_start, oozie_srv_start));
+    Assert.assertEquals(1, rco.order(nagios_start, pig_start));
+    Assert.assertEquals(1, rco.order(nagios_start, sqoop_start));
+    Assert.assertEquals(1, rco.order(nagios_start, webhcat_srv_start));
+    Assert.assertEquals(1, rco.order(nagios_start, flume_start));
+
+
+
     //Enable HA for cluster
     try {
       cluster.getService("HDFS").addServiceComponent("JOURNALNODE");
@@ -222,5 +263,10 @@ public class RoleGraphTest {
     Assert.assertEquals(1, rco.order(nn_start, jn_start));
     Assert.assertEquals(1, rco.order(nn_start, zk_server_start));
     Assert.assertEquals(1, rco.order(zkfc_start, nn_start));
+    Assert.assertEquals(1, rco.order(nagios_start, zkfc_start));
+    Assert.assertEquals(1, rco.order(nagios_start, jn_start));
+
+
+
   }
 }

http://git-wip-us.apache.org/repos/asf/incubator-ambari/blob/a8416176/ambari-server/src/test/java/org/apache/ambari/server/stageplanner/TestStagePlanner.java
----------------------------------------------------------------------
diff --git a/ambari-server/src/test/java/org/apache/ambari/server/stageplanner/TestStagePlanner.java
b/ambari-server/src/test/java/org/apache/ambari/server/stageplanner/TestStagePlanner.java
index 8835bd8..303718a 100644
--- a/ambari-server/src/test/java/org/apache/ambari/server/stageplanner/TestStagePlanner.java
+++ b/ambari-server/src/test/java/org/apache/ambari/server/stageplanner/TestStagePlanner.java
@@ -246,6 +246,6 @@ public class TestStagePlanner {
     for (Stage s: outStages) {
       System.out.println(s.toString());
     }
-    assertEquals(4, outStages.size());
+    assertEquals(5, outStages.size());
   }
 }


Mime
View raw message