This is an automated email from the ASF dual-hosted git repository.
mingliang pushed a commit to branch main
in repository https://gitbox.apache.org/repos/asf/incubator-gluten.git
The following commit(s) were added to refs/heads/main by this push:
new 94b4c01517 [GLUTEN-10529] Remove unnecessary create for Runtimes
(#10530)
94b4c01517 is described below
commit 94b4c01517b25b1beee4c26ab63d6714615a92f0
Author: Jiaan Geng <[email protected]>
AuthorDate: Wed Aug 27 16:57:53 2025 +0800
[GLUTEN-10529] Remove unnecessary create for Runtimes (#10530)
---
.../src/main/scala/org/apache/gluten/runtime/Runtimes.scala | 11 ++++-------
1 file changed, 4 insertions(+), 7 deletions(-)
diff --git
a/gluten-arrow/src/main/scala/org/apache/gluten/runtime/Runtimes.scala
b/gluten-arrow/src/main/scala/org/apache/gluten/runtime/Runtimes.scala
index f92c34e99a..f3e75757ab 100644
--- a/gluten-arrow/src/main/scala/org/apache/gluten/runtime/Runtimes.scala
+++ b/gluten-arrow/src/main/scala/org/apache/gluten/runtime/Runtimes.scala
@@ -16,7 +16,7 @@
*/
package org.apache.gluten.runtime
-import org.apache.spark.task.{TaskResource, TaskResources}
+import org.apache.spark.task.TaskResources
object Runtimes {
@@ -25,11 +25,8 @@ object Runtimes {
if (!TaskResources.inSparkTask()) {
throw new IllegalStateException("This method must be called in a Spark
task.")
}
-
- TaskResources.addResourceIfNotRegistered(s"$backendName:$name", () =>
create(backendName, name))
- }
-
- private def create(backendName: String, name: String): Runtime with
TaskResource = {
- Runtime(backendName, name)
+ TaskResources.addResourceIfNotRegistered(
+ s"$backendName:$name",
+ () => Runtime(backendName, name))
}
}
---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]