This is an automated email from the ASF dual-hosted git repository.
rexxiong pushed a commit to branch branch-tez-support
in repository https://gitbox.apache.org/repos/asf/celeborn.git
The following commit(s) were added to refs/heads/branch-tez-support by this
push:
new 4d5c7e150 [CELEBORN-1610] Tez support customize main class. (#2757)
4d5c7e150 is described below
commit 4d5c7e15018500e77c29954d472ce1f7580d66b8
Author: Ethan Feng <[email protected]>
AuthorDate: Thu Oct 10 16:23:35 2024 +0800
[CELEBORN-1610] Tez support customize main class. (#2757)
---
assets/tez-patch/Customize-tez-main-class.patch | 55 +++++++++++++++++++++++++
assets/tez-patch/for_local_test.patch | 15 +++++++
2 files changed, 70 insertions(+)
diff --git a/assets/tez-patch/Customize-tez-main-class.patch
b/assets/tez-patch/Customize-tez-main-class.patch
new file mode 100644
index 000000000..338c41df9
--- /dev/null
+++ b/assets/tez-patch/Customize-tez-main-class.patch
@@ -0,0 +1,55 @@
+# Licensed to the Apache Software Foundation (ASF) under one or more
+# contributor license agreements. See the NOTICE file distributed with
+# this work for additional information regarding copyright ownership.
+# The ASF licenses this file to You under the Apache License, Version 2.0
+# (the "License"); you may not use this file except in compliance with
+# the License. You may obtain a copy of the License at
+#
+# http://www.apache.org/licenses/LICENSE-2.0
+#
+# Unless required by applicable law or agreed to in writing, software
+# distributed under the License is distributed on an "AS IS" BASIS,
+# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+# See the License for the specific language governing permissions and
+# limitations under the License.
+
+Subject: [PATCH] parameterize tez app master class
+---
+Index: tez-api/src/main/java/org/apache/tez/dag/api/TezConfiguration.java
+IDEA additional info:
+Subsystem: com.intellij.openapi.diff.impl.patch.CharsetEP
+<+>UTF-8
+===================================================================
+diff --git
a/tez-api/src/main/java/org/apache/tez/dag/api/TezConfiguration.java
b/tez-api/src/main/java/org/apache/tez/dag/api/TezConfiguration.java
+--- a/tez-api/src/main/java/org/apache/tez/dag/api/TezConfiguration.java
(revision 3882a38482884f4aac41081810dac6be8628be62)
++++ b/tez-api/src/main/java/org/apache/tez/dag/api/TezConfiguration.java
(date 1727082792902)
+@@ -239,6 +239,9 @@
+ public static final String TEZ_AM_LOG_LEVEL = TEZ_AM_PREFIX + "log.level";
+ public static final String TEZ_AM_LOG_LEVEL_DEFAULT = "INFO";
+
++ @ConfigurationScope(Scope.AM)
++ public static final String TEZ_APPLICATION_MAIN_CLASS =
TezConfiguration.TEZ_AM_PREFIX + "application.main.class";
++
+ /**
+ * Root Logging level passed to the Tez tasks.
+ *
+Index: tez-api/src/main/java/org/apache/tez/client/TezClientUtils.java
+IDEA additional info:
+Subsystem: com.intellij.openapi.diff.impl.patch.CharsetEP
+<+>UTF-8
+===================================================================
+diff --git a/tez-api/src/main/java/org/apache/tez/client/TezClientUtils.java
b/tez-api/src/main/java/org/apache/tez/client/TezClientUtils.java
+--- a/tez-api/src/main/java/org/apache/tez/client/TezClientUtils.java
(revision 3882a38482884f4aac41081810dac6be8628be62)
++++ b/tez-api/src/main/java/org/apache/tez/client/TezClientUtils.java (date
1727082792894)
+@@ -514,7 +514,10 @@
+ // FIX sun bug mentioned in TEZ-327
+ vargs.add("-Dsun.nio.ch.bugLevel=''");
+
+- vargs.add(TezConstants.TEZ_APPLICATION_MASTER_CLASS);
++ String appMaster = amConfig.getTezConfiguration().get(
++ TezConfiguration.TEZ_APPLICATION_MAIN_CLASS,
++ TezConstants.TEZ_APPLICATION_MASTER_CLASS);
++ vargs.add(appMaster);
+ if (dag == null) {
+ vargs.add("--" + TezConstants.TEZ_SESSION_MODE_CLI_OPTION);
+ }
\ No newline at end of file
diff --git a/assets/tez-patch/for_local_test.patch
b/assets/tez-patch/for_local_test.patch
index 97b50f247..80d2985b9 100644
--- a/assets/tez-patch/for_local_test.patch
+++ b/assets/tez-patch/for_local_test.patch
@@ -1,3 +1,18 @@
+# Licensed to the Apache Software Foundation (ASF) under one or more
+# contributor license agreements. See the NOTICE file distributed with
+# this work for additional information regarding copyright ownership.
+# The ASF licenses this file to You under the Apache License, Version 2.0
+# (the "License"); you may not use this file except in compliance with
+# the License. You may obtain a copy of the License at
+#
+# http://www.apache.org/licenses/LICENSE-2.0
+#
+# Unless required by applicable law or agreed to in writing, software
+# distributed under the License is distributed on an "AS IS" BASIS,
+# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+# See the License for the specific language governing permissions and
+# limitations under the License.
+
Subject: [PATCH] for local test
---
Index: tez-dag/src/main/java/org/apache/tez/client/LocalClient.java