ambari-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From maha...@apache.org
Subject git commit: AMBARI-4905. Restart all on HDFS fails (Ambari DB: mysql). (mahadev)
Date Mon, 03 Mar 2014 01:52:13 GMT
Repository: ambari
Updated Branches:
  refs/heads/trunk b0740f535 -> 4a3ed67e1


AMBARI-4905. Restart all on HDFS fails (Ambari DB: mysql). (mahadev)


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

Branch: refs/heads/trunk
Commit: 4a3ed67e1c7b7ac6776a7fd2d8d47badc88bfcea
Parents: b0740f5
Author: Mahadev Konar <mahadev@apache.org>
Authored: Sun Mar 2 17:52:06 2014 -0800
Committer: Mahadev Konar <mahadev@apache.org>
Committed: Sun Mar 2 17:52:06 2014 -0800

----------------------------------------------------------------------
 .../server/controller/AmbariManagementControllerImpl.java     | 4 ++++
 .../server/controller/AmbariManagementControllerTest.java     | 7 ++++++-
 2 files changed, 10 insertions(+), 1 deletion(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/ambari/blob/4a3ed67e/ambari-server/src/main/java/org/apache/ambari/server/controller/AmbariManagementControllerImpl.java
----------------------------------------------------------------------
diff --git a/ambari-server/src/main/java/org/apache/ambari/server/controller/AmbariManagementControllerImpl.java
b/ambari-server/src/main/java/org/apache/ambari/server/controller/AmbariManagementControllerImpl.java
index 60688af..10d07b6 100644
--- a/ambari-server/src/main/java/org/apache/ambari/server/controller/AmbariManagementControllerImpl.java
+++ b/ambari-server/src/main/java/org/apache/ambari/server/controller/AmbariManagementControllerImpl.java
@@ -1537,7 +1537,11 @@ public class AmbariManagementControllerImpl implements AmbariManagementControlle
     hostLevelParams.put(STACK_NAME, stackId.getStackName());
     hostLevelParams.put(STACK_VERSION, stackId.getStackVersion());
     hostLevelParams.put(DB_NAME, getServerDB());
+    hostLevelParams.put(MYSQL_JDBC_URL, getMysqljdbcUrl());
+    hostLevelParams.put(ORACLE_JDBC_URL, getOjdbcUrl());
+    hostLevelParams.put(DB_DRIVER_FILENAME, configs.getMySQLJarName());
     hostLevelParams.putAll(getRcaParameters());
+    
     return hostLevelParams;
   }
 

http://git-wip-us.apache.org/repos/asf/ambari/blob/4a3ed67e/ambari-server/src/test/java/org/apache/ambari/server/controller/AmbariManagementControllerTest.java
----------------------------------------------------------------------
diff --git a/ambari-server/src/test/java/org/apache/ambari/server/controller/AmbariManagementControllerTest.java
b/ambari-server/src/test/java/org/apache/ambari/server/controller/AmbariManagementControllerTest.java
index c0994c2..dcee4bf 100644
--- a/ambari-server/src/test/java/org/apache/ambari/server/controller/AmbariManagementControllerTest.java
+++ b/ambari-server/src/test/java/org/apache/ambari/server/controller/AmbariManagementControllerTest.java
@@ -4000,8 +4000,13 @@ public class AmbariManagementControllerTest {
     Assert.assertEquals("RESTART HDFS/HDFS_CLIENT", hrc.getCommandDetail());
     Map<String, String> roleParams = hrc.getExecutionCommandWrapper()
       .getExecutionCommand().getRoleParams();
-
+    Map<String, String> hostParams = hrc.getExecutionCommandWrapper()
+        .getExecutionCommand().getHostLevelParams();
+        
     Assert.assertNotNull(roleParams);
+    Assert.assertTrue(hostParams.containsKey(ExecutionCommand.KeyNames.DB_DRIVER_FILENAME));
+    Assert.assertTrue(hostParams.containsKey(ExecutionCommand.KeyNames.MYSQL_JDBC_URL));
+    Assert.assertTrue(hostParams.containsKey(ExecutionCommand.KeyNames.ORACLE_JDBC_URL));
     Assert.assertEquals("CLIENT", roleParams.get(ExecutionCommand.KeyNames.COMPONENT_CATEGORY));
   }
 


Mime
View raw message