Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[FLINK-6731] [tests] Activate strict checkstyle for flink-tests #4295

Conversation

greghogan
Copy link
Contributor

No description provided.

@greghogan greghogan force-pushed the 6731_activate_strict_checkstyle_for_flink_tests branch from 366b6c0 to 9270553 Compare July 11, 2017 00:52
@zentol
Copy link
Contributor

zentol commented Jul 12, 2017

The pom.xml wasn't updated to run the checkstyle plugin.

@zentol
Copy link
Contributor

zentol commented Jul 12, 2017

Import changes look ok.

@zentol
Copy link
Contributor

zentol commented Jul 12, 2017

Whitespace changes look ok.

Copy link
Contributor

@zentol zentol left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Nice work, only had some minor comments. But the PR needs a rebase.

@@ -30,6 +29,9 @@

import org.junit.Assert;

/**
*
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

empty javadoc

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Updated.

*
* @param <E> the type of elements maintained by this set
*/
private static final class ConcurrentSet<E> extends AbstractSet<E> implements Serializable {
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

You could also use Collections.newSetFromMap(new HashMap<>())

Copy link
Contributor Author

@greghogan greghogan Jul 12, 2017

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Correction: the import was reordered in a recent commit but removed in your commit yesterday. So have revered the inclusion of this class.

@@ -324,7 +322,7 @@ public void notifyCheckpointComplete(long checkpointId) {
private static class LeftIdentityCoRichFlatMapFunction extends RichCoFlatMapFunction<Long, Long, Long>
implements CheckpointListener {

static final List<Long>[] completedCheckpoints = createCheckpointLists(PARALLELISM);
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

did you intentionally remove final? (there are other instances of change)

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I've fixed the instances in this file. Variables are now uppercase.

@@ -168,6 +173,6 @@ private static void runKMeans(ExecutionEnvironment env) throws Exception {

clusteredPoints.output(new DiscardingOutputFormat<Tuple2<Integer, KMeans.Point>>());

env.execute("KMeans Example");
env.execute("kmeans Example");
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Not sure if we have to change this.

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Agreed.

@@ -36,9 +36,9 @@
private final long maxAdditionalSessionGap;

public GeneratorConfiguration(long allowedLateness,
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

let's move the allowedLateness argument to the next line as well.

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Done.

@@ -39,9 +39,9 @@
* @return event for an keyed event generator
*/
E createEvent(K key,
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

move to next line

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Done.

@greghogan greghogan force-pushed the 6731_activate_strict_checkstyle_for_flink_tests branch from 9270553 to 7afd05c Compare July 12, 2017 11:24
@@ -65,7 +68,7 @@ public Centroid map(String c) {
}
});

// set number of bulk iterations for KMeans algorithm
// set number of bulk iterations for kmeans algorithm
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Another instance of "kmeans" renaming

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I reverted these and the additional instances. It looks to have happened when renaming KMeansSingleStepTest#KMeans.

@@ -70,7 +69,7 @@ public static void main(String[] args) throws Exception {
DataSet<Centroid> centroids = env.fromElements(centersData.split("\n"))
.map(new TupleCentroidConverter());

// set number of bulk iterations for KMeans algorithm
// set number of bulk iterations for kmeans algorithm
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

and another

@zentol
Copy link
Contributor

zentol commented Jul 12, 2017

+1 with green light from travis.

@greghogan greghogan force-pushed the 6731_activate_strict_checkstyle_for_flink_tests branch from 3a848a2 to 182f5a8 Compare July 12, 2017 20:12
@asfgit asfgit closed this in 9bd491e Jul 12, 2017
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants