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:33:35 GMT
Repository: ambari
Updated Branches:
  refs/heads/trunk 6d662b17a -> f8a9f63cc


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/f8a9f63c
Tree: http://git-wip-us.apache.org/repos/asf/ambari/tree/f8a9f63c
Diff: http://git-wip-us.apache.org/repos/asf/ambari/diff/f8a9f63c

Branch: refs/heads/trunk
Commit: f8a9f63cc27ac593b953323b16697bf4da292995
Parents: 6d662b1
Author: Siddharth Wagle <swagle@hortonworks.com>
Authored: Mon Oct 26 11:33:27 2015 -0700
Committer: Siddharth Wagle <swagle@hortonworks.com>
Committed: Mon Oct 26 11:33:27 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/f8a9f63c/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/f8a9f63c/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 5bc0962..12373f0 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
@@ -380,12 +380,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);
 
@@ -407,6 +407,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/f8a9f63c/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