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 2021/05/03 06:46:55 UTC
[GitHub] [spark] byungsoo-oh commented on a change in pull request #32394: [SPARK-35266][TESTS] Fix error in BenchmarkBase.scala that occurs when creating benchmark files in non-existent directory
byungsoo-oh commented on a change in pull request #32394:
URL: https://github.com/apache/spark/pull/32394#discussion_r624902959
##########
File path: core/src/test/scala/org/apache/spark/benchmark/BenchmarkBase.scala
##########
@@ -49,7 +49,11 @@ abstract class BenchmarkBase {
val resultFileName =
s"${this.getClass.getSimpleName.replace("$", "")}$jdkString$suffix-results.txt"
val prefix = Benchmarks.currentProjectRoot.map(_ + "/").getOrElse("")
- val file = new File(s"${prefix}benchmarks/$resultFileName")
+ val dir = new File(s"${prefix}benchmarks/")
+ if (!dir.exists()) {
+ dir.mkdirs()
Review comment:
Thanks for the comment :) I added `println` as suggested.
--
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.
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