Skip to content
This repository was archived by the owner on Jul 1, 2025. It is now read-only.

Commit 772f0c9

Browse files
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](checkstyle/checkstyle@checkstyle-8.16...checkstyle-8.29) Signed-off-by: dependabot[bot] <[email protected]> * 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](checkstyle/checkstyle@checkstyle-8.23...checkstyle-8.29) --- updated-dependencies: - dependency-name: com.puppycrawl.tools:checkstyle dependency-type: direct:production ... Signed-off-by: dependabot[bot] <[email protected]> * checkstyle 8.45 * updated comments * to 9.3 * timeout * build badge * lets just give 50 sec Signed-off-by: dependabot[bot] <[email protected]> Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com> Co-authored-by: Won Wook SONG <[email protected]>
1 parent dfc616f commit 772f0c9

File tree

8 files changed

+95
-67
lines changed

8 files changed

+95
-67
lines changed

.gitignore

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -14,6 +14,7 @@ build
1414
docs/
1515
debug/*
1616
.factorypath
17+
**/dependency-reduced-pom.xml
1718
#
1819
# ----------------------------------------------------------------------
1920
# DB Files

README.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
# Nemo
22

3-
[![Build Status](https://travis-ci.org/apache/incubator-nemo.svg?branch=master)](https://travis-ci.org/apache/incubator-nemo)
3+
[![Build Status](https://app.travis-ci.com/apache/incubator-nemo.svg?branch=master)](https://app.travis-ci.com/apache/incubator-nemo)
44
[![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)
55

66
A Data Processing System for Flexible Employment With Different Deployment Characteristics.

checkstyle.xml

Lines changed: 70 additions & 43 deletions
Original file line numberDiff line numberDiff line change
@@ -18,90 +18,118 @@ specific language governing permissions and limitations
1818
under the License.
1919
-->
2020
<!DOCTYPE module PUBLIC
21-
"-//Puppy Crawl//DTD Check Configuration 1.3//EN"
22-
"http://www.puppycrawl.com/dtds/configuration_1_3.dtd">
21+
"-//Checkstyle//DTD Checkstyle Configuration 1.3//EN"
22+
"https://checkstyle.org/dtds/configuration_1_3.dtd">
2323

2424
<!--
2525
Checkstyle configuration that checks the sun coding conventions from:
2626
- the Java Language Specification at
27-
http://java.sun.com/docs/books/jls/second_edition/html/index.html
28-
- the Sun Code Conventions at http://java.sun.com/docs/codeconv/
27+
https://docs.oracle.com/javase/specs/jls/se11/html/index.html
28+
- the Sun Code Conventions at https://www.oracle.com/java/technologies/javase/codeconventions-contents.html
2929
- the Javadoc guidelines at
30-
http://java.sun.com/j2se/javadoc/writingdoccomments/index.html
31-
- the JDK Api documentation http://java.sun.com/j2se/docs/api/index.html
30+
https://www.oracle.com/technical-resources/articles/java/javadoc-tool.html
31+
- the JDK Api documentation https://docs.oracle.com/en/java/javase/11/
3232
- some best practices
3333
Checkstyle is very configurable. Be sure to read the documentation at
34-
http://checkstyle.sf.net (or in your downloaded distribution).
34+
https://checkstyle.org (or in your downloaded distribution).
3535
Most Checks are configurable, be sure to consult the documentation.
3636
To completely disable a check, just comment it out or delete it from the file.
37+
To suppress certain violations please review suppression filters.
3738
Finally, it is worth reading the documentation.
3839
-->
3940

4041
<module name="Checker">
4142
<!--
4243
If you set the basedir property below, then all reported file
4344
names will be relative to the specified directory. See
44-
http://checkstyle.sourceforge.net/5.x/config.html#Checker
45+
https://checkstyle.org/config.html#Checker
4546
<property name="basedir" value="${basedir}"/>
4647
-->
4748
<property name="charset" value="UTF-8"/>
49+
<property name="severity" value="error"/>
4850

4951
<property name="fileExtensions" value="java, properties, xml"/>
5052

53+
<!-- Excludes all 'module-info.java' files -->
54+
<!-- See https://checkstyle.org/config_filefilters.html -->
55+
<module name="BeforeExecutionExclusionFileFilter">
56+
<property name="fileNamePattern" value="module\-info\.java$"/>
57+
</module>
58+
59+
<!-- https://checkstyle.org/config_filters.html#SuppressionFilter -->
60+
<module name="SuppressionFilter">
61+
<property name="file" value="${org.checkstyle.sun.suppressionfilter.config}"
62+
default="checkstyle-suppressions.xml" />
63+
<property name="optional" value="true"/>
64+
</module>
65+
5166
<!-- Checks that a package-info.java file exists for each package. -->
52-
<!-- See http://checkstyle.sf.net/config_javadoc.html#JavadocPackage -->
67+
<!-- See https://checkstyle.org/config_javadoc.html#JavadocPackage -->
5368
<!--<module name="JavadocPackage"/>-->
5469

5570
<!-- Checks whether files end with a new line. -->
56-
<!-- See http://checkstyle.sf.net/config_misc.html#NewlineAtEndOfFile -->
57-
<module name="NewlineAtEndOfFile">
58-
<property name="lineSeparator" value="lf" />
59-
</module>
71+
<!-- See https://checkstyle.org/config_misc.html#NewlineAtEndOfFile -->
72+
<module name="NewlineAtEndOfFile"/>
73+
6074
<!-- Checks that property files contain the same keys. -->
61-
<!-- See http://checkstyle.sf.net/config_misc.html#Translation -->
75+
<!-- See https://checkstyle.org/config_misc.html#Translation -->
6276
<module name="Translation"/>
6377

6478
<!-- Checks for Size Violations. -->
65-
<!-- See http://checkstyle.sf.net/config_sizes.html -->
79+
<!-- See https://checkstyle.org/config_sizes.html -->
6680
<module name="FileLength"/>
81+
<module name="LineLength">
82+
<property name="max" value="120"/>
83+
<property name="ignorePattern" value="^package.*|^import.*|a href|href|http://|https://|ftp://"/>
84+
<property name="fileExtensions" value="java"/>
85+
</module>
6786

6887
<!-- Checks for whitespace -->
69-
<!-- See http://checkstyle.sf.net/config_whitespace.html -->
88+
<!-- See https://checkstyle.org/config_whitespace.html -->
7089
<module name="FileTabCharacter"/>
7190

7291
<!-- Miscellaneous other checks. -->
73-
<!-- See http://checkstyle.sf.net/config_misc.html -->
92+
<!-- See https://checkstyle.org/config_misc.html -->
7493
<module name="RegexpSingleline">
75-
<property name="format" value="(?!\*)\s+$|\*\s\s+$"/>
94+
<!--<property name="format" value="(?!\*)\s+$|\*\s\s+$"/>-->
95+
<property name="format" value="\s+$"/>
7696
<property name="minimum" value="0"/>
7797
<property name="maximum" value="0"/>
7898
<property name="message" value="Line has trailing spaces."/>
7999
</module>
80100

101+
<!-- Checks for Headers -->
102+
<!-- See https://checkstyle.org/config_header.html -->
103+
<module name="RegexpHeader">
104+
<property name="headerFile" value="${checkstyle.header.file}"/>
105+
<property name="fileExtensions" value="java"/>
106+
</module>
107+
81108
<module name="SuppressWarningsFilter"/>
82109

83110
<module name="TreeWalker">
84111

85112
<!-- Checks for Javadoc comments. -->
86-
<!-- See http://checkstyle.sf.net/config_javadoc.html -->
87-
<module name="AtclauseOrder"/>
113+
<!-- See https://checkstyle.org/config_javadoc.html -->
114+
<module name="InvalidJavadocPosition"/>
88115
<module name="JavadocMethod">
89116
<property name="severity" value="warning"/>
90117
</module>
91118
<module name="JavadocType"/>
92119
<module name="JavadocVariable">
93-
<property name="severity" value="warning"/>
120+
<property name="severity" value="info"/>
94121
</module>
95122
<module name="JavadocStyle"/>
96-
<module name="NonEmptyAtclauseDescription"/>
97-
<module name="SingleLineJavadoc"/>
98-
<module name="WriteTag"/>
99-
<module name="SummaryJavadoc">
123+
<module name="MissingJavadocMethod">
100124
<property name="severity" value="warning"/>
101125
</module>
102126

127+
<module name="AtclauseOrder"/>
128+
<module name="NonEmptyAtclauseDescription"/>
129+
<module name="SingleLineJavadoc"/>
130+
103131
<!-- Checks for Naming Conventions. -->
104-
<!-- See http://checkstyle.sf.net/config_naming.html -->
132+
<!-- See https://checkstyle.org/config_naming.html -->
105133
<module name="ConstantName"/>
106134
<module name="LocalFinalVariableName"/>
107135
<module name="LocalVariableName"/>
@@ -113,7 +141,7 @@ under the License.
113141
<module name="TypeName"/>
114142

115143
<!-- Checks for imports -->
116-
<!-- See http://checkstyle.sf.net/config_import.html -->
144+
<!-- See https://checkstyle.org/config_imports.html -->
117145
<!--<module name="AvoidStarImport"/>-->
118146
<module name="IllegalImport"/> <!-- defaults to sun.* packages -->
119147
<module name="RedundantImport"/>
@@ -122,16 +150,12 @@ under the License.
122150
</module>
123151

124152
<!-- Checks for Size Violations. -->
125-
<!-- See http://checkstyle.sf.net/config_sizes.html -->
126-
<module name="LineLength">
127-
<property name="max" value="120"/>
128-
<property name="ignorePattern" value="^package.*|^import.*|a href|href|http://|https://|ftp://"/>
129-
</module>
153+
<!-- See https://checkstyle.org/config_sizes.html -->
130154
<module name="MethodLength"/>
131155
<!--<module name="ParameterNumber"/>-->
132156

133157
<!-- Checks for whitespace -->
134-
<!-- See http://checkstyle.sf.net/config_whitespace.html -->
158+
<!-- See https://checkstyle.org/config_whitespace.html -->
135159
<module name="EmptyForIteratorPad"/>
136160
<module name="GenericWhitespace"/>
137161
<module name="MethodParamPad"/>
@@ -144,21 +168,20 @@ under the License.
144168
<module name="WhitespaceAround"/>
145169

146170
<!-- Modifier Checks -->
147-
<!-- See http://checkstyle.sf.net/config_modifiers.html -->
171+
<!-- See https://checkstyle.org/config_modifier.html -->
148172
<module name="ModifierOrder"/>
149173
<module name="RedundantModifier"/>
150174

151175
<!-- Checks for blocks. You know, those {}'s -->
152-
<!-- See http://checkstyle.sf.net/config_blocks.html -->
176+
<!-- See https://checkstyle.org/config_blocks.html -->
153177
<module name="AvoidNestedBlocks"/>
154178
<module name="EmptyBlock"/>
155179
<module name="LeftCurly"/>
156180
<module name="NeedBraces"/>
157181
<module name="RightCurly"/>
158182

159183
<!-- Checks for common coding problems -->
160-
<!-- See http://checkstyle.sf.net/config_coding.html -->
161-
<!--<module name="AvoidInlineConditionals"/>-->
184+
<!-- See https://checkstyle.org/config_coding.html -->
162185
<module name="EmptyStatement"/>
163186
<module name="EqualsHashCode"/>
164187
<module name="HiddenField">
@@ -169,28 +192,32 @@ under the License.
169192
<module name="InnerAssignment"/>
170193
<!--<module name="MagicNumber"/>-->
171194
<module name="MissingSwitchDefault"/>
195+
<module name="MultipleVariableDeclarations"/>
172196
<module name="SimplifyBooleanExpression"/>
173197
<module name="SimplifyBooleanReturn"/>
174198

175199
<!-- Checks for class design -->
176-
<!-- See http://checkstyle.sf.net/config_design.html -->
200+
<!-- See https://checkstyle.org/config_design.html -->
177201
<module name="DesignForExtension"/>
178202
<module name="FinalClass"/>
179203
<module name="HideUtilityClassConstructor"/>
180204
<module name="InterfaceIsType"/>
181205
<module name="VisibilityModifier"/>
182206

183207
<!-- Miscellaneous other checks. -->
184-
<!-- See http://checkstyle.sf.net/config_misc.html -->
208+
<!-- See https://checkstyle.org/config_misc.html -->
185209
<module name="ArrayTypeStyle"/>
186210
<module name="FinalParameters"/>
187211
<module name="TodoComment"/>
188212
<module name="UpperEll"/>
189213

190-
<module name="SuppressWarningsHolder"/>
191-
</module>
214+
<!-- https://checkstyle.org/config_filters.html#SuppressionXpathFilter -->
215+
<module name="SuppressionXpathFilter">
216+
<property name="file" value="${org.checkstyle.sun.suppressionxpathfilter.config}"
217+
default="checkstyle-xpath-suppressions.xml" />
218+
<property name="optional" value="true"/>
219+
</module>
192220

193-
<module name="RegexpHeader">
194-
<property name="headerFile" value="${checkstyle.header.file}"/>
195221
</module>
222+
196223
</module>

common/src/main/java/org/apache/nemo/common/ir/vertex/LoopVertex.java

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -440,11 +440,11 @@ public void setTerminationCondition(final IntPredicate terminationCondition) {
440440
this.terminationCondition = terminationCondition;
441441
}
442442

443-
@Override
444443
/**
445444
* Parse Properties to JsonNode.
446445
*/
447-
public ObjectNode getPropertiesAsJsonNode() {
446+
@Override
447+
public final ObjectNode getPropertiesAsJsonNode() {
448448
final ObjectNode node = getIRVertexPropertiesAsJsonNode();
449449
node.put("remainingIteration", maxNumberOfIterations);
450450
node.set("DAG", getDAG().asJsonNode());

common/src/main/java/org/apache/nemo/common/test/ExampleTestArgs.java

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -22,7 +22,7 @@
2222
* Test Arguments for Examples.
2323
*/
2424
public final class ExampleTestArgs {
25-
public static final int TIMEOUT = 300000;
25+
public static final int TIMEOUT = 500000;
2626
private static String fileBasePath;
2727

2828
/**

examples/beam/src/main/java/org/apache/nemo/examples/beam/MultinomialLogisticRegression.java

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -172,11 +172,11 @@ public void processElement(final ProcessContext c) throws Exception {
172172
}
173173

174174

175-
/**
176-
* When maxMargin > 0, the original formula will cause overflow as we discuss
177-
* in the previous comment.
178-
* We address this by subtracting maxMargin from all the margins, so it's guaranteed
179-
* that all of the new margins will be smaller than zero to prevent arithmetic overflow.
175+
/*
176+
When maxMargin > 0, the original formula will cause overflow as we discuss
177+
in the previous comment.
178+
We address this by subtracting maxMargin from all the margins, so it's guaranteed
179+
that all of the new margins will be smaller than zero to prevent arithmetic overflow.
180180
*/
181181
Double sum = 0.0;
182182
if (maxMargin > 0) {

pom.xml

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -76,7 +76,7 @@ under the License.
7676
<powermock.version>2.0.9</powermock.version>
7777
<surefire.version>3.0.0-M7</surefire.version>
7878
<junit.version>4.13.2</junit.version>
79-
<checkstyle.version>8.23</checkstyle.version>
79+
<checkstyle.version>9.3</checkstyle.version>
8080
</properties>
8181

8282
<modules>
@@ -203,7 +203,7 @@ under the License.
203203
<plugin>
204204
<groupId>org.apache.maven.plugins</groupId>
205205
<artifactId>maven-checkstyle-plugin</artifactId>
206-
<version>3.1.2</version>
206+
<version>3.2.0</version>
207207
<dependencies>
208208
<dependency>
209209
<groupId>com.puppycrawl.tools</groupId>

runtime/executor/src/main/java/org/apache/nemo/runtime/executor/data/BlockManagerWorker.java

Lines changed: 13 additions & 13 deletions
Original file line numberDiff line numberDiff line change
@@ -240,26 +240,26 @@ public CompletableFuture<DataUtil.IteratorWithNumBytes> readBlock(
240240
final BlockFetchFailureProperty.Value fetchFailure = edgeProperties.get(BlockFetchFailureProperty.class)
241241
.orElse(BlockFetchFailureProperty.Value.CANCEL_TASK); // the default behavior.
242242
if (!fetchFailure.equals(BlockFetchFailureProperty.Value.CANCEL_TASK)) {
243-
/**
244-
* Wait until fetching "all elements" of each block.
245-
*
246-
* Problem: If the task won't be cancelled upon fetch failure, then the task can potentially
247-
* process blocks partially or process the same elements more than once.
248-
*
249-
* Solution: With this waiting, a task that fetches a block either
250-
* - Processes all elements of the block
251-
* - Processes no element of the block (i.e., Runs into a block fetch exception while waiting)
243+
/*
244+
Wait until fetching "all elements" of each block.
245+
246+
Problem: If the task won't be cancelled upon fetch failure, then the task can potentially
247+
process blocks partially or process the same elements more than once.
248+
249+
Solution: With this waiting, a task that fetches a block either
250+
- Processes all elements of the block
251+
- Processes no element of the block (i.e., Runs into a block fetch exception while waiting)
252252
*/
253253
return contextFuture
254254
.thenCompose(ByteInputContext::getCompletedFuture)
255255
// thenApply waits for the future.
256256
.thenApply(streams -> new DataUtil.InputStreamIterator<>(
257257
streams, serializerManager.getSerializer(runtimeEdgeId)));
258258
} else {
259-
/**
260-
* Process "each element" of a block as soon as the element comes in.
261-
* No worries about partial/duplicate processing here, as the task will be cancelled and restarted cleanly.
262-
* Probably best performance when there is no failure.
259+
/*
260+
Process "each element" of a block as soon as the element comes in.
261+
No worries about partial/duplicate processing here, as the task will be cancelled and restarted cleanly.
262+
Probably best performance when there is no failure.
263263
*/
264264
return contextFuture
265265
.thenApply(context -> new DataUtil.InputStreamIterator<>(context.getInputStreams(),

0 commit comments

Comments
 (0)