ambari-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From swa...@apache.org
Subject ambari git commit: AMBARI-13560. Ambari server Deadlock on View deploy. (Gaurav Nagar via swagle)
Date Mon, 26 Oct 2015 18:32:05 GMT
Repository: ambari
Updated Branches:
  refs/heads/branch-2.1 ce417eb1d -> b74b2dc05


AMBARI-13560. Ambari server Deadlock on View deploy. (Gaurav Nagar via swagle)


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

Branch: refs/heads/branch-2.1
Commit: b74b2dc05c9f60c0124fbf621c6a1aaf1597a994
Parents: ce417eb
Author: Siddharth Wagle <swagle@hortonworks.com>
Authored: Mon Oct 26 11:31:54 2015 -0700
Committer: Siddharth Wagle <swagle@hortonworks.com>
Committed: Mon Oct 26 11:31:54 2015 -0700

----------------------------------------------------------------------
 .../apache/ambari/server/agent/rest/AgentResource.java |  7 +++++++
 .../apache/ambari/server/controller/AmbariServer.java  | 13 ++++++++-----
 .../org/apache/ambari/server/view/ViewRegistry.java    |  2 +-
 3 files changed, 16 insertions(+), 6 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/ambari/blob/b74b2dc0/ambari-server/src/main/java/org/apache/ambari/server/agent/rest/AgentResource.java
----------------------------------------------------------------------
diff --git a/ambari-server/src/main/java/org/apache/ambari/server/agent/rest/AgentResource.java
b/ambari-server/src/main/java/org/apache/ambari/server/agent/rest/AgentResource.java
index bbdfe88..ff84874 100644
--- a/ambari-server/src/main/java/org/apache/ambari/server/agent/rest/AgentResource.java
+++ b/ambari-server/src/main/java/org/apache/ambari/server/agent/rest/AgentResource.java
@@ -58,6 +58,13 @@ public class AgentResource {
   @Inject
   public static void init(HeartBeatHandler instance) {
     hh = instance;
+    //hh.start();
+  }
+
+  /**
+   * Explicitly start HH
+   */
+  public static void statHeartBeatHandler() {
     hh.start();
   }
 

http://git-wip-us.apache.org/repos/asf/ambari/blob/b74b2dc0/ambari-server/src/main/java/org/apache/ambari/server/controller/AmbariServer.java
----------------------------------------------------------------------
diff --git a/ambari-server/src/main/java/org/apache/ambari/server/controller/AmbariServer.java
b/ambari-server/src/main/java/org/apache/ambari/server/controller/AmbariServer.java
index 6a7fd6a..021f4c8 100644
--- a/ambari-server/src/main/java/org/apache/ambari/server/controller/AmbariServer.java
+++ b/ambari-server/src/main/java/org/apache/ambari/server/controller/AmbariServer.java
@@ -381,12 +381,12 @@ public class AmbariServer {
       sh.setInitParameter("com.sun.jersey.config.property.resourceConfigClass",
           "com.sun.jersey.api.core.PackagesResourceConfig");
       sh.setInitParameter("com.sun.jersey.config.property.packages",
-          "org.apache.ambari.server.api.rest;" +
-              "org.apache.ambari.server.api.services;" +
-              "org.apache.ambari.eventdb.webservice;" +
-              "org.apache.ambari.server.api");
+        "org.apache.ambari.server.api.rest;" +
+          "org.apache.ambari.server.api.services;" +
+          "org.apache.ambari.eventdb.webservice;" +
+          "org.apache.ambari.server.api");
       sh.setInitParameter("com.sun.jersey.api.json.POJOMappingFeature",
-          "true");
+        "true");
       root.addServlet(sh, "/api/v1/*");
       sh.setInitOrder(2);
 
@@ -408,6 +408,9 @@ public class AmbariServer {
       agentroot.addServlet(agent, "/agent/v1/*");
       agent.setInitOrder(3);
 
+      AgentResource.statHeartBeatHandler();
+      LOG.info("********** Started Heartbeat handler **********");
+
       ServletHolder cert = new ServletHolder(ServletContainer.class);
       cert.setInitParameter("com.sun.jersey.config.property.resourceConfigClass",
           "com.sun.jersey.api.core.PackagesResourceConfig");

http://git-wip-us.apache.org/repos/asf/ambari/blob/b74b2dc0/ambari-server/src/main/java/org/apache/ambari/server/view/ViewRegistry.java
----------------------------------------------------------------------
diff --git a/ambari-server/src/main/java/org/apache/ambari/server/view/ViewRegistry.java b/ambari-server/src/main/java/org/apache/ambari/server/view/ViewRegistry.java
index 7b32898..1cf4323 100644
--- a/ambari-server/src/main/java/org/apache/ambari/server/view/ViewRegistry.java
+++ b/ambari-server/src/main/java/org/apache/ambari/server/view/ViewRegistry.java
@@ -464,7 +464,7 @@ public class ViewRegistry {
    * Read all view archives.
    */
   public void readViewArchives() {
-    readViewArchives(false, true, ALL_VIEWS_REG_EXP);
+    readViewArchives(false, false, ALL_VIEWS_REG_EXP);
   }
 
   /**


Mime
View raw message