Bump checkstyle from 8.23 to 9.3 (#336)
* Bump checkstyle from 8.16 to 8.29 to 9.3
Bumps [checkstyle](https://github.com/checkstyle/checkstyle) from 8.16 to 8.29. to 9.3.
- [Release notes](https://github.com/checkstyle/checkstyle/releases)
- [Commits](https://github.com/checkstyle/checkstyle/compare/checkstyle-8.16...checkstyle-8.29)
Signed-off-by: dependabot[bot] <support@github.com>
* Bump checkstyle from 8.23 to 8.29 to 9.3
Bumps [checkstyle](https://github.com/checkstyle/checkstyle) from 8.23 to 8.29. to 9.3.
- [Release notes](https://github.com/checkstyle/checkstyle/releases)
- [Commits](https://github.com/checkstyle/checkstyle/compare/checkstyle-8.23...checkstyle-8.29)
---
updated-dependencies:
- dependency-name: com.puppycrawl.tools:checkstyle
dependency-type: direct:production
...
Signed-off-by: dependabot[bot] <support@github.com>
* checkstyle 8.45
* updated comments
* to 9.3
* timeout
* build badge
* lets just give 50 sec
Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
Co-authored-by: Won Wook SONG <wsong0512@gmail.com>
diff --git a/.gitignore b/.gitignore
index 1cbe543..c7f7c56 100644
--- a/.gitignore
+++ b/.gitignore
@@ -14,6 +14,7 @@
docs/
debug/*
.factorypath
+**/dependency-reduced-pom.xml
#
# ----------------------------------------------------------------------
# DB Files
diff --git a/README.md b/README.md
index 0ff7859..734e5ee 100644
--- a/README.md
+++ b/README.md
@@ -1,6 +1,6 @@
# Nemo
-[![Build Status](https://travis-ci.org/apache/incubator-nemo.svg?branch=master)](https://travis-ci.org/apache/incubator-nemo)
+[![Build Status](https://app.travis-ci.com/apache/incubator-nemo.svg?branch=master)](https://app.travis-ci.com/apache/incubator-nemo)
[![Quality Gate Status](https://sonarcloud.io/api/project_badges/measure?project=org.apache.nemo%3Anemo-project&metric=alert_status)](https://sonarcloud.io/dashboard?id=org.apache.nemo%3Anemo-project)
A Data Processing System for Flexible Employment With Different Deployment Characteristics.
diff --git a/checkstyle.xml b/checkstyle.xml
index c3cd954..5b39bc4 100644
--- a/checkstyle.xml
+++ b/checkstyle.xml
@@ -18,22 +18,23 @@
under the License.
-->
<!DOCTYPE module PUBLIC
- "-//Puppy Crawl//DTD Check Configuration 1.3//EN"
- "http://www.puppycrawl.com/dtds/configuration_1_3.dtd">
+ "-//Checkstyle//DTD Checkstyle Configuration 1.3//EN"
+ "https://checkstyle.org/dtds/configuration_1_3.dtd">
<!--
Checkstyle configuration that checks the sun coding conventions from:
- the Java Language Specification at
- http://java.sun.com/docs/books/jls/second_edition/html/index.html
- - the Sun Code Conventions at http://java.sun.com/docs/codeconv/
+ https://docs.oracle.com/javase/specs/jls/se11/html/index.html
+ - the Sun Code Conventions at https://www.oracle.com/java/technologies/javase/codeconventions-contents.html
- the Javadoc guidelines at
- http://java.sun.com/j2se/javadoc/writingdoccomments/index.html
- - the JDK Api documentation http://java.sun.com/j2se/docs/api/index.html
+ https://www.oracle.com/technical-resources/articles/java/javadoc-tool.html
+ - the JDK Api documentation https://docs.oracle.com/en/java/javase/11/
- some best practices
Checkstyle is very configurable. Be sure to read the documentation at
- http://checkstyle.sf.net (or in your downloaded distribution).
+ https://checkstyle.org (or in your downloaded distribution).
Most Checks are configurable, be sure to consult the documentation.
To completely disable a check, just comment it out or delete it from the file.
+ To suppress certain violations please review suppression filters.
Finally, it is worth reading the documentation.
-->
@@ -41,67 +42,94 @@
<!--
If you set the basedir property below, then all reported file
names will be relative to the specified directory. See
- http://checkstyle.sourceforge.net/5.x/config.html#Checker
+ https://checkstyle.org/config.html#Checker
<property name="basedir" value="${basedir}"/>
-->
<property name="charset" value="UTF-8"/>
+ <property name="severity" value="error"/>
<property name="fileExtensions" value="java, properties, xml"/>
+ <!-- Excludes all 'module-info.java' files -->
+ <!-- See https://checkstyle.org/config_filefilters.html -->
+ <module name="BeforeExecutionExclusionFileFilter">
+ <property name="fileNamePattern" value="module\-info\.java$"/>
+ </module>
+
+ <!-- https://checkstyle.org/config_filters.html#SuppressionFilter -->
+ <module name="SuppressionFilter">
+ <property name="file" value="${org.checkstyle.sun.suppressionfilter.config}"
+ default="checkstyle-suppressions.xml" />
+ <property name="optional" value="true"/>
+ </module>
+
<!-- Checks that a package-info.java file exists for each package. -->
- <!-- See http://checkstyle.sf.net/config_javadoc.html#JavadocPackage -->
+ <!-- See https://checkstyle.org/config_javadoc.html#JavadocPackage -->
<!--<module name="JavadocPackage"/>-->
<!-- Checks whether files end with a new line. -->
- <!-- See http://checkstyle.sf.net/config_misc.html#NewlineAtEndOfFile -->
- <module name="NewlineAtEndOfFile">
- <property name="lineSeparator" value="lf" />
- </module>
+ <!-- See https://checkstyle.org/config_misc.html#NewlineAtEndOfFile -->
+ <module name="NewlineAtEndOfFile"/>
+
<!-- Checks that property files contain the same keys. -->
- <!-- See http://checkstyle.sf.net/config_misc.html#Translation -->
+ <!-- See https://checkstyle.org/config_misc.html#Translation -->
<module name="Translation"/>
<!-- Checks for Size Violations. -->
- <!-- See http://checkstyle.sf.net/config_sizes.html -->
+ <!-- See https://checkstyle.org/config_sizes.html -->
<module name="FileLength"/>
+ <module name="LineLength">
+ <property name="max" value="120"/>
+ <property name="ignorePattern" value="^package.*|^import.*|a href|href|http://|https://|ftp://"/>
+ <property name="fileExtensions" value="java"/>
+ </module>
<!-- Checks for whitespace -->
- <!-- See http://checkstyle.sf.net/config_whitespace.html -->
+ <!-- See https://checkstyle.org/config_whitespace.html -->
<module name="FileTabCharacter"/>
<!-- Miscellaneous other checks. -->
- <!-- See http://checkstyle.sf.net/config_misc.html -->
+ <!-- See https://checkstyle.org/config_misc.html -->
<module name="RegexpSingleline">
- <property name="format" value="(?!\*)\s+$|\*\s\s+$"/>
+ <!--<property name="format" value="(?!\*)\s+$|\*\s\s+$"/>-->
+ <property name="format" value="\s+$"/>
<property name="minimum" value="0"/>
<property name="maximum" value="0"/>
<property name="message" value="Line has trailing spaces."/>
</module>
+ <!-- Checks for Headers -->
+ <!-- See https://checkstyle.org/config_header.html -->
+ <module name="RegexpHeader">
+ <property name="headerFile" value="${checkstyle.header.file}"/>
+ <property name="fileExtensions" value="java"/>
+ </module>
+
<module name="SuppressWarningsFilter"/>
<module name="TreeWalker">
<!-- Checks for Javadoc comments. -->
- <!-- See http://checkstyle.sf.net/config_javadoc.html -->
- <module name="AtclauseOrder"/>
+ <!-- See https://checkstyle.org/config_javadoc.html -->
+ <module name="InvalidJavadocPosition"/>
<module name="JavadocMethod">
<property name="severity" value="warning"/>
</module>
<module name="JavadocType"/>
<module name="JavadocVariable">
- <property name="severity" value="warning"/>
+ <property name="severity" value="info"/>
</module>
<module name="JavadocStyle"/>
- <module name="NonEmptyAtclauseDescription"/>
- <module name="SingleLineJavadoc"/>
- <module name="WriteTag"/>
- <module name="SummaryJavadoc">
+ <module name="MissingJavadocMethod">
<property name="severity" value="warning"/>
</module>
+ <module name="AtclauseOrder"/>
+ <module name="NonEmptyAtclauseDescription"/>
+ <module name="SingleLineJavadoc"/>
+
<!-- Checks for Naming Conventions. -->
- <!-- See http://checkstyle.sf.net/config_naming.html -->
+ <!-- See https://checkstyle.org/config_naming.html -->
<module name="ConstantName"/>
<module name="LocalFinalVariableName"/>
<module name="LocalVariableName"/>
@@ -113,7 +141,7 @@
<module name="TypeName"/>
<!-- Checks for imports -->
- <!-- See http://checkstyle.sf.net/config_import.html -->
+ <!-- See https://checkstyle.org/config_imports.html -->
<!--<module name="AvoidStarImport"/>-->
<module name="IllegalImport"/> <!-- defaults to sun.* packages -->
<module name="RedundantImport"/>
@@ -122,16 +150,12 @@
</module>
<!-- Checks for Size Violations. -->
- <!-- See http://checkstyle.sf.net/config_sizes.html -->
- <module name="LineLength">
- <property name="max" value="120"/>
- <property name="ignorePattern" value="^package.*|^import.*|a href|href|http://|https://|ftp://"/>
- </module>
+ <!-- See https://checkstyle.org/config_sizes.html -->
<module name="MethodLength"/>
<!--<module name="ParameterNumber"/>-->
<!-- Checks for whitespace -->
- <!-- See http://checkstyle.sf.net/config_whitespace.html -->
+ <!-- See https://checkstyle.org/config_whitespace.html -->
<module name="EmptyForIteratorPad"/>
<module name="GenericWhitespace"/>
<module name="MethodParamPad"/>
@@ -144,12 +168,12 @@
<module name="WhitespaceAround"/>
<!-- Modifier Checks -->
- <!-- See http://checkstyle.sf.net/config_modifiers.html -->
+ <!-- See https://checkstyle.org/config_modifier.html -->
<module name="ModifierOrder"/>
<module name="RedundantModifier"/>
<!-- Checks for blocks. You know, those {}'s -->
- <!-- See http://checkstyle.sf.net/config_blocks.html -->
+ <!-- See https://checkstyle.org/config_blocks.html -->
<module name="AvoidNestedBlocks"/>
<module name="EmptyBlock"/>
<module name="LeftCurly"/>
@@ -157,8 +181,7 @@
<module name="RightCurly"/>
<!-- Checks for common coding problems -->
- <!-- See http://checkstyle.sf.net/config_coding.html -->
- <!--<module name="AvoidInlineConditionals"/>-->
+ <!-- See https://checkstyle.org/config_coding.html -->
<module name="EmptyStatement"/>
<module name="EqualsHashCode"/>
<module name="HiddenField">
@@ -169,11 +192,12 @@
<module name="InnerAssignment"/>
<!--<module name="MagicNumber"/>-->
<module name="MissingSwitchDefault"/>
+ <module name="MultipleVariableDeclarations"/>
<module name="SimplifyBooleanExpression"/>
<module name="SimplifyBooleanReturn"/>
<!-- Checks for class design -->
- <!-- See http://checkstyle.sf.net/config_design.html -->
+ <!-- See https://checkstyle.org/config_design.html -->
<module name="DesignForExtension"/>
<module name="FinalClass"/>
<module name="HideUtilityClassConstructor"/>
@@ -181,16 +205,19 @@
<module name="VisibilityModifier"/>
<!-- Miscellaneous other checks. -->
- <!-- See http://checkstyle.sf.net/config_misc.html -->
+ <!-- See https://checkstyle.org/config_misc.html -->
<module name="ArrayTypeStyle"/>
<module name="FinalParameters"/>
<module name="TodoComment"/>
<module name="UpperEll"/>
- <module name="SuppressWarningsHolder"/>
+ <!-- https://checkstyle.org/config_filters.html#SuppressionXpathFilter -->
+ <module name="SuppressionXpathFilter">
+ <property name="file" value="${org.checkstyle.sun.suppressionxpathfilter.config}"
+ default="checkstyle-xpath-suppressions.xml" />
+ <property name="optional" value="true"/>
+ </module>
+
</module>
- <module name="RegexpHeader">
- <property name="headerFile" value="${checkstyle.header.file}"/>
- </module>
</module>
diff --git a/common/src/main/java/org/apache/nemo/common/ir/vertex/LoopVertex.java b/common/src/main/java/org/apache/nemo/common/ir/vertex/LoopVertex.java
index e68fc77..4fe4e1e 100644
--- a/common/src/main/java/org/apache/nemo/common/ir/vertex/LoopVertex.java
+++ b/common/src/main/java/org/apache/nemo/common/ir/vertex/LoopVertex.java
@@ -440,11 +440,11 @@
this.terminationCondition = terminationCondition;
}
- @Override
/**
* Parse Properties to JsonNode.
*/
- public ObjectNode getPropertiesAsJsonNode() {
+ @Override
+ public final ObjectNode getPropertiesAsJsonNode() {
final ObjectNode node = getIRVertexPropertiesAsJsonNode();
node.put("remainingIteration", maxNumberOfIterations);
node.set("DAG", getDAG().asJsonNode());
diff --git a/common/src/main/java/org/apache/nemo/common/test/ExampleTestArgs.java b/common/src/main/java/org/apache/nemo/common/test/ExampleTestArgs.java
index 6c74a5e..6b18750 100644
--- a/common/src/main/java/org/apache/nemo/common/test/ExampleTestArgs.java
+++ b/common/src/main/java/org/apache/nemo/common/test/ExampleTestArgs.java
@@ -22,7 +22,7 @@
* Test Arguments for Examples.
*/
public final class ExampleTestArgs {
- public static final int TIMEOUT = 300000;
+ public static final int TIMEOUT = 500000;
private static String fileBasePath;
/**
diff --git a/examples/beam/src/main/java/org/apache/nemo/examples/beam/MultinomialLogisticRegression.java b/examples/beam/src/main/java/org/apache/nemo/examples/beam/MultinomialLogisticRegression.java
index b46ab77..209dc59 100644
--- a/examples/beam/src/main/java/org/apache/nemo/examples/beam/MultinomialLogisticRegression.java
+++ b/examples/beam/src/main/java/org/apache/nemo/examples/beam/MultinomialLogisticRegression.java
@@ -172,11 +172,11 @@
}
- /**
- * When maxMargin > 0, the original formula will cause overflow as we discuss
- * in the previous comment.
- * We address this by subtracting maxMargin from all the margins, so it's guaranteed
- * that all of the new margins will be smaller than zero to prevent arithmetic overflow.
+ /*
+ When maxMargin > 0, the original formula will cause overflow as we discuss
+ in the previous comment.
+ We address this by subtracting maxMargin from all the margins, so it's guaranteed
+ that all of the new margins will be smaller than zero to prevent arithmetic overflow.
*/
Double sum = 0.0;
if (maxMargin > 0) {
diff --git a/pom.xml b/pom.xml
index 2335ee2..ac09b14 100644
--- a/pom.xml
+++ b/pom.xml
@@ -76,7 +76,7 @@
<powermock.version>2.0.9</powermock.version>
<surefire.version>3.0.0-M7</surefire.version>
<junit.version>4.13.2</junit.version>
- <checkstyle.version>8.23</checkstyle.version>
+ <checkstyle.version>9.3</checkstyle.version>
</properties>
<modules>
@@ -203,7 +203,7 @@
<plugin>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-checkstyle-plugin</artifactId>
- <version>3.1.2</version>
+ <version>3.2.0</version>
<dependencies>
<dependency>
<groupId>com.puppycrawl.tools</groupId>
diff --git a/runtime/executor/src/main/java/org/apache/nemo/runtime/executor/data/BlockManagerWorker.java b/runtime/executor/src/main/java/org/apache/nemo/runtime/executor/data/BlockManagerWorker.java
index 06b9cf1..10e715d 100644
--- a/runtime/executor/src/main/java/org/apache/nemo/runtime/executor/data/BlockManagerWorker.java
+++ b/runtime/executor/src/main/java/org/apache/nemo/runtime/executor/data/BlockManagerWorker.java
@@ -240,15 +240,15 @@
final BlockFetchFailureProperty.Value fetchFailure = edgeProperties.get(BlockFetchFailureProperty.class)
.orElse(BlockFetchFailureProperty.Value.CANCEL_TASK); // the default behavior.
if (!fetchFailure.equals(BlockFetchFailureProperty.Value.CANCEL_TASK)) {
- /**
- * Wait until fetching "all elements" of each block.
- *
- * Problem: If the task won't be cancelled upon fetch failure, then the task can potentially
- * process blocks partially or process the same elements more than once.
- *
- * Solution: With this waiting, a task that fetches a block either
- * - Processes all elements of the block
- * - Processes no element of the block (i.e., Runs into a block fetch exception while waiting)
+ /*
+ Wait until fetching "all elements" of each block.
+
+ Problem: If the task won't be cancelled upon fetch failure, then the task can potentially
+ process blocks partially or process the same elements more than once.
+
+ Solution: With this waiting, a task that fetches a block either
+ - Processes all elements of the block
+ - Processes no element of the block (i.e., Runs into a block fetch exception while waiting)
*/
return contextFuture
.thenCompose(ByteInputContext::getCompletedFuture)
@@ -256,10 +256,10 @@
.thenApply(streams -> new DataUtil.InputStreamIterator<>(
streams, serializerManager.getSerializer(runtimeEdgeId)));
} else {
- /**
- * Process "each element" of a block as soon as the element comes in.
- * No worries about partial/duplicate processing here, as the task will be cancelled and restarted cleanly.
- * Probably best performance when there is no failure.
+ /*
+ Process "each element" of a block as soon as the element comes in.
+ No worries about partial/duplicate processing here, as the task will be cancelled and restarted cleanly.
+ Probably best performance when there is no failure.
*/
return contextFuture
.thenApply(context -> new DataUtil.InputStreamIterator<>(context.getInputStreams(),