You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@nemo.apache.org by ta...@apache.org on 2019/09/08 08:39:59 UTC

[incubator-nemo] branch master updated: [NEMO-400] Javadoc compile error (#226)

This is an automated email from the ASF dual-hosted git repository.

taegeonum pushed a commit to branch master
in repository https://gitbox.apache.org/repos/asf/incubator-nemo.git


The following commit(s) were added to refs/heads/master by this push:
     new a0c9b20  [NEMO-400] Javadoc compile error (#226)
a0c9b20 is described below

commit a0c9b208cd3f0ee961ebc4473bcb8f86785879ef
Author: Won Wook SONG <ws...@gmail.com>
AuthorDate: Sun Sep 8 17:39:54 2019 +0900

    [NEMO-400] Javadoc compile error (#226)
    
    JIRA: [NEMO-400: Javadoc compile error](https://issues.apache.org/jira/projects/NEMO/issues/NEMO-400)
    
    **Major changes:**
    - None
    
    **Minor changes to note:**
    - Fixes the line that causes an error on the javadoc generation.
    - The `./bin/generate_javadocs.sh` command succeeds now
    
    **Tests for the changes:**
    - The checkstyle now checks for the new rules that have been left out, instead of creating a javadoc for every execution of tests.
    
    **Other comments:**
    - None
    
    Closes #226
---
 checkstyle.xml                                             | 12 +++++++++++-
 .../java/org/apache/nemo/common/ByteBufferInputStream.java |  6 +++---
 .../nemo/compiler/frontend/spark/core/rdd/JavaRDD.java     |  2 +-
 .../org/apache/nemo/compiler/optimizer/policy/Policy.java  |  1 +
 .../apache/nemo/examples/beam/AlternatingLeastSquare.java  |  1 +
 .../examples/beam/AlternatingLeastSquareInefficient.java   |  1 +
 pom.xml                                                    |  7 -------
 .../runtime/common/message/grpc/GrpcMessageServer.java     |  2 +-
 .../apache/nemo/runtime/executor/data/PipeContainer.java   | 14 +++++++-------
 .../executor/datatransfer/NemoEventEncoderFactory.java     |  2 +-
 10 files changed, 27 insertions(+), 21 deletions(-)

diff --git a/checkstyle.xml b/checkstyle.xml
index 7f97abc..77ec558 100644
--- a/checkstyle.xml
+++ b/checkstyle.xml
@@ -83,12 +83,21 @@ under the License.
 
     <!-- Checks for Javadoc comments.                     -->
     <!-- See http://checkstyle.sf.net/config_javadoc.html -->
+    <module name="AtclauseOrder"/>
     <module name="JavadocMethod">
       <property name="severity" value="warning"/>
     </module>
     <module name="JavadocType"/>
-    <!--<module name="JavadocVariable"/>-->
+    <module name="JavadocVariable">
+      <property name="severity" value="warning"/>
+    </module>
     <module name="JavadocStyle"/>
+    <module name="NonEmptyAtclauseDescription"/>
+    <module name="SingleLineJavadoc"/>
+    <module name="WriteTag"/>
+    <module name="SummaryJavadoc">
+      <property name="severity" value="warning"/>
+    </module>
 
     <!-- Checks for Naming Conventions.                  -->
     <!-- See http://checkstyle.sf.net/config_naming.html -->
@@ -118,6 +127,7 @@ under the License.
       <property name="ignorePattern" value="^package.*|^import.*|a href|href|http://|https://|ftp://"/>
     </module>
     <module name="MethodLength"/>
+    <!--<module name="ParameterNumber"/>-->
 
     <!-- Checks for whitespace                               -->
     <!-- See http://checkstyle.sf.net/config_whitespace.html -->
diff --git a/common/src/main/java/org/apache/nemo/common/ByteBufferInputStream.java b/common/src/main/java/org/apache/nemo/common/ByteBufferInputStream.java
index 9e07c7f..eff3772 100644
--- a/common/src/main/java/org/apache/nemo/common/ByteBufferInputStream.java
+++ b/common/src/main/java/org/apache/nemo/common/ByteBufferInputStream.java
@@ -29,7 +29,7 @@ import java.util.List;
  * list of {@link ByteBuffer}. If the {@link ByteBuffer} is direct, it may reside outside
  * the normal garbage-collected heap memory.
  */
-public class ByteBufferInputStream extends InputStream {
+public final class ByteBufferInputStream extends InputStream {
   private List<ByteBuffer> bufList;
   private int current = 0;
   private static final int BITMASK = 0xff;
@@ -47,7 +47,7 @@ public class ByteBufferInputStream extends InputStream {
    * Reads data from the list of {@code ByteBuffer}s.
    *
    * @return integer.
-   * @throws IOException
+   * @throws IOException exception.
    */
   @Override
   public int read() throws IOException {
@@ -59,7 +59,7 @@ public class ByteBufferInputStream extends InputStream {
   /**
    * Return next non-empty @code{ByteBuffer}.
    *
-   * @return @code{ByteBuffer} to write the data
+   * @return {@code ByteBuffer} to write the data.
    * @throws IOException when fail to retrieve buffer.
    */
   public ByteBuffer getBuffer() throws IOException {
diff --git a/compiler/frontend/spark/src/main/java/org/apache/nemo/compiler/frontend/spark/core/rdd/JavaRDD.java b/compiler/frontend/spark/src/main/java/org/apache/nemo/compiler/frontend/spark/core/rdd/JavaRDD.java
index e8b8f12..69d2571 100644
--- a/compiler/frontend/spark/src/main/java/org/apache/nemo/compiler/frontend/spark/core/rdd/JavaRDD.java
+++ b/compiler/frontend/spark/src/main/java/org/apache/nemo/compiler/frontend/spark/core/rdd/JavaRDD.java
@@ -205,7 +205,7 @@ public final class JavaRDD<T> extends org.apache.spark.api.java.JavaRDD<T> {
   /////////////// TRANSFORMATION TO PAIR RDD ///////////////
 
   /**
-   * @see org.apache.spark.api.java.JavaRDD#mapToPair(PairFunction).
+   * @see org.apache.spark.api.java.JavaRDD#mapToPair : PairFunction.
    */
   @Override
   public <K2, V2> JavaPairRDD<K2, V2> mapToPair(final PairFunction<T, K2, V2> f) {
diff --git a/compiler/optimizer/src/main/java/org/apache/nemo/compiler/optimizer/policy/Policy.java b/compiler/optimizer/src/main/java/org/apache/nemo/compiler/optimizer/policy/Policy.java
index 9653fc2..afff722 100644
--- a/compiler/optimizer/src/main/java/org/apache/nemo/compiler/optimizer/policy/Policy.java
+++ b/compiler/optimizer/src/main/java/org/apache/nemo/compiler/optimizer/policy/Policy.java
@@ -43,6 +43,7 @@ public interface Policy extends Serializable {
    *
    * @param dag     input DAG.
    * @param message from the DAG execution.
+   * @return optimized DAG, reshaped or tagged with execution properties.
    */
   IRDAG runRunTimeOptimizations(IRDAG dag, Message<?> message);
 }
diff --git a/examples/beam/src/main/java/org/apache/nemo/examples/beam/AlternatingLeastSquare.java b/examples/beam/src/main/java/org/apache/nemo/examples/beam/AlternatingLeastSquare.java
index 4ad3521..e990f16 100644
--- a/examples/beam/src/main/java/org/apache/nemo/examples/beam/AlternatingLeastSquare.java
+++ b/examples/beam/src/main/java/org/apache/nemo/examples/beam/AlternatingLeastSquare.java
@@ -354,6 +354,7 @@ public final class AlternatingLeastSquare {
    * Main function for the ALS BEAM program.
    *
    * @param args arguments.
+   * @throws ClassNotFoundException exception.
    */
   public static void main(final String[] args) throws ClassNotFoundException {
     final Long start = System.currentTimeMillis();
diff --git a/examples/beam/src/main/java/org/apache/nemo/examples/beam/AlternatingLeastSquareInefficient.java b/examples/beam/src/main/java/org/apache/nemo/examples/beam/AlternatingLeastSquareInefficient.java
index 5d9a611..742be54 100644
--- a/examples/beam/src/main/java/org/apache/nemo/examples/beam/AlternatingLeastSquareInefficient.java
+++ b/examples/beam/src/main/java/org/apache/nemo/examples/beam/AlternatingLeastSquareInefficient.java
@@ -102,6 +102,7 @@ public final class AlternatingLeastSquareInefficient {
    * Main function for the ALS BEAM program.
    *
    * @param args arguments.
+   * @throws ClassNotFoundException exception.
    */
   public static void main(final String[] args) throws ClassNotFoundException {
     final Long start = System.currentTimeMillis();
diff --git a/pom.xml b/pom.xml
index e0187c7..e6b56a1 100644
--- a/pom.xml
+++ b/pom.xml
@@ -282,13 +282,6 @@ under the License.
             </goals>
             <phase>site</phase>
           </execution>
-          <execution>
-            <id>test-javadoc</id>
-            <goals>
-              <goal>test-javadoc</goal>
-            </goals>
-            <phase>validate</phase>
-          </execution>
         </executions>
       </plugin>
       <plugin>
diff --git a/runtime/common/src/main/java/org/apache/nemo/runtime/common/message/grpc/GrpcMessageServer.java b/runtime/common/src/main/java/org/apache/nemo/runtime/common/message/grpc/GrpcMessageServer.java
index 51bf564..bd7f9d1 100644
--- a/runtime/common/src/main/java/org/apache/nemo/runtime/common/message/grpc/GrpcMessageServer.java
+++ b/runtime/common/src/main/java/org/apache/nemo/runtime/common/message/grpc/GrpcMessageServer.java
@@ -128,7 +128,7 @@ final class GrpcMessageServer {
    * For registering to the name server.
    *
    * @param port port of the socket address.
-   * @throws Exception
+   * @throws Exception exception.
    */
   private void registerToNameServer(final int port) throws Exception {
     final InetSocketAddress socketAddress = new InetSocketAddress(localAddressProvider.getLocalAddress(), port);
diff --git a/runtime/executor/src/main/java/org/apache/nemo/runtime/executor/data/PipeContainer.java b/runtime/executor/src/main/java/org/apache/nemo/runtime/executor/data/PipeContainer.java
index 1113f1e..31c868e 100644
--- a/runtime/executor/src/main/java/org/apache/nemo/runtime/executor/data/PipeContainer.java
+++ b/runtime/executor/src/main/java/org/apache/nemo/runtime/executor/data/PipeContainer.java
@@ -118,8 +118,8 @@ public final class PipeContainer {
   /**
    * (SYNCHRONIZATION) Initialize the key exactly once.
    *
-   * @param pairKey
-   * @param expected
+   * @param pairKey the pair of the runtime edge id and the source task index.
+   * @param expected the expected number of pipes to wait for.
    */
   synchronized void putPipeListIfAbsent(final Pair<String, Long> pairKey, final int expected) {
     pipeMap.putIfAbsent(pairKey, new CountBasedBlockingContainer(expected));
@@ -128,9 +128,9 @@ public final class PipeContainer {
   /**
    * (SYNCHRONIZATION) CountBasedBlockingContainer takes care of it.
    *
-   * @param pairKey
-   * @param dstTaskIndex
-   * @param byteOutputContext
+   * @param pairKey the pair of the runtime edge id and the source task index.
+   * @param dstTaskIndex the destination task index.
+   * @param byteOutputContext the byte output context.
    */
   void putPipe(final Pair<String, Long> pairKey, final int dstTaskIndex, final ByteOutputContext byteOutputContext) {
     final CountBasedBlockingContainer<ByteOutputContext> container = pipeMap.get(pairKey);
@@ -140,8 +140,8 @@ public final class PipeContainer {
   /**
    * (SYNCHRONIZATION) CountBasedBlockingContainer takes care of it.
    *
-   * @param pairKey
-   * @return
+   * @param pairKey the pair of the runtime edge id and the source task index.
+   * @return the list of byte output context.
    */
   List<ByteOutputContext> getPipes(final Pair<String, Long> pairKey) {
     final CountBasedBlockingContainer<ByteOutputContext> container = pipeMap.get(pairKey);
diff --git a/runtime/executor/src/main/java/org/apache/nemo/runtime/executor/datatransfer/NemoEventEncoderFactory.java b/runtime/executor/src/main/java/org/apache/nemo/runtime/executor/datatransfer/NemoEventEncoderFactory.java
index 1c7ec99..cb07ffd 100644
--- a/runtime/executor/src/main/java/org/apache/nemo/runtime/executor/datatransfer/NemoEventEncoderFactory.java
+++ b/runtime/executor/src/main/java/org/apache/nemo/runtime/executor/datatransfer/NemoEventEncoderFactory.java
@@ -54,7 +54,7 @@ public final class NemoEventEncoderFactory implements EncoderFactory {
   /**
    * This encodes normal data and WatermarkWithIndex.
    *
-   * @param <T>
+   * @param <T> type to encode.
    */
   private final class NemoEventEncoder<T> implements EncoderFactory.Encoder<T> {
     private final EncoderFactory.Encoder<T> valueEncoder;