camel-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From davscl...@apache.org
Subject camel git commit: CAMEL-9879: Circuit Breaker EIP - That is using hystrix.
Date Wed, 20 Apr 2016 08:32:50 GMT
Repository: camel
Updated Branches:
  refs/heads/master 7122a089a -> 3b3ca3152


CAMEL-9879: Circuit Breaker EIP - That is using hystrix.


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

Branch: refs/heads/master
Commit: 3b3ca3152071017397c489f28be2835819c0a5e5
Parents: 7122a08
Author: Claus Ibsen <davsclaus@apache.org>
Authored: Wed Apr 20 10:32:43 2016 +0200
Committer: Claus Ibsen <davsclaus@apache.org>
Committed: Wed Apr 20 10:32:43 2016 +0200

----------------------------------------------------------------------
 .../hystrix/processor/HystrixProcessor.java         | 16 ++++++++--------
 .../hystrix/processor/HystrixManagementTest.java    |  8 ++++----
 2 files changed, 12 insertions(+), 12 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/camel/blob/3b3ca315/components/camel-hystrix/src/main/java/org/apache/camel/component/hystrix/processor/HystrixProcessor.java
----------------------------------------------------------------------
diff --git a/components/camel-hystrix/src/main/java/org/apache/camel/component/hystrix/processor/HystrixProcessor.java
b/components/camel-hystrix/src/main/java/org/apache/camel/component/hystrix/processor/HystrixProcessor.java
index 6576d41..b0abbe7 100644
--- a/components/camel-hystrix/src/main/java/org/apache/camel/component/hystrix/processor/HystrixProcessor.java
+++ b/components/camel-hystrix/src/main/java/org/apache/camel/component/hystrix/processor/HystrixProcessor.java
@@ -59,17 +59,17 @@ public class HystrixProcessor extends ServiceSupport implements AsyncProcessor,
     }
 
     @ManagedAttribute
-    public String getCommandKey() {
+    public String getHystrixCommandKey() {
         return commandKey.name();
     }
 
     @ManagedAttribute
-    public String getGroupKey() {
+    public String getHystrixGroupKey() {
         return groupKey.name();
     }
 
     @ManagedAttribute
-    public int getTotalTimeMean() {
+    public int getHystrixTotalTimeMean() {
         HystrixCommandMetrics metrics = HystrixCommandMetrics.getInstance(commandKey);
         if (metrics != null) {
             return metrics.getTotalTimeMean();
@@ -78,7 +78,7 @@ public class HystrixProcessor extends ServiceSupport implements AsyncProcessor,
     }
 
     @ManagedAttribute
-    public int getExecutionTimeMean() {
+    public int getHystrixExecutionTimeMean() {
         HystrixCommandMetrics metrics = HystrixCommandMetrics.getInstance(commandKey);
         if (metrics != null) {
             return metrics.getExecutionTimeMean();
@@ -87,7 +87,7 @@ public class HystrixProcessor extends ServiceSupport implements AsyncProcessor,
     }
 
     @ManagedAttribute
-    public int getCurrentConcurrentExecutionCount() {
+    public int getHystrixCurrentConcurrentExecutionCount() {
         HystrixCommandMetrics metrics = HystrixCommandMetrics.getInstance(commandKey);
         if (metrics != null) {
             return metrics.getCurrentConcurrentExecutionCount();
@@ -96,7 +96,7 @@ public class HystrixProcessor extends ServiceSupport implements AsyncProcessor,
     }
 
     @ManagedAttribute
-    public long getTotalRequests() {
+    public long getHystrixTotalRequests() {
         HystrixCommandMetrics metrics = HystrixCommandMetrics.getInstance(commandKey);
         if (metrics != null) {
             return metrics.getHealthCounts().getTotalRequests();
@@ -105,7 +105,7 @@ public class HystrixProcessor extends ServiceSupport implements AsyncProcessor,
     }
 
     @ManagedAttribute
-    public long getErrorCount() {
+    public long getHystrixErrorCount() {
         HystrixCommandMetrics metrics = HystrixCommandMetrics.getInstance(commandKey);
         if (metrics != null) {
             return metrics.getHealthCounts().getErrorCount();
@@ -114,7 +114,7 @@ public class HystrixProcessor extends ServiceSupport implements AsyncProcessor,
     }
 
     @ManagedAttribute
-    public int getErrorPercentage() {
+    public int getHystrixErrorPercentage() {
         HystrixCommandMetrics metrics = HystrixCommandMetrics.getInstance(commandKey);
         if (metrics != null) {
             return metrics.getHealthCounts().getErrorPercentage();

http://git-wip-us.apache.org/repos/asf/camel/blob/3b3ca315/components/camel-hystrix/src/test/java/org/apache/camel/component/hystrix/processor/HystrixManagementTest.java
----------------------------------------------------------------------
diff --git a/components/camel-hystrix/src/test/java/org/apache/camel/component/hystrix/processor/HystrixManagementTest.java
b/components/camel-hystrix/src/test/java/org/apache/camel/component/hystrix/processor/HystrixManagementTest.java
index 6cdb243..363f579 100644
--- a/components/camel-hystrix/src/test/java/org/apache/camel/component/hystrix/processor/HystrixManagementTest.java
+++ b/components/camel-hystrix/src/test/java/org/apache/camel/component/hystrix/processor/HystrixManagementTest.java
@@ -57,19 +57,19 @@ public class HystrixManagementTest extends CamelTestSupport {
         assertEquals("start", routeId);
 
         // should be id of the node
-        String commandKey = (String) mbeanServer.getAttribute(on, "CommandKey");
+        String commandKey = (String) mbeanServer.getAttribute(on, "HystrixCommandKey");
         assertEquals("myHystrix", commandKey);
 
-        String groupKey = (String) mbeanServer.getAttribute(on, "GroupKey");
+        String groupKey = (String) mbeanServer.getAttribute(on, "HystrixGroupKey");
         assertEquals("CamelHystrix", groupKey);
 
         // these metrics need a little time before updating
         Thread.sleep(1000);
 
-        Long totalRequests = (Long) mbeanServer.getAttribute(on, "TotalRequests");
+        Long totalRequests = (Long) mbeanServer.getAttribute(on, "HystrixTotalRequests");
         assertEquals(1, totalRequests.longValue());
 
-        Long errorCount = (Long) mbeanServer.getAttribute(on, "ErrorCount");
+        Long errorCount = (Long) mbeanServer.getAttribute(on, "HystrixErrorCount");
         assertEquals(0, errorCount.longValue());
     }
 


Mime
View raw message