HeartSaVioR commented on a change in pull request #35343:
URL: https://github.com/apache/spark/pull/35343#discussion_r799127211
##########
File path:
external/kafka-0-10-sql/src/main/scala/org/apache/spark/sql/kafka010/KafkaMicroBatchStream.scala
##########
@@ -73,6 +73,10 @@ private[kafka010] class KafkaMicroBatchStream(
Utils.timeStringAsMs(Option(options.get(
KafkaSourceProvider.MAX_TRIGGER_DELAY)).getOrElse(DEFAULT_MAX_TRIGGER_DELAY))
+ // this allows us to mock system clock for testing purposes
+ private[kafka010] val clock: Clock
+ = if (options.containsKey(MOCK_SYSTEM_TIME)) new MockedSystemClock else new
SystemClock
Review comment:
+1 `=` should not be in same indentation with `p`. If it's the only way
to fit L78 to a single line, please use multi-lines instead, e.g. below:
```
private[kafka010] val clock: Clock = if
(options.containsKey(MOCK_SYSTEM_TIME)) {
new MockedSystemClock
} else {
new SystemClock
}
```
or even 6 lines if the first line exceeds 100 chars.
--
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]
---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]