eagle-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From jinh...@apache.org
Subject incubator-eagle git commit: [MINOR] Application health check optimize
Date Tue, 22 Nov 2016 13:52:42 GMT
Repository: incubator-eagle
Updated Branches:
  refs/heads/master dacb86f31 -> a39ca45cb


[MINOR] Application health check optimize

Author: wujinhu <wujinhu920@126.com>

Closes #675 from wujinhu/healthCheckFix.


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

Branch: refs/heads/master
Commit: a39ca45cb146f3d4cf681f36f789538fa6995bad
Parents: dacb86f
Author: wujinhu <wujinhu920@126.com>
Authored: Tue Nov 22 21:52:35 2016 +0800
Committer: wujinhu <wujinhu920@126.com>
Committed: Tue Nov 22 21:52:35 2016 +0800

----------------------------------------------------------------------
 .../hadoop/queue/HadoopQueueRunningApplicationHealthCheck.java   | 2 +-
 .../eagle/jpm/mr/history/MRHistoryJobApplicationHealthCheck.java | 4 ++--
 .../jpm/spark/history/SparkHistoryJobApplicationHealthCheck.java | 4 ++--
 .../eagle/topology/TopologyCheckApplicationHealthCheck.java      | 4 ++--
 4 files changed, 7 insertions(+), 7 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/incubator-eagle/blob/a39ca45c/eagle-jpm/eagle-hadoop-queue/src/main/java/org/apache/eagle/hadoop/queue/HadoopQueueRunningApplicationHealthCheck.java
----------------------------------------------------------------------
diff --git a/eagle-jpm/eagle-hadoop-queue/src/main/java/org/apache/eagle/hadoop/queue/HadoopQueueRunningApplicationHealthCheck.java
b/eagle-jpm/eagle-hadoop-queue/src/main/java/org/apache/eagle/hadoop/queue/HadoopQueueRunningApplicationHealthCheck.java
index c73021b..02308c0 100644
--- a/eagle-jpm/eagle-hadoop-queue/src/main/java/org/apache/eagle/hadoop/queue/HadoopQueueRunningApplicationHealthCheck.java
+++ b/eagle-jpm/eagle-hadoop-queue/src/main/java/org/apache/eagle/hadoop/queue/HadoopQueueRunningApplicationHealthCheck.java
@@ -87,7 +87,7 @@ public class HadoopQueueRunningApplicationHealthCheck extends ApplicationHealthC
                 return Result.healthy();
             }
         } catch (Exception e) {
-            return Result.unhealthy(ExceptionUtils.getStackTrace(e.getCause()));
+            return Result.unhealthy(ExceptionUtils.getStackTrace(e));
         } finally {
             client.getJerseyClient().destroy();
             try {

http://git-wip-us.apache.org/repos/asf/incubator-eagle/blob/a39ca45c/eagle-jpm/eagle-jpm-mr-history/src/main/java/org/apache/eagle/jpm/mr/history/MRHistoryJobApplicationHealthCheck.java
----------------------------------------------------------------------
diff --git a/eagle-jpm/eagle-jpm-mr-history/src/main/java/org/apache/eagle/jpm/mr/history/MRHistoryJobApplicationHealthCheck.java
b/eagle-jpm/eagle-jpm-mr-history/src/main/java/org/apache/eagle/jpm/mr/history/MRHistoryJobApplicationHealthCheck.java
index 91e16df..96d8672 100644
--- a/eagle-jpm/eagle-jpm-mr-history/src/main/java/org/apache/eagle/jpm/mr/history/MRHistoryJobApplicationHealthCheck.java
+++ b/eagle-jpm/eagle-jpm-mr-history/src/main/java/org/apache/eagle/jpm/mr/history/MRHistoryJobApplicationHealthCheck.java
@@ -65,7 +65,7 @@ public class MRHistoryJobApplicationHealthCheck extends ApplicationHealthCheckBa
 
             GenericServiceAPIResponseEntity response = client
                     .search(query)
-                    .startTime(0L)
+                    .startTime(System.currentTimeMillis() - 24 * 60 * 60000L)
                     .endTime(System.currentTimeMillis())
                     .pageSize(10)
                     .send();
@@ -86,7 +86,7 @@ public class MRHistoryJobApplicationHealthCheck extends ApplicationHealthCheckBa
                 return Result.healthy();
             }
         } catch (Exception e) {
-            return Result.unhealthy(ExceptionUtils.getStackTrace(e.getCause()));
+            return Result.unhealthy(ExceptionUtils.getStackTrace(e));
         } finally {
             client.getJerseyClient().destroy();
             try {

http://git-wip-us.apache.org/repos/asf/incubator-eagle/blob/a39ca45c/eagle-jpm/eagle-jpm-spark-history/src/main/java/org/apache/eagle/jpm/spark/history/SparkHistoryJobApplicationHealthCheck.java
----------------------------------------------------------------------
diff --git a/eagle-jpm/eagle-jpm-spark-history/src/main/java/org/apache/eagle/jpm/spark/history/SparkHistoryJobApplicationHealthCheck.java
b/eagle-jpm/eagle-jpm-spark-history/src/main/java/org/apache/eagle/jpm/spark/history/SparkHistoryJobApplicationHealthCheck.java
index bbca566..bb6f390 100644
--- a/eagle-jpm/eagle-jpm-spark-history/src/main/java/org/apache/eagle/jpm/spark/history/SparkHistoryJobApplicationHealthCheck.java
+++ b/eagle-jpm/eagle-jpm-spark-history/src/main/java/org/apache/eagle/jpm/spark/history/SparkHistoryJobApplicationHealthCheck.java
@@ -65,7 +65,7 @@ public class SparkHistoryJobApplicationHealthCheck extends ApplicationHealthChec
 
             GenericServiceAPIResponseEntity response = client
                     .search(query)
-                    .startTime(0L)
+                    .startTime(System.currentTimeMillis() - 12 * 60 * 60000L)
                     .endTime(System.currentTimeMillis())
                     .pageSize(10)
                     .send();
@@ -86,7 +86,7 @@ public class SparkHistoryJobApplicationHealthCheck extends ApplicationHealthChec
                 return Result.healthy();
             }
         } catch (Exception e) {
-            return Result.unhealthy(ExceptionUtils.getStackTrace(e.getCause()));
+            return Result.unhealthy(ExceptionUtils.getStackTrace(e));
         } finally {
             client.getJerseyClient().destroy();
             try {

http://git-wip-us.apache.org/repos/asf/incubator-eagle/blob/a39ca45c/eagle-topology-check/eagle-topology-app/src/main/java/org/apache/eagle/topology/TopologyCheckApplicationHealthCheck.java
----------------------------------------------------------------------
diff --git a/eagle-topology-check/eagle-topology-app/src/main/java/org/apache/eagle/topology/TopologyCheckApplicationHealthCheck.java
b/eagle-topology-check/eagle-topology-app/src/main/java/org/apache/eagle/topology/TopologyCheckApplicationHealthCheck.java
index 25730c8..67669f8 100644
--- a/eagle-topology-check/eagle-topology-app/src/main/java/org/apache/eagle/topology/TopologyCheckApplicationHealthCheck.java
+++ b/eagle-topology-check/eagle-topology-app/src/main/java/org/apache/eagle/topology/TopologyCheckApplicationHealthCheck.java
@@ -64,7 +64,7 @@ public class TopologyCheckApplicationHealthCheck extends ApplicationHealthCheckB
 
             GenericServiceAPIResponseEntity response = client
                     .search(query)
-                    .metricName(String.format(TopologyConstants.METRIC_LIVE_RATIO_NAME_FORMAT,
TopologyConstants.REGIONSERVER_ROLE))
+                    .metricName(String.format(TopologyConstants.METRIC_LIVE_RATIO_NAME_FORMAT,
TopologyConstants.DATA_NODE_ROLE))
                     .startTime(System.currentTimeMillis() - 2 * 60 * 60000L)
                     .endTime(System.currentTimeMillis())
                     .pageSize(Integer.MAX_VALUE)
@@ -85,7 +85,7 @@ public class TopologyCheckApplicationHealthCheck extends ApplicationHealthCheckB
                 return Result.healthy();
             }
         } catch (Exception e) {
-            return Result.unhealthy(ExceptionUtils.getStackTrace(e.getCause()));
+            return Result.unhealthy(ExceptionUtils.getStackTrace(e));
         } finally {
             client.getJerseyClient().destroy();
             try {


Mime
View raw message