activemq-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From chir...@apache.org
Subject svn commit: r1484058 - in /activemq/activemq-apollo/trunk: apollo-broker/src/main/scala/org/apache/activemq/apollo/broker/VirtualHost.scala pom.xml
Date Sat, 18 May 2013 04:57:56 GMT
Author: chirino
Date: Sat May 18 04:57:56 2013
New Revision: 1484058

URL: http://svn.apache.org/r1484058
Log:
Fix bug were stats were not consistent.

Modified:
    activemq/activemq-apollo/trunk/apollo-broker/src/main/scala/org/apache/activemq/apollo/broker/VirtualHost.scala
    activemq/activemq-apollo/trunk/pom.xml

Modified: activemq/activemq-apollo/trunk/apollo-broker/src/main/scala/org/apache/activemq/apollo/broker/VirtualHost.scala
URL: http://svn.apache.org/viewvc/activemq/activemq-apollo/trunk/apollo-broker/src/main/scala/org/apache/activemq/apollo/broker/VirtualHost.scala?rev=1484058&r1=1484057&r2=1484058&view=diff
==============================================================================
--- activemq/activemq-apollo/trunk/apollo-broker/src/main/scala/org/apache/activemq/apollo/broker/VirtualHost.scala
(original)
+++ activemq/activemq-apollo/trunk/apollo-broker/src/main/scala/org/apache/activemq/apollo/broker/VirtualHost.scala
Sat May 18 04:57:56 2013
@@ -321,19 +321,29 @@ class VirtualHost(val broker: Broker, va
   def get_dest_metrics:FutureResult[AggregateDestMetricsDTO] = {
     // zero out the enqueue stats on the dsubs since they will already be accounted for in
the topic
     // stats.
-    Future.all(List(get_queue_metrics, get_topic_metrics, get_dsub_metrics)).map { x =>
-      val y = x.toArray
-      val (queue, topic, dsub) = (y(0), y(1), y(2))
+    val queue = get_queue_metrics
+    val topic = get_topic_metrics
+    val dsub = get_dsub_metrics
+
+    Future.all(List(queue, topic, dsub)).map { _ =>
+
       var rc = new AggregateDestMetricsDTO
-      for( queue <- queue.success_option;  topic <- topic.success_option; dsub <-
dsub.success_option ) {
+      for( queue <- queue.get.success_option ) {
+        DestinationMetricsSupport.add_destination_metrics(rc, queue)
+        rc.objects += queue.objects
+      }
+      for( topic <- topic.get.success_option ) {
+        DestinationMetricsSupport.add_destination_metrics(rc, topic)
+        rc.objects += topic.objects
+      }
+      for(  dsub <- dsub.get.success_option ) {
         dsub.enqueue_item_counter = 0L
         dsub.enqueue_size_counter = 0L
         dsub.enqueue_ts = 0L
-        rc = aggregate_dest_metrics(List(queue, dsub))
-        DestinationMetricsSupport.add_destination_metrics(rc, topic)
-        rc.objects += topic.objects
-        rc.current_time = broker.now
+        DestinationMetricsSupport.add_destination_metrics(rc, dsub)
+        rc.objects += dsub.objects
       }
+      rc.current_time = broker.now
       Success(rc)
     }
   }

Modified: activemq/activemq-apollo/trunk/pom.xml
URL: http://svn.apache.org/viewvc/activemq/activemq-apollo/trunk/pom.xml?rev=1484058&r1=1484057&r2=1484058&view=diff
==============================================================================
--- activemq/activemq-apollo/trunk/pom.xml (original)
+++ activemq/activemq-apollo/trunk/pom.xml Sat May 18 04:57:56 2013
@@ -97,7 +97,7 @@
     <xbean-version>3.4</xbean-version>
     <felix-version>1.0.0</felix-version>
 
-    <hawtdispatch-version>1.16</hawtdispatch-version>
+    <hawtdispatch-version>1.17-SNAPSHOT</hawtdispatch-version>
     <hawtbuf-version>1.9</hawtbuf-version>
     <stompjms-version>1.16</stompjms-version>
     



Mime
View raw message