HyukjinKwon commented on a change in pull request #25552: [SPARK-28849][CORE]
Add a number to control transferTo calls to avoid infinite loop in some
occasional cases
URL: https://github.com/apache/spark/pull/25552#discussion_r321991001
##########
File path: core/src/main/scala/org/apache/spark/internal/config/package.scala
##########
@@ -1407,4 +1407,13 @@ package object config {
.bytesConf(ByteUnit.BYTE)
.createOptional
+ private[spark] val TRANSFERTO_NUM_CALLS =
+ ConfigBuilder("spark.file.transferToZeroReturns")
+ .doc("To track the numbers of 0 return value of Java NIO's transferTo. "
+
+ "In some occasional case, Spark's copyFileStreamNIO will always return
zero and " +
+ "run into infinite loop, this configuration is used to track the
number of return 0 and " +
+ "jump out of loop in time. This is an internal configuration, " +
+ "user shouldn't configure it normally")
+ .intConf
Review comment:
@jerryshao, actually I think it might be better to consider more
conservative way to note this is an internal configuration via `.internal()`.
----------------------------------------------------------------
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:
[email protected]
With regards,
Apache Git Services
---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]