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
[STORM-3037] Lowering CheckStyle Violations across all modules #2641
Conversation
count = 0; | ||
System.out.println("Pending count: " + this.pending.size() + ", total: " + this.total); | ||
} | ||
Thread.yield(); | ||
} | ||
|
||
public void ack(Object msgId) { | ||
// System.out.println("ACK"); | ||
// System.out.println("ACK"); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Should we just remove this
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This is attempt to only fix format to allow for checkstyle to pass it. I did not go into each comment for its validity for deletion.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This is great work . But it's too much to review it at once. I will come back to review it later.
* with the License. You may obtain a copy of the License at | ||
* Licensed to the Apache Software Foundation (ASF) under one or more contributor license agreements. See the NOTICE file distributed with | ||
* this work for additional information regarding copyright ownership. The ASF licenses this file to you under the Apache License, Version | ||
* 2.0 (the "License"); you may not use this file except in compliance with the License. You may obtain a copy of the License at |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Why do we change this
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
The line length allowed is 140 characters. So the paragraphs are reformatted
@@ -1,25 +1,24 @@ | |||
/* |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Should be /**
here?
// threeProducer1Consumer(1); // -- measurement 3 | ||
// oneProducer1Consumer(1000); // -- measurement 1 | ||
// twoProducer1Consumer(1000); // -- measurement 2 | ||
// threeProducer1Consumer(1); // -- measurement 3 |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Do we want to just remove these? Otherwise, delete the spaces between //
and the actual code, e.g. //threeProducer1Consumer(1);
to make it look better
// twoProducer1Consumer(); | ||
// threeProducer1Consumer(); | ||
// oneProducer2Consumers(); | ||
// producerFwdConsumer(); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
nit: spaces between //
and code
@@ -64,7 +63,7 @@ static StormTopology getTopology(Map<String, Object> conf) { | |||
BoltDeclarer bd = builder.setBolt(BOLT_ID, bolt, Helper.getInt(conf, BOLT_COUNT, 1)); | |||
|
|||
bd.localOrShuffleGrouping(SPOUT_ID); | |||
// bd.shuffleGrouping(SPOUT_ID); | |||
// bd.shuffleGrouping(SPOUT_ID); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
nit: space?
} | ||
return result; | ||
} | ||
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
It looks like you just moved the location of the function. Is there any particular reason to do it?
String str = Utils.join(header, ","); | ||
writer.println(str); | ||
writer.println("------------------------------------------------------------------------------------------------------------------"); | ||
writer | ||
.println("------------------------------------------------------------------------------------------------------------------"); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Would it be good to be consistent about this writer.println()
? Here we have
writer.println(
"\n---...
and
writer
.println("---
@@ -160,7 +159,7 @@ private static MetricsSample getMetricsSample(TopologyInfo topInfo) { | |||
ret.spoutEmitted = spoutEmitted; | |||
ret.spoutTransferred = spoutTransferred; | |||
ret.sampleTime = System.currentTimeMillis(); | |||
// ret.numSupervisors = clusterSummary.get_supervisors_size(); | |||
// ret.numSupervisors = clusterSummary.get_supervisors_size(); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
remove this line ? or delete the space?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Addressed
throw new RuntimeException(exp); | ||
} | ||
} | ||
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Why are we moving locations of the functions
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
There are checkstyle conditions that decide import order, modified overloaded method order and at-clause orders. To avoid these violations, we need to put these methods in right order.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
+1 this is definitely a step in the right direction. It may not be perfect but there is more good in here.
Please upmerge as I merged one thing in that messed this up, sorry I'll try to hold off on more merges.
Also please respond to or address Ethan's concerns.
Still +1 |
Below is the list of modules affected by this patch. The max allowed violations are going down by 17000+.