lhotari commented on code in PR #14:
URL: https://github.com/apache/pulsar-connectors/pull/14#discussion_r3079573802
##########
file/src/main/java/org/apache/pulsar/io/file/FileListingThread.java:
##########
@@ -97,7 +97,7 @@ public void run() {
}
try {
- sleep(pollingInterval - 1);
+ sleep(pollingInterval);
} catch (InterruptedException e) {
// Just ignore
Review Comment:
@pdolif This look like a valid point made by the review, although this isn't
related to your change. Another detail is that `while (true) {` should be
replaced with `while (!Thread.currentThread().isInterrupted()) {` so that the
thread would shutdown gracefully when the JVM stops.
btw. This class should extend java.lang.Thread at all since it's used this
way:
https://github.com/apache/pulsar-connectors/blob/e689bc345bad14ff176a4a35998fd21111f26766/file/src/main/java/org/apache/pulsar/io/file/FileSource.java#L48-L55
A better approach would be to just implement Runnable.
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: [email protected]
For queries about this service, please contact Infrastructure at:
[email protected]