You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@giraph.apache.org by ma...@apache.org on 2014/01/08 21:09:45 UTC
git commit: updated refs/heads/trunk to 20f8df0
Updated Branches:
refs/heads/trunk cdb49fd5f -> 20f8df00e
GIRAPH-810: Giraph should track aggregate statistics over lifetime of the computation (rvesse via majakabiljo)
Project: http://git-wip-us.apache.org/repos/asf/giraph/repo
Commit: http://git-wip-us.apache.org/repos/asf/giraph/commit/20f8df00
Tree: http://git-wip-us.apache.org/repos/asf/giraph/tree/20f8df00
Diff: http://git-wip-us.apache.org/repos/asf/giraph/diff/20f8df00
Branch: refs/heads/trunk
Commit: 20f8df00e71a0061de820f0973f7fa7b62086afb
Parents: cdb49fd
Author: Maja Kabiljo <ma...@fb.com>
Authored: Wed Jan 8 12:09:15 2014 -0800
Committer: Maja Kabiljo <ma...@fb.com>
Committed: Wed Jan 8 12:09:15 2014 -0800
----------------------------------------------------------------------
CHANGELOG | 3 ++
.../org/apache/giraph/counters/GiraphStats.java | 36 ++++++++++++++++++--
.../apache/giraph/master/BspServiceMaster.java | 3 ++
3 files changed, 40 insertions(+), 2 deletions(-)
----------------------------------------------------------------------
http://git-wip-us.apache.org/repos/asf/giraph/blob/20f8df00/CHANGELOG
----------------------------------------------------------------------
diff --git a/CHANGELOG b/CHANGELOG
index b29aa66..645cd72 100644
--- a/CHANGELOG
+++ b/CHANGELOG
@@ -1,6 +1,9 @@
Giraph Change Log
Release 1.1.0 - unreleased
+ GIRAPH-810: Giraph should track aggregate statistics over lifetime of the computation
+ (rvesse via majakabiljo)
+
GIRAPH-785: Improve GraphPartitionerFactory usage (ikabiljo via majakabiljo)
GIRAPH-815: Exclude dependency and duplicate finder checks to profile we do not check (aching)
http://git-wip-us.apache.org/repos/asf/giraph/blob/20f8df00/giraph-core/src/main/java/org/apache/giraph/counters/GiraphStats.java
----------------------------------------------------------------------
diff --git a/giraph-core/src/main/java/org/apache/giraph/counters/GiraphStats.java b/giraph-core/src/main/java/org/apache/giraph/counters/GiraphStats.java
index bef0523..d96b474 100644
--- a/giraph-core/src/main/java/org/apache/giraph/counters/GiraphStats.java
+++ b/giraph-core/src/main/java/org/apache/giraph/counters/GiraphStats.java
@@ -40,8 +40,14 @@ public class GiraphStats extends HadoopCountersBase {
public static final String EDGES_NAME = "Aggregate edges";
/** sent messages counter name */
public static final String SENT_MESSAGES_NAME = "Sent messages";
- /** sent messages counter name */
+ /** sent message bytes counter name */
public static final String SENT_MESSAGE_BYTES_NAME = "Sent message bytes";
+ /** aggregate sent messages counter name */
+ public static final String AGGREGATE_SENT_MESSAGES_NAME
+ = "Aggregate sent messages";
+ /** aggregate sent messages bytes counter name */
+ public static final String AGGREGATE_SENT_MESSAGE_BYTES_NAME
+ = "Aggregate sent message message bytes";
/** workers counter name */
public static final String CURRENT_WORKERS_NAME = "Current workers";
/** current master partition task counter name */
@@ -72,8 +78,12 @@ public class GiraphStats extends HadoopCountersBase {
private static final int LAST_CHECKPOINTED_SUPERSTEP = 7;
/** Sent message bytes counter */
private static final int SENT_MESSAGE_BYTES = 8;
+ /** Aggregate sent messages counter */
+ private static final int AGG_SENT_MESSAGES = 9;
+ /** Aggregate sent message bytes counter */
+ private static final int AGG_SENT_MESSAGE_BYTES = 10;
/** Number of counters in this class */
- private static final int NUM_COUNTERS = 9;
+ private static final int NUM_COUNTERS = 11;
/** All the counters stored */
private final GiraphHadoopCounter[] counters;
@@ -97,6 +107,10 @@ public class GiraphStats extends HadoopCountersBase {
getCounter(CURRENT_MASTER_PARTITION_TASK_NAME);
counters[LAST_CHECKPOINTED_SUPERSTEP] =
getCounter(LAST_CHECKPOINTED_SUPERSTEP_NAME);
+ counters[AGG_SENT_MESSAGES] =
+ getCounter(AGGREGATE_SENT_MESSAGES_NAME);
+ counters[AGG_SENT_MESSAGE_BYTES] =
+ getCounter(AGGREGATE_SENT_MESSAGE_BYTES_NAME);
}
/**
@@ -172,6 +186,24 @@ public class GiraphStats extends HadoopCountersBase {
}
/**
+ * Get AggregateSentMessages counter
+ *
+ * @return AggregateSentMessages counter
+ */
+ public GiraphHadoopCounter getAggregateSentMessages() {
+ return counters[AGG_SENT_MESSAGES];
+ }
+
+ /**
+ * Get AggregateSentMessageBytes counter
+ *
+ * @return AggregateSentMessageBytes counter
+ */
+ public GiraphHadoopCounter getAggregateSentMessageBytes() {
+ return counters[AGG_SENT_MESSAGE_BYTES];
+ }
+
+ /**
* Get CurrentWorkers counter
*
* @return CurrentWorkers counter
http://git-wip-us.apache.org/repos/asf/giraph/blob/20f8df00/giraph-core/src/main/java/org/apache/giraph/master/BspServiceMaster.java
----------------------------------------------------------------------
diff --git a/giraph-core/src/main/java/org/apache/giraph/master/BspServiceMaster.java b/giraph-core/src/main/java/org/apache/giraph/master/BspServiceMaster.java
index baa8434..78487ef 100644
--- a/giraph-core/src/main/java/org/apache/giraph/master/BspServiceMaster.java
+++ b/giraph-core/src/main/java/org/apache/giraph/master/BspServiceMaster.java
@@ -1970,6 +1970,9 @@ public class BspServiceMaster<I extends WritableComparable,
gs.getEdges().setValue(globalStats.getEdgeCount());
gs.getSentMessages().setValue(globalStats.getMessageCount());
gs.getSentMessageBytes().setValue(globalStats.getMessageBytesCount());
+ gs.getAggregateSentMessages().increment(globalStats.getMessageCount());
+ gs.getAggregateSentMessageBytes()
+ .increment(globalStats.getMessageBytesCount());
}
/**