You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@giraph.apache.org by ed...@apache.org on 2016/11/14 19:59:10 UTC
git commit: updated refs/heads/trunk to f892342
Repository: giraph
Updated Branches:
refs/heads/trunk 0b67d74ec -> f89234214
Fix Checkstyle
Test Plan:
mvn clean site -DskipTests -Phadoop_2 -Ddependency.locations.enabled=false
mvn clean install -Phadoop_2 -Prelease
mvn clean install -Phadoop_1 -Prelease
Reviewers: dionysis.logothetis
Reviewed By: dionysis.logothetis
Differential Revision: https://reviews.facebook.net/D65499
Project: http://git-wip-us.apache.org/repos/asf/giraph/repo
Commit: http://git-wip-us.apache.org/repos/asf/giraph/commit/f8923421
Tree: http://git-wip-us.apache.org/repos/asf/giraph/tree/f8923421
Diff: http://git-wip-us.apache.org/repos/asf/giraph/diff/f8923421
Branch: refs/heads/trunk
Commit: f892342140c4dd4e852eebf3279723fe6ef6519c
Parents: 0b67d74
Author: Sergey Edunov <ed...@fb.com>
Authored: Mon Nov 14 11:58:59 2016 -0800
Committer: Sergey Edunov <ed...@fb.com>
Committed: Mon Nov 14 11:58:59 2016 -0800
----------------------------------------------------------------------
.../block_app/framework/api/BlockApiHandle.java | 9 ++++----
.../flow_control/CreditBasedFlowControl.java | 13 ++++++------
.../apache/giraph/jython/JythonComputation.java | 22 +++++++++++---------
.../giraph/jython/JythonGiraphComputation.java | 8 +++----
.../JythonOutgoingMessageValueFactory.java | 5 ++---
.../giraph/metrics/GiraphMetricsRegistry.java | 3 ++-
.../apache/giraph/reducers/ReduceOperation.java | 4 ++--
.../giraph/reducers/impl/MaxPairReducer.java | 3 ++-
8 files changed, 35 insertions(+), 32 deletions(-)
----------------------------------------------------------------------
http://git-wip-us.apache.org/repos/asf/giraph/blob/f8923421/giraph-block-app/src/main/java/org/apache/giraph/block_app/framework/api/BlockApiHandle.java
----------------------------------------------------------------------
diff --git a/giraph-block-app/src/main/java/org/apache/giraph/block_app/framework/api/BlockApiHandle.java b/giraph-block-app/src/main/java/org/apache/giraph/block_app/framework/api/BlockApiHandle.java
index 20fe8ae..259be9e 100644
--- a/giraph-block-app/src/main/java/org/apache/giraph/block_app/framework/api/BlockApiHandle.java
+++ b/giraph-block-app/src/main/java/org/apache/giraph/block_app/framework/api/BlockApiHandle.java
@@ -17,9 +17,6 @@
*/
package org.apache.giraph.block_app.framework.api;
-import org.apache.giraph.block_app.framework.block.Block;
-import org.apache.giraph.block_app.framework.block.BlockWithApiHandle;
-
import static com.google.common.base.Preconditions.checkNotNull;
/**
@@ -30,8 +27,10 @@ import static com.google.common.base.Preconditions.checkNotNull;
* Block Api interfaces, (ii) are not in the context of a Piece when defined,
* and (iii) are in the context of a Piece when executed.
*
- * To do this, as opposed to defining an application as a {@link Block}, define
- * your application as a {@link BlockWithApiHandle}.
+ * To do this, as opposed to defining an application as a
+ * {@link org.apache.giraph.block_app.framework.block.Block}, define
+ * your application as a
+ * {@link org.apache.giraph.block_app.framework.block.BlockWithApiHandle}.
*
* NOTE: Depending on the context in which this class is used, some of the
* handles may not be set. For instance, the {@link masterApi} is not set when
http://git-wip-us.apache.org/repos/asf/giraph/blob/f8923421/giraph-core/src/main/java/org/apache/giraph/comm/flow_control/CreditBasedFlowControl.java
----------------------------------------------------------------------
diff --git a/giraph-core/src/main/java/org/apache/giraph/comm/flow_control/CreditBasedFlowControl.java b/giraph-core/src/main/java/org/apache/giraph/comm/flow_control/CreditBasedFlowControl.java
index 5f28bc6..0e20eee 100644
--- a/giraph-core/src/main/java/org/apache/giraph/comm/flow_control/CreditBasedFlowControl.java
+++ b/giraph-core/src/main/java/org/apache/giraph/comm/flow_control/CreditBasedFlowControl.java
@@ -59,12 +59,13 @@ import com.google.common.collect.Sets;
/**
* Representation of credit-based flow control policy. With this policy there
* can be limited number of open requests from any worker x to any other worker
- * y. This number is called 'credit'. Let's denote this number by C{x->y}. This
- * implementation assumes that for a particular worker W, all values of C{x->W}
- * are the same. Let's denote this value by CR_W. CR_W may change due to other
- * reasons (e.g. memory pressure observed in an out-of-core mechanism). However,
- * CR_W is always in range [0, MAX_CR], where MAX_CR is a user-defined constant.
- * Note that MAX_CR should be representable by at most 14 bits.
+ * y. This number is called 'credit'. Let's denote this number by C{x->y}.
+ * This implementation assumes that for a particular worker W, all values of
+ * C{x->W} are the same. Let's denote this value by CR_W. CR_W may change
+ * due to other reasons (e.g. memory pressure observed in an out-of-core
+ * mechanism). However, CR_W is always in range [0, MAX_CR], where MAX_CR
+ * is a user-defined constant. Note that MAX_CR should be representable by
+ * at most 14 bits.
*
* In this implementation, the value of CR_W is announced to other workers along
* with the ACK response envelope for all ACK response envelope going out of W.
http://git-wip-us.apache.org/repos/asf/giraph/blob/f8923421/giraph-core/src/main/java/org/apache/giraph/jython/JythonComputation.java
----------------------------------------------------------------------
diff --git a/giraph-core/src/main/java/org/apache/giraph/jython/JythonComputation.java b/giraph-core/src/main/java/org/apache/giraph/jython/JythonComputation.java
index 8b035de..c095d90 100644
--- a/giraph-core/src/main/java/org/apache/giraph/jython/JythonComputation.java
+++ b/giraph-core/src/main/java/org/apache/giraph/jython/JythonComputation.java
@@ -20,10 +20,8 @@ package org.apache.giraph.jython;
import org.apache.giraph.conf.DefaultImmutableClassesGiraphConfigurable;
import org.apache.giraph.edge.Edge;
import org.apache.giraph.edge.OutEdges;
-import org.apache.giraph.graph.Computation;
import org.apache.giraph.graph.GraphType;
import org.apache.giraph.graph.Vertex;
-import org.apache.giraph.jython.wrappers.JythonWritableWrapper;
import org.apache.giraph.worker.WorkerContext;
import org.apache.hadoop.io.Writable;
import org.apache.hadoop.io.WritableComparable;
@@ -35,16 +33,20 @@ import java.util.Iterator;
/**
* Base class for writing computations in Jython.
*
- * Note that this class DOES NOT implement {@link Computation}. This is because
- * we want to support passing in pure Jython types, and implementing the
- * {@link Computation} requires passing in {@link Writable}s. Calling such
- * methods from Jython would throw errors. So, instead, we have recreated the
- * methods with the same name here. In each method we check if the type is a
- * pure Jython value, and if so wrap it in the necessary
- * {@link JythonWritableWrapper}.
+ * Note that this class DOES NOT implement
+ * {@link org.apache.giraph.graph.Computation}.
+ * This is because we want to support passing in pure Jython types,
+ * and implementing the {@link org.apache.giraph.graph.Computation}
+ * requires passing in {@link Writable}s.
+ * Calling such methods from Jython would throw errors. So, instead,
+ * we have recreated the methods with the same name here. In each method
+ * we check if the type is a pure Jython value, and if so wrap it in
+ * the necessary
+ * {@link org.apache.giraph.jython.wrappers.JythonWritableWrapper}.
*
* This class works together with {@link JythonGiraphComputation} which takes
- * care of the {@link Computation} Giraph infrastructure side of things.
+ * care of the {@link org.apache.giraph.graph.Computation}
+ * Giraph infrastructure side of things.
*/
public abstract class JythonComputation extends
DefaultImmutableClassesGiraphConfigurable {
http://git-wip-us.apache.org/repos/asf/giraph/blob/f8923421/giraph-core/src/main/java/org/apache/giraph/jython/JythonGiraphComputation.java
----------------------------------------------------------------------
diff --git a/giraph-core/src/main/java/org/apache/giraph/jython/JythonGiraphComputation.java b/giraph-core/src/main/java/org/apache/giraph/jython/JythonGiraphComputation.java
index 4b78b89..f35c591 100644
--- a/giraph-core/src/main/java/org/apache/giraph/jython/JythonGiraphComputation.java
+++ b/giraph-core/src/main/java/org/apache/giraph/jython/JythonGiraphComputation.java
@@ -18,7 +18,6 @@
package org.apache.giraph.jython;
import org.apache.giraph.graph.AbstractComputation;
-import org.apache.giraph.graph.Computation;
import org.apache.giraph.graph.GraphType;
import org.apache.giraph.graph.Language;
import org.apache.giraph.graph.Vertex;
@@ -32,9 +31,10 @@ import com.google.common.base.Preconditions;
import java.io.IOException;
/**
- * The {@link Computation} class for using Jython with Giraph. This class
- * implements the Giraph necessary interfaces but it actually holds a reference
- * to the {@link JythonComputation} which does the real work.
+ * The {@link org.apache.giraph.graph.Computation} class for using
+ * Jython with Giraph. This class implements the Giraph necessary
+ * interfaces but it actually holds a reference to the
+ * {@link JythonComputation} which does the real work.
*
* The two classes are linked and together they allow us to coerce Jython types
* to Writables.
http://git-wip-us.apache.org/repos/asf/giraph/blob/f8923421/giraph-core/src/main/java/org/apache/giraph/jython/factories/JythonOutgoingMessageValueFactory.java
----------------------------------------------------------------------
diff --git a/giraph-core/src/main/java/org/apache/giraph/jython/factories/JythonOutgoingMessageValueFactory.java b/giraph-core/src/main/java/org/apache/giraph/jython/factories/JythonOutgoingMessageValueFactory.java
index ea03bac..2d2052d 100644
--- a/giraph-core/src/main/java/org/apache/giraph/jython/factories/JythonOutgoingMessageValueFactory.java
+++ b/giraph-core/src/main/java/org/apache/giraph/jython/factories/JythonOutgoingMessageValueFactory.java
@@ -17,13 +17,12 @@
*/
package org.apache.giraph.jython.factories;
-import org.apache.giraph.factories.MessageValueFactory;
import org.apache.giraph.jython.JythonOptions;
import org.apache.hadoop.io.Writable;
/**
- * {@link MessageValueFactory} that creates outgoing message values which are
- * Jython classes.
+ * {@link org.apache.giraph.factories.MessageValueFactory} that
+ * creates outgoing message values which are Jython classes.
*
* @param <M> Outgoing Message Value
*/
http://git-wip-us.apache.org/repos/asf/giraph/blob/f8923421/giraph-core/src/main/java/org/apache/giraph/metrics/GiraphMetricsRegistry.java
----------------------------------------------------------------------
diff --git a/giraph-core/src/main/java/org/apache/giraph/metrics/GiraphMetricsRegistry.java b/giraph-core/src/main/java/org/apache/giraph/metrics/GiraphMetricsRegistry.java
index ab2fad7..f771f4a 100644
--- a/giraph-core/src/main/java/org/apache/giraph/metrics/GiraphMetricsRegistry.java
+++ b/giraph-core/src/main/java/org/apache/giraph/metrics/GiraphMetricsRegistry.java
@@ -274,7 +274,8 @@ public class GiraphMetricsRegistry {
* Get a Gauge that is already present in the MetricsRegistry
*
* @param name String name of Gauge
- * @return Gauge<T> from MetricsRegistry
+ * @param <T> type of gauge
+ * @return Gauge, from MetricsRegistry
*/
public <T> Gauge<T> getExistingGauge(String name) {
Metric metric = registry.allMetrics().get(makeMetricName(name));
http://git-wip-us.apache.org/repos/asf/giraph/blob/f8923421/giraph-core/src/main/java/org/apache/giraph/reducers/ReduceOperation.java
----------------------------------------------------------------------
diff --git a/giraph-core/src/main/java/org/apache/giraph/reducers/ReduceOperation.java b/giraph-core/src/main/java/org/apache/giraph/reducers/ReduceOperation.java
index 38afa2c..58fd03b 100644
--- a/giraph-core/src/main/java/org/apache/giraph/reducers/ReduceOperation.java
+++ b/giraph-core/src/main/java/org/apache/giraph/reducers/ReduceOperation.java
@@ -17,7 +17,6 @@
*/
package org.apache.giraph.reducers;
-import org.apache.giraph.master.AggregatorReduceOperation;
import org.apache.hadoop.io.Writable;
/**
@@ -27,7 +26,8 @@ import org.apache.hadoop.io.Writable;
*
* Object should be thread safe. Most frequently it should be
* immutable object, so that functions can execute concurrently.
- * Rarely when object is mutable ({@link AggregatorReduceOperation}),
+ * Rarely when object is mutable
+ * ({@link org.apache.giraph.master.AggregatorReduceOperation}),
* i.e. stores reusable object inside, accesses should be synchronized.
*
* @param <S> Single value type, objects passed on workers
http://git-wip-us.apache.org/repos/asf/giraph/blob/f8923421/giraph-core/src/main/java/org/apache/giraph/reducers/impl/MaxPairReducer.java
----------------------------------------------------------------------
diff --git a/giraph-core/src/main/java/org/apache/giraph/reducers/impl/MaxPairReducer.java b/giraph-core/src/main/java/org/apache/giraph/reducers/impl/MaxPairReducer.java
index e7e404d..0881648 100644
--- a/giraph-core/src/main/java/org/apache/giraph/reducers/impl/MaxPairReducer.java
+++ b/giraph-core/src/main/java/org/apache/giraph/reducers/impl/MaxPairReducer.java
@@ -30,7 +30,8 @@ import org.apache.hadoop.io.WritableComparable;
/**
- * Aggregating PairWritable<L, R>, by taking pair with largest second value.
+ * Aggregating PairWritable<L, R>, by taking pair with
+ * largest second value.
*
* @param <L> Type of the left value
* @param <R> Type of the right value