taowenjun commented on code in PR #3360:
URL: https://github.com/apache/celeborn/pull/3360#discussion_r2353173065
##########
worker/src/main/scala/org/apache/celeborn/service/deploy/worker/storage/TierWriter.scala:
##########
@@ -651,21 +652,28 @@ class DfsTierWriter(
hadoopFs.delete(dfsFileInfo.getDfsPath, false)
deleted = true
} else {
- hadoopFs.create(dfsFileInfo.getDfsWriterSuccessPath).close()
+ val retryCount = conf.workerCreateIndexOrSuccessMaxAttempts
+ val retryWait = conf.workerCreateIndexOrSuccessWaitMs
+ Utils.withRetryOnTimeoutOrIOException(retryCount, retryWait) {
+ hadoopFs.create(dfsFileInfo.getDfsWriterSuccessPath).close()
+ }
if (dfsFileInfo.isReduceFileMeta) {
- val indexOutputStream = hadoopFs.create(dfsFileInfo.getDfsIndexPath)
- val byteStream: ByteArrayOutputStream = new ByteArrayOutputStream()
- val dataStream = new DataOutputStream(byteStream)
- try {
-
dataStream.writeInt(dfsFileInfo.getReduceFileMeta.getChunkOffsets.size)
- for (offset <-
dfsFileInfo.getReduceFileMeta.getChunkOffsets.asScala) {
- dataStream.writeLong(offset)
+ Utils.withRetryOnTimeoutOrIOException(retryCount, retryWait) {
+ if (hadoopFs.exists(dfsFileInfo.getDfsIndexPath)) {
Review Comment:
On the first attempt, no file exists and FileNotFoundException is thrown
when deleting directly。
--
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]