Re: [PR] [GLUTEN-9801] Delete the written file if the task failed [incubator-gluten]
Yohahaha commented on code in PR #9808:
URL: https://github.com/apache/incubator-gluten/pull/9808#discussion_r2153580080
##
backends-velox/src/main/scala/org/apache/spark/sql/execution/SparkWriteFilesCommitProtocol.scala:
##
@@ -97,8 +97,11 @@ class SparkWriteFilesCommitProtocol(
}
}
- def abortTask(): Unit = {
+ def abortTask(writePath: String): Unit = {
committer.abortTask(taskAttemptContext)
+
+val tmpPath = new Path(writePath)
Review Comment:
+1, spark only delete committed `absPath` which means delete customer
partition location path.
Spark and Hadoop never delete task committed path.
--
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]
Re: [PR] [GLUTEN-9801] Delete the written file if the task failed [incubator-gluten]
Yohahaha commented on code in PR #9808:
URL: https://github.com/apache/incubator-gluten/pull/9808#discussion_r2153580080
##
backends-velox/src/main/scala/org/apache/spark/sql/execution/SparkWriteFilesCommitProtocol.scala:
##
@@ -97,8 +97,11 @@ class SparkWriteFilesCommitProtocol(
}
}
- def abortTask(): Unit = {
+ def abortTask(writePath: String): Unit = {
committer.abortTask(taskAttemptContext)
+
+val tmpPath = new Path(writePath)
Review Comment:
+1, spark only delete committed `absPath` which means delete customer
partition location path.
Spark and Hadoop never delete task committed path.
--
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]
Re: [PR] [GLUTEN-9801] Delete the written file if the task failed [incubator-gluten]
RushabhK commented on code in PR #9808:
URL: https://github.com/apache/incubator-gluten/pull/9808#discussion_r2137360227
##
backends-velox/src/main/scala/org/apache/spark/sql/execution/SparkWriteFilesCommitProtocol.scala:
##
@@ -97,8 +97,11 @@ class SparkWriteFilesCommitProtocol(
}
}
- def abortTask(): Unit = {
+ def abortTask(writePath: String): Unit = {
committer.abortTask(taskAttemptContext)
+
+val tmpPath = new Path(writePath)
Review Comment:
@JkSelf This would delete all the files in the temporary staging directory.
This leads to FileNotFoundException, I have seen this in my setup:
https://github.com/apache/incubator-gluten/issues/9801#issuecomment-2929038203
We need to selectively delete the files like spark's
HadoopMapReduceCommitProtocol selectively deletes the absolute paths that were
added:
https://github.com/apache/spark/blob/master/core/src/main/scala/org/apache/spark/internal/io/HadoopMapReduceCommitProtocol.scala#L302-L305
--
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]
Re: [PR] [GLUTEN-9801] Delete the written file if the task failed [incubator-gluten]
zhouyuan merged PR #9808: URL: https://github.com/apache/incubator-gluten/pull/9808 -- 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]
Re: [PR] [GLUTEN-9801]Delete the written file if the task failed [incubator-gluten]
JkSelf commented on code in PR #9808:
URL: https://github.com/apache/incubator-gluten/pull/9808#discussion_r2115214381
##
backends-velox/src/main/scala/org/apache/spark/sql/execution/SparkWriteFilesCommitProtocol.scala:
##
@@ -97,8 +97,11 @@ class SparkWriteFilesCommitProtocol(
}
}
- def abortTask(): Unit = {
+ def abortTask(writePath: String): Unit = {
committer.abortTask(taskAttemptContext)
+
+val tmpPath = new Path(writePath)
+tmpPath.getFileSystem(taskAttemptContext.getConfiguration).delete(tmpPath,
false)
Review Comment:
@ulysses-you Good catch. Updated.
--
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]
Re: [PR] [GLUTEN-9801]Delete the written file if the task failed [incubator-gluten]
github-actions[bot] commented on PR #9808: URL: https://github.com/apache/incubator-gluten/pull/9808#issuecomment-2921269814 https://github.com/apache/incubator-gluten/issues/9801 -- 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]
Re: [PR] [GLUTEN-9801]Delete the written file if the task failed [incubator-gluten]
ulysses-you commented on code in PR #9808:
URL: https://github.com/apache/incubator-gluten/pull/9808#discussion_r2115177836
##
backends-velox/src/main/scala/org/apache/spark/sql/execution/SparkWriteFilesCommitProtocol.scala:
##
@@ -97,8 +97,11 @@ class SparkWriteFilesCommitProtocol(
}
}
- def abortTask(): Unit = {
+ def abortTask(writePath: String): Unit = {
committer.abortTask(taskAttemptContext)
+
+val tmpPath = new Path(writePath)
+tmpPath.getFileSystem(taskAttemptContext.getConfiguration).delete(tmpPath,
false)
Review Comment:
`delete(tmpPath, true)` ? the boolean param means if delete files recursive
when the path is a directory. IIUC, `tmpPath` is a directory.
--
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]
Re: [PR] [GLUTEN-9801]Delete the written file if the task failed [incubator-gluten]
JkSelf commented on PR #9808: URL: https://github.com/apache/incubator-gluten/pull/9808#issuecomment-2921274847 @ulysses-you Can you help to review this PR? Thanks. -- 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]
