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
[NEMO-429] SWPP TEAM12 Code Smell Fix #274
Changes from 13 commits
33fe65a
affa222
9227c3a
c137442
746f301
579b858
f7b8365
09cecbb
67720e5
4ec27e2
e677c81
6791bf9
bf97dd1
3c28552
37aae83
5fcdc1e
91781bc
a7ddc63
badfd40
6201538
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -36,9 +36,9 @@ | |
* | ||
* @param <I> input type. | ||
*/ | ||
public final class HDFSTextFileTransform<I> extends NoWatermarkEmitTransform<I, String> { | ||
public final class HDFSTextFileTransform<I> extends NoWatermarkEmitTransform<I, String> { //NOSONAR | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Can you remove this NOSONAR comment? 😄 |
||
private final String path; | ||
private Path fileName; | ||
private Path fileName; //NOSONAR | ||
private List<I> elements; | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Please revert the change made on line 39, and make the variables declared on line 41 and 42 |
||
|
||
/** | ||
|
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -264,6 +264,9 @@ public void processElement(final ProcessContext c) throws Exception { | |
* Composite transform that wraps the transforms inside the loop. | ||
* The loop updates the user matrix and the item matrix in each iteration. | ||
*/ | ||
|
||
|
||
|
||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. It seems like these few lines were added by mistake. Could you revert the changes for this file? Thanks! 😄 |
||
public static final class UpdateUserAndItemMatrix | ||
extends LoopCompositeTransform<PCollection<KV<Integer, float[]>>, PCollection<KV<Integer, float[]>>> { | ||
private final Integer numFeatures; | ||
|
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -55,9 +55,9 @@ class SourceVertexDataFetcher extends DataFetcher { | |
|
||
if (!bounded) { | ||
this.watermarkTriggerService = Executors.newScheduledThreadPool(1); | ||
this.watermarkTriggerService.scheduleAtFixedRate(() -> { | ||
watermarkTriggered = true; | ||
}, WATERMARK_PERIOD, WATERMARK_PERIOD, TimeUnit.MILLISECONDS); | ||
this.watermarkTriggerService.scheduleAtFixedRate(() -> | ||
watermarkTriggered = true | ||
, WATERMARK_PERIOD, WATERMARK_PERIOD, TimeUnit.MILLISECONDS); | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. I think these lines are causing the checkstyle error. Can you append the comma at the end of line 59, instead of at the beginning of line 60? |
||
} else { | ||
this.watermarkTriggerService = null; | ||
} | ||
|
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.
Let's revert this change on the import line. This isn't applicable. Instead, let's make the
terminationCondition
variable transient on line 59. You can declare it asprivate transient IntPredicate
... there and it will solve the issue 👍