Skip to content

Commit

Permalink
Fix Checkstyle
Browse files Browse the repository at this point in the history
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
  • Loading branch information
Sergey Edunov committed Nov 14, 2016
1 parent 0b67d74 commit f892342
Show file tree
Hide file tree
Showing 8 changed files with 35 additions and 32 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -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;

/**
Expand All @@ -30,8 +27,10 @@
* 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
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -59,12 +59,13 @@
/**
* 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.
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -20,10 +20,8 @@
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;
Expand All @@ -35,16 +33,20 @@
/**
* 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 {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -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;
Expand All @@ -32,9 +31,10 @@
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.
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -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
*/
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -274,7 +274,8 @@ public Timer getTimer(String name, TimeUnit durationUnit, TimeUnit rateUnit) {
* Get a Gauge that is already present in the MetricsRegistry
*
* @param name String name of Gauge
* @return Gauge&lt;T&gt; 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));
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,6 @@
*/
package org.apache.giraph.reducers;

import org.apache.giraph.master.AggregatorReduceOperation;
import org.apache.hadoop.io.Writable;

/**
Expand All @@ -27,7 +26,8 @@
*
* 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
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -30,7 +30,8 @@


/**
* Aggregating PairWritable&lt;L, R&gt;, by taking pair with largest second value.
* Aggregating PairWritable&lt;L, R&gt;, by taking pair with
* largest second value.
*
* @param <L> Type of the left value
* @param <R> Type of the right value
Expand Down

0 comments on commit f892342

Please sign in to comment.