You are viewing a plain text version of this content. The canonical link for it is here.
Posted to reviews@spark.apache.org by GitBox <gi...@apache.org> on 2022/03/07 08:23:59 UTC
[GitHub] [spark] chong0929 opened a new pull request #35750: [MINOR] Optimise the check logic of "attemptId"
chong0929 opened a new pull request #35750:
URL: https://github.com/apache/spark/pull/35750
### What changes were proposed in this pull request?
Change "!attemptId.isDefined" to "attemptId.isEmpty".
### Why are the changes needed?
Appears more intuitive and easy to understand, the function "isDefined" is defined as follows:
```
/** Returns true if the option is an instance of $some, false otherwise.
*
* This is equivalent to:
* {{{
* option match {
* case Some(_) => true
* case None => false
* }
* }}}
*/
def isDefined: Boolean = !isEmpty
```
### Does this PR introduce _any_ user-facing change?
No
### How was this patch tested?
Passed GA.
--
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: reviews-unsubscribe@spark.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
---------------------------------------------------------------------
To unsubscribe, e-mail: reviews-unsubscribe@spark.apache.org
For additional commands, e-mail: reviews-help@spark.apache.org
[GitHub] [spark] zhengruifeng commented on pull request #35750: [MINOR] Optimise the check logic of "attemptId"
Posted by GitBox <gi...@apache.org>.
zhengruifeng commented on pull request #35750:
URL: https://github.com/apache/spark/pull/35750#issuecomment-1060483767
Can we find similar places, and change them in a batch?
--
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: reviews-unsubscribe@spark.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
---------------------------------------------------------------------
To unsubscribe, e-mail: reviews-unsubscribe@spark.apache.org
For additional commands, e-mail: reviews-help@spark.apache.org
[GitHub] [spark] AmplabJenkins removed a comment on pull request #35750: [MINOR] Simplify the usage of "!isDefined" to "isEmpty"
Posted by GitBox <gi...@apache.org>.
AmplabJenkins removed a comment on pull request #35750:
URL: https://github.com/apache/spark/pull/35750#issuecomment-1061063699
Can one of the admins verify this patch?
--
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: reviews-unsubscribe@spark.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
---------------------------------------------------------------------
To unsubscribe, e-mail: reviews-unsubscribe@spark.apache.org
For additional commands, e-mail: reviews-help@spark.apache.org
[GitHub] [spark] AmplabJenkins commented on pull request #35750: [MINOR] Optimise the check logic of "attemptId"
Posted by GitBox <gi...@apache.org>.
AmplabJenkins commented on pull request #35750:
URL: https://github.com/apache/spark/pull/35750#issuecomment-1061063699
Can one of the admins verify this patch?
--
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: reviews-unsubscribe@spark.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
---------------------------------------------------------------------
To unsubscribe, e-mail: reviews-unsubscribe@spark.apache.org
For additional commands, e-mail: reviews-help@spark.apache.org
[GitHub] [spark] chong0929 closed pull request #35750: [MINOR] Simplify the usage of "!isDefined" to "isEmpty"
Posted by GitBox <gi...@apache.org>.
chong0929 closed pull request #35750:
URL: https://github.com/apache/spark/pull/35750
--
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: reviews-unsubscribe@spark.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
---------------------------------------------------------------------
To unsubscribe, e-mail: reviews-unsubscribe@spark.apache.org
For additional commands, e-mail: reviews-help@spark.apache.org
[GitHub] [spark] chong0929 commented on pull request #35750: [MINOR] Simplify the usage of "!isDefined" to "isEmpty"
Posted by GitBox <gi...@apache.org>.
chong0929 commented on pull request #35750:
URL: https://github.com/apache/spark/pull/35750#issuecomment-1061524000
Thanks for your attention, 18 similar places found as follows and has been submitted for revision.
```
1. core/src/test/scala/org/apache/spark/util/JsonProtocolSuite.scala:937: assert(!opt2.isDefined)
2. core/src/test/scala/org/apache/spark/deploy/SparkSubmitSuite.scala:609: assert(!sc2.progressBar.isDefined)
3. core/src/test/scala/org/apache/spark/rdd/LocalCheckpointSuite.scala:73: assert(!filteredRdd.checkpointData.get.checkpointRDD.isDefined)
4. core/src/main/scala/org/apache/spark/metrics/sink/GraphiteSink.scala:45: if (!propertyToOption(GRAPHITE_KEY_HOST).isDefined) {
5. core/src/main/scala/org/apache/spark/metrics/sink/GraphiteSink.scala:49: if (!propertyToOption(GRAPHITE_KEY_PORT).isDefined) {
6. core/src/main/scala/org/apache/spark/ui/jobs/StagePage.scala:362: if (!taskInfo.duration.isDefined) {
7. core/src/main/scala/org/apache/spark/scheduler/TaskSetManager.scala:1100: if (isZombie || isBarrier || (numTasks == 1 && !speculationTaskDurationThresOpt.isDefined)) {
8. mllib/src/main/scala/org/apache/spark/ml/feature/Interaction.scala:162: } else if (!attr.name.isDefined) {
9. external/kafka-0-10-sql/src/test/scala/org/apache/spark/sql/kafka010/KafkaMicroBatchSourceSuite.scala:188: if (!q.exception.isDefined) {
10. external/kafka-0-10-sql/src/test/scala/org/apache/spark/sql/kafka010/KafkaMicroBatchSourceSuite.scala:1061: if (!q.exception.isDefined) {
11. external/kafka-0-10-sql/src/test/scala/org/apache/spark/sql/kafka010/KafkaMicroBatchSourceSuite.scala:1184: if (!q.exception.isDefined) {
12. external/kafka-0-10-sql/src/main/scala/org/apache/spark/sql/kafka010/consumer/KafkaDataConsumer.scala:557: if (!_consumer.isDefined) {
13. external/spark-ganglia-lgpl/src/main/scala/org/apache/spark/metrics/sink/GangliaSink.scala:53: if (!propertyToOption(GANGLIA_KEY_HOST).isDefined) {
14. external/spark-ganglia-lgpl/src/main/scala/org/apache/spark/metrics/sink/GangliaSink.scala:57: if (!propertyToOption(GANGLIA_KEY_PORT).isDefined) {
15. sql/core/src/test/scala/org/apache/spark/sql/UDTRegistrationSuite.scala:87: assert(!UDTRegistration.getUDTFor(classOf[TestUserClass3].getName).isDefined)
16. sql/core/src/test/scala/org/apache/spark/sql/execution/benchmark/AggregateBenchmark.scala:573: if (!loc.isDefined) {
17. sql/core/src/test/scala/org/apache/spark/sql/execution/streaming/sources/RatePerMicroBatchProviderSuite.scala:131: if (!q.exception.isDefined) {
18. sql/catalyst/src/main/scala/org/apache/spark/sql/catalyst/expressions/codegen/javaCode.scala:179: if (!newE.isDefined || newE.get.equals(e)) {
19. sql/catalyst/src/main/scala/org/apache/spark/sql/catalyst/rules/RuleIdCollection.scala:206: if (!ruleIdOpt.isDefined) {
```
--
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: reviews-unsubscribe@spark.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
---------------------------------------------------------------------
To unsubscribe, e-mail: reviews-unsubscribe@spark.apache.org
For additional commands, e-mail: reviews-help@spark.apache.org
[GitHub] [spark] zhengruifeng commented on pull request #35750: [MINOR] Simplify the usage of "!isDefined" to "isEmpty"
Posted by GitBox <gi...@apache.org>.
zhengruifeng commented on pull request #35750:
URL: https://github.com/apache/spark/pull/35750#issuecomment-1062498779
Jenkins, retest this please
--
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: reviews-unsubscribe@spark.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
---------------------------------------------------------------------
To unsubscribe, e-mail: reviews-unsubscribe@spark.apache.org
For additional commands, e-mail: reviews-help@spark.apache.org
[GitHub] [spark] AngersZhuuuu commented on pull request #35750: [MINOR] Simplify the usage of "!isDefined" to "isEmpty"
Posted by GitBox <gi...@apache.org>.
AngersZhuuuu commented on pull request #35750:
URL: https://github.com/apache/spark/pull/35750#issuecomment-1064020337
Should we create a jira ticket and use the ticket id as pr title? like `[SPARK-xxx][module] Simplify the usage of "!isDefined" to "isEmpty"`
--
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: reviews-unsubscribe@spark.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
---------------------------------------------------------------------
To unsubscribe, e-mail: reviews-unsubscribe@spark.apache.org
For additional commands, e-mail: reviews-help@spark.apache.org
[GitHub] [spark] zhengruifeng commented on pull request #35750: [MINOR] Simplify the usage of "!isDefined" to "isEmpty"
Posted by GitBox <gi...@apache.org>.
zhengruifeng commented on pull request #35750:
URL: https://github.com/apache/spark/pull/35750#issuecomment-1062497321
ok to test
--
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: reviews-unsubscribe@spark.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
---------------------------------------------------------------------
To unsubscribe, e-mail: reviews-unsubscribe@spark.apache.org
For additional commands, e-mail: reviews-help@spark.apache.org