brooklyn-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From aleds...@apache.org
Subject [4/5] brooklyn-server git commit: Review comments
Date Wed, 20 Dec 2017 16:13:36 GMT
Review comments


Project: http://git-wip-us.apache.org/repos/asf/brooklyn-server/repo
Commit: http://git-wip-us.apache.org/repos/asf/brooklyn-server/commit/61db8346
Tree: http://git-wip-us.apache.org/repos/asf/brooklyn-server/tree/61db8346
Diff: http://git-wip-us.apache.org/repos/asf/brooklyn-server/diff/61db8346

Branch: refs/heads/master
Commit: 61db8346a2646c1934cbf7b8918a711c49dcad3f
Parents: 39e822f
Author: graeme.miller <graeme.miller@cloudsoftcorp.com>
Authored: Wed Dec 20 14:44:48 2017 +0000
Committer: graeme.miller <graeme.miller@cloudsoftcorp.com>
Committed: Wed Dec 20 14:44:48 2017 +0000

----------------------------------------------------------------------
 .../brooklyn/enricher/stock/aggregator/AggregationJob.java  | 3 +++
 .../enricher/stock/aggregator/DashboardAggregator.java      | 9 +++++++--
 2 files changed, 10 insertions(+), 2 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/brooklyn-server/blob/61db8346/core/src/main/java/org/apache/brooklyn/enricher/stock/aggregator/AggregationJob.java
----------------------------------------------------------------------
diff --git a/core/src/main/java/org/apache/brooklyn/enricher/stock/aggregator/AggregationJob.java
b/core/src/main/java/org/apache/brooklyn/enricher/stock/aggregator/AggregationJob.java
index 641325c..ed8c006 100644
--- a/core/src/main/java/org/apache/brooklyn/enricher/stock/aggregator/AggregationJob.java
+++ b/core/src/main/java/org/apache/brooklyn/enricher/stock/aggregator/AggregationJob.java
@@ -26,9 +26,12 @@ import java.util.Map;
 
 import org.apache.commons.lang3.StringUtils;
 
+import com.google.common.annotations.Beta;
+
 import org.apache.brooklyn.api.entity.Entity;
 import org.apache.brooklyn.core.sensor.BasicAttributeSensorAndConfigKey;
 
+@Beta
 public final class AggregationJob implements Runnable {
 
     public static BasicAttributeSensorAndConfigKey<Map<String, String>> DASHBOARD_COST_PER_MONTH
= new BasicAttributeSensorAndConfigKey(Map.class,

http://git-wip-us.apache.org/repos/asf/brooklyn-server/blob/61db8346/core/src/main/java/org/apache/brooklyn/enricher/stock/aggregator/DashboardAggregator.java
----------------------------------------------------------------------
diff --git a/core/src/main/java/org/apache/brooklyn/enricher/stock/aggregator/DashboardAggregator.java
b/core/src/main/java/org/apache/brooklyn/enricher/stock/aggregator/DashboardAggregator.java
index f8e9775..de9964b 100644
--- a/core/src/main/java/org/apache/brooklyn/enricher/stock/aggregator/DashboardAggregator.java
+++ b/core/src/main/java/org/apache/brooklyn/enricher/stock/aggregator/DashboardAggregator.java
@@ -21,6 +21,8 @@ package org.apache.brooklyn.enricher.stock.aggregator;
 import java.util.Map;
 import java.util.concurrent.Callable;
 
+import com.google.common.annotations.Beta;
+
 import org.apache.brooklyn.api.entity.EntityLocal;
 import org.apache.brooklyn.api.mgmt.Task;
 import org.apache.brooklyn.core.enricher.AbstractEnricher;
@@ -38,12 +40,13 @@ import org.apache.brooklyn.util.time.Duration;
  * The reason that this exists is to provide high level summary information, that could be
useful to display on a dashboard.
  * Whilst brooklyn itself has no such dashboard, we can imagine this entity being used in
that fashion.
  *
- * Please note, that the DashboardAggregator will aggregate all children of the entity it
is attached to, even intermediate level children.
+ * Please note, that the DashboardAggregator will aggregate all descendants of the entity
it is attached to, even intermediate level children.
  * Therefore, please only ever attach one DashboardAggregator to the top most entity.
  *
  * For a detailed list of the config that is combined, please see the AggregationJob class.
  *
  */
+@Beta
 public class DashboardAggregator extends AbstractEnricher {
 
     private ScheduledTask task;
@@ -76,6 +79,8 @@ public class DashboardAggregator extends AbstractEnricher {
     @Override
     public void destroy() {
         super.destroy();
-        task.cancel();
+        if (task != null) {
+            task.cancel();
+        }
     }
 }
\ No newline at end of file


Mime
View raw message