supportedTypes = new HashSet<>();
+ for (SchedulerResourceTypes resourceType : supportedResourceTypes) {
+ supportedTypes.add(resourceType.name());
+ }
+ return supportedTypes;
+ }
}
diff --git a/hadoop-shim/src/main/java/org/apache/tez/hadoop/shim/HadoopShim.java b/hadoop-shim/src/main/java/org/apache/tez/hadoop/shim/HadoopShim.java
index 96405f0ab4..56d642f330 100644
--- a/hadoop-shim/src/main/java/org/apache/tez/hadoop/shim/HadoopShim.java
+++ b/hadoop-shim/src/main/java/org/apache/tez/hadoop/shim/HadoopShim.java
@@ -25,6 +25,16 @@
import org.apache.hadoop.yarn.api.protocolrecords.RegisterApplicationMasterResponse;
import org.apache.hadoop.yarn.api.records.FinalApplicationStatus;
+/**
+ * An interoperability layer to handle API variations across different versions of Apache Hadoop.
+ *
+ * NOTE TO DEVELOPERS: This shim framework dynamically loads version-specific implementations
+ * (via {@code HadoopShimsLoader}) at runtime. While the legacy Hadoop 2.x specific shims have been
+ * removed, the core framework is intentionally retained. It provides a generic, extensible
+ * mechanism to seamlessly handle any breaking API changes or missing features that may arise in
+ * future Hadoop versions, ensuring Tez maintains broad compatibility without tying the codebase to
+ * a single Hadoop API signature.
+ */
@Public
@Unstable
public abstract class HadoopShim {
diff --git a/pom.xml b/pom.xml
index 0aadd69e31..ccdc48d2d1 100644
--- a/pom.xml
+++ b/pom.xml
@@ -783,6 +783,11 @@
+
+ org.apache.hadoop
+ hadoop-hdfs-client
+ ${hadoop.version}
+
org.apache.hadoop
hadoop-hdfs
@@ -972,7 +977,6 @@
tez-ui
tez-plugins
tez-tools
- hadoop-shim-impls
tez-dist
docs
diff --git a/tez-api/pom.xml b/tez-api/pom.xml
index 187e87d99b..5131258dcd 100644
--- a/tez-api/pom.xml
+++ b/tez-api/pom.xml
@@ -101,6 +101,15 @@
org.glassfish.jersey.media
jersey-media-json-jackson
+
+ org.apache.hadoop
+ hadoop-hdfs-client
+
+
+ org.apache.hadoop
+ hadoop-hdfs
+ test
+
org.apache.hadoop
hadoop-hdfs
@@ -221,38 +230,4 @@
-
-
- hadoop27
-
- false
-
-
-
- org.apache.hadoop
- hadoop-hdfs
- runtime
-
-
-
-
- hadoop28
-
- true
-
-
-
- org.apache.hadoop
- hadoop-hdfs-client
- ${hadoop.version}
-
-
- org.apache.hadoop
- hadoop-hdfs
- test
- ${hadoop.version}
-
-
-
-
diff --git a/tez-api/src/main/java/org/apache/tez/common/GuavaShim.java b/tez-api/src/main/java/org/apache/tez/common/GuavaShim.java
index 50af86039c..f8bc3e6101 100644
--- a/tez-api/src/main/java/org/apache/tez/common/GuavaShim.java
+++ b/tez-api/src/main/java/org/apache/tez/common/GuavaShim.java
@@ -25,7 +25,14 @@
import com.google.common.util.concurrent.MoreExecutors;
/**
- * A interoperability layer to work with multiple versions of guava.
+ * An interoperability layer to work with multiple versions of guava.
+ *
+ * NOTE TO DEVELOPERS: Reflection is used here to dynamically bind to the available executor
+ * method at runtime. Guava v18.0 deprecated and removed {@code sameThreadExecutor()}, replacing it
+ * with {@code directExecutor()}. By using reflection, Tez can remain safely compatible with both
+ * older and newer versions of Guava provided by the underlying Hadoop environment, without forcing
+ * a strict compile-time dependency on a specific Guava version. Do not replace this with a direct
+ * method call unless the minimum supported Guava version across all environments is >= 18.0.
*/
public final class GuavaShim {
diff --git a/tez-api/src/test/java/org/apache/tez/dag/api/client/TestTimelineReaderFactory.java b/tez-api/src/test/java/org/apache/tez/dag/api/client/TestTimelineReaderFactory.java
index e79950b0bf..806eb2a2fe 100644
--- a/tez-api/src/test/java/org/apache/tez/dag/api/client/TestTimelineReaderFactory.java
+++ b/tez-api/src/test/java/org/apache/tez/dag/api/client/TestTimelineReaderFactory.java
@@ -34,15 +34,15 @@
public class TestTimelineReaderFactory {
- // ensure on hadoop 2.6+ TimelineReaderTokenAuthenticatedStrategy is used.
+ // ensure TimelineReaderTokenAuthenticatedStrategy is used.
@Test(timeout = 5000)
- public void testShouldUseTokenDelegationAuthStrategyForHadoop26() throws TezException {
+ public void testShouldUseTokenDelegationAuthStrategy() throws TezException {
String returnedClassName =
TimelineReaderFactory.getTimelineReaderStrategy(mock(Configuration.class), false, 0)
.getClass()
.getCanonicalName();
- Assert.assertEquals("should use pseudo auth on hadoop2.4",
+ Assert.assertEquals("should use token delegation auth",
"org.apache.tez.dag.api.client.TimelineReaderFactory.TimelineReaderTokenAuthenticatedStrategy",
returnedClassName);
}
diff --git a/tez-dist/pom.xml b/tez-dist/pom.xml
index 08a8077cca..5c7b0a3d12 100644
--- a/tez-dist/pom.xml
+++ b/tez-dist/pom.xml
@@ -58,6 +58,31 @@
${project.version}
provided
+
+ org.apache.tez
+ tez-yarn-timeline-history-with-acls
+ ${project.version}
+
+
+ org.apache.tez
+ tez-yarn-timeline-history-with-fs
+ ${project.version}
+
+
+ org.apache.tez
+ tez-yarn-timeline-cache-plugin
+ ${project.version}
+
+
+ org.apache.tez
+ tez-protobuf-history-plugin
+ ${project.version}
+
+
+ org.apache.tez
+ hadoop-shim
+ ${project.version}
+
@@ -65,62 +90,6 @@
-
- hadoop27
-
- false
-
-
-
- org.apache.tez
- tez-yarn-timeline-history-with-acls
- ${project.version}
-
-
- org.apache.tez
- tez-protobuf-history-plugin
- ${project.version}
-
-
- org.apache.tez
- hadoop-shim-2.7
- ${project.version}
-
-
-
-
- hadoop28
-
- true
-
-
-
- org.apache.tez
- tez-yarn-timeline-history-with-acls
- ${project.version}
-
-
- org.apache.tez
- tez-yarn-timeline-history-with-fs
- ${project.version}
-
-
- org.apache.tez
- tez-yarn-timeline-cache-plugin
- ${project.version}
-
-
- org.apache.tez
- tez-protobuf-history-plugin
- ${project.version}
-
-
- org.apache.tez
- hadoop-shim-2.8
- ${project.version}
-
-
-
docker
diff --git a/tez-plugins/pom.xml b/tez-plugins/pom.xml
index 7001858ddb..88317f810e 100644
--- a/tez-plugins/pom.xml
+++ b/tez-plugins/pom.xml
@@ -29,37 +29,15 @@
tez-plugins
pom
-
-
- hadoop27
-
- false
-
-
- tez-protobuf-history-plugin
- tez-yarn-timeline-history
- tez-yarn-timeline-history-with-acls
- tez-history-parser
- tez-aux-services
-
-
-
- hadoop28
-
- true
-
-
- tez-protobuf-history-plugin
- tez-yarn-timeline-history
- tez-yarn-timeline-history-with-acls
- tez-yarn-timeline-cache-plugin
- tez-yarn-timeline-history-with-fs
- tez-history-parser
- tez-aux-services
-
-
-
-
+
+ tez-protobuf-history-plugin
+ tez-yarn-timeline-history
+ tez-yarn-timeline-history-with-acls
+ tez-yarn-timeline-cache-plugin
+ tez-yarn-timeline-history-with-fs
+ tez-history-parser
+ tez-aux-services
+
diff --git a/tez-plugins/tez-yarn-timeline-history/pom.xml b/tez-plugins/tez-yarn-timeline-history/pom.xml
index 5cd65b35bb..4df23c94f1 100644
--- a/tez-plugins/tez-yarn-timeline-history/pom.xml
+++ b/tez-plugins/tez-yarn-timeline-history/pom.xml
@@ -154,17 +154,4 @@
-
-
- hadoop27
-
-
- org.apache.tez
- tez-yarn-timeline-history
- ${project.version}
-
-
-
-
-
diff --git a/tez-tools/analyzers/pom.xml b/tez-tools/analyzers/pom.xml
index aeda3a4631..cb971f398f 100644
--- a/tez-tools/analyzers/pom.xml
+++ b/tez-tools/analyzers/pom.xml
@@ -29,25 +29,8 @@
tez-perf-analyzer
pom
-
-
- hadoop27
-
- false
-
-
- job-analyzer
-
-
-
- hadoop28
-
- true
-
-
- job-analyzer
-
-
-
+
+ job-analyzer
+