ambari-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From smoha...@apache.org
Subject [16/51] [abbrv] ambari git commit: Revert "AMBARI-19066. Add more logging around status command report processing on server side (magyari_sandor)"
Date Fri, 09 Dec 2016 21:57:08 GMT
Revert "AMBARI-19066. Add more logging around status command report processing on server side
(magyari_sandor)"

This reverts commit ebe954bb104cf3425cc66f31b9e43d51a6719414.


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

Branch: refs/heads/branch-feature-AMBARI-18901
Commit: 8bdb7454690b1af51402a996f63958c004c6ec22
Parents: 59f520b
Author: Sandor Magyari <smagyari@hortonworks.com>
Authored: Thu Dec 8 15:42:18 2016 +0100
Committer: Sandor Magyari <smagyari@hortonworks.com>
Committed: Thu Dec 8 15:42:18 2016 +0100

----------------------------------------------------------------------
 .../apache/ambari/server/agent/AgentRequests.java    |  2 +-
 .../ambari/server/agent/HeartbeatProcessor.java      | 15 +++++----------
 2 files changed, 6 insertions(+), 11 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/ambari/blob/8bdb7454/ambari-server/src/main/java/org/apache/ambari/server/agent/AgentRequests.java
----------------------------------------------------------------------
diff --git a/ambari-server/src/main/java/org/apache/ambari/server/agent/AgentRequests.java
b/ambari-server/src/main/java/org/apache/ambari/server/agent/AgentRequests.java
index 01195bf..2980f38 100644
--- a/ambari-server/src/main/java/org/apache/ambari/server/agent/AgentRequests.java
+++ b/ambari-server/src/main/java/org/apache/ambari/server/agent/AgentRequests.java
@@ -45,9 +45,9 @@ public class AgentRequests {
 
   public void setExecutionDetailsRequest(String host, String component, String requestExecutionCmd)
{
     if (StringUtils.isNotBlank(requestExecutionCmd)) {
+      LOG.debug("Setting need for exec command to " + requestExecutionCmd + " for " + component);
       Map<String, Boolean> perHostRequiresExecCmdDetails = getPerHostRequiresExecCmdDetails(host);
       if (Boolean.TRUE.toString().toUpperCase().equals(requestExecutionCmd.toUpperCase()))
{
-        LOG.info("Setting need for exec command to " + requestExecutionCmd + " for " + component);
         perHostRequiresExecCmdDetails.put(component, Boolean.TRUE);
       } else {
         perHostRequiresExecCmdDetails.put(component, Boolean.FALSE);

http://git-wip-us.apache.org/repos/asf/ambari/blob/8bdb7454/ambari-server/src/main/java/org/apache/ambari/server/agent/HeartbeatProcessor.java
----------------------------------------------------------------------
diff --git a/ambari-server/src/main/java/org/apache/ambari/server/agent/HeartbeatProcessor.java
b/ambari-server/src/main/java/org/apache/ambari/server/agent/HeartbeatProcessor.java
index 404419c..8f4782e 100644
--- a/ambari-server/src/main/java/org/apache/ambari/server/agent/HeartbeatProcessor.java
+++ b/ambari-server/src/main/java/org/apache/ambari/server/agent/HeartbeatProcessor.java
@@ -19,6 +19,8 @@ package org.apache.ambari.server.agent;
 
 
 import java.util.ArrayList;
+import java.util.Collection;
+import java.util.Iterator;
 import java.util.List;
 import java.util.Map;
 import java.util.Set;
@@ -99,8 +101,6 @@ public class HeartbeatProcessor extends AbstractService{
   //TODO rewrite to correlate with heartbeat frequency, hardcoded in agent as of now
   private long delay = 5000;
   private long period = 1000;
-  private long logIntervalSeconds = 30;
-  private long lastStatusMessage = 0;
 
   private int poolSize = 1;
 
@@ -179,19 +179,12 @@ public class HeartbeatProcessor extends AbstractService{
 
     @Override
     public void run() {
-
       while (shouldRun) {
         try {
-          long now = System.currentTimeMillis();
-          if ((now - lastStatusMessage) > (logIntervalSeconds * 1000)) {
-            LOG.info("Queue size: {}", heartBeatsQueue.size());
-            lastStatusMessage = now;
-          }
           HeartBeat heartbeat = pollHeartbeat();
           if (heartbeat == null) {
             break;
           }
-
           processHeartbeat(heartbeat);
         } catch (Exception e) {
           LOG.error("Exception received while processing heartbeat", e);
@@ -208,13 +201,13 @@ public class HeartbeatProcessor extends AbstractService{
   /**
    * Incapsulates logic for processing data from agent heartbeat
    * @param heartbeat Agent heartbeat object
-   * @param now
    * @throws AmbariException
    */
   public void processHeartbeat(HeartBeat heartbeat) throws AmbariException {
     long now = System.currentTimeMillis();
 
     processAlerts(heartbeat);
+
     //process status reports before command reports to prevent status override immediately
after task finish
     processStatusReports(heartbeat);
     processCommandReports(heartbeat, now);
@@ -222,6 +215,8 @@ public class HeartbeatProcessor extends AbstractService{
     processHostStatus(heartbeat);
   }
 
+
+
   /**
    * Extracts all of the {@link Alert}s from the heartbeat and fires
    * {@link AlertEvent}s for each one. If there is a problem looking up the


Mime
View raw message