|
7 | 7 | import datadog.trace.agent.tooling.InstrumenterModule;
|
8 | 8 | import net.bytebuddy.asm.Advice;
|
9 | 9 | import org.apache.spark.SparkContext;
|
10 |
| -import org.apache.spark.util.Utils; |
11 | 10 |
|
12 | 11 | @AutoService(InstrumenterModule.class)
|
13 | 12 | public class Spark212Instrumentation extends AbstractSparkInstrumentation {
|
@@ -44,24 +43,28 @@ public static class InjectListener {
|
44 | 43 | @Advice.OnMethodEnter(suppress = Throwable.class)
|
45 | 44 | public static void enter(@Advice.This SparkContext sparkContext) {
|
46 | 45 | // checking whether OpenLineage integration is available and that it supports tags
|
47 |
| - if (Utils.classIsLoadable("io.openlineage.spark.agent.OpenLineageSparkListener") |
48 |
| - && Utils.classIsLoadable( |
49 |
| - "io.openlineage.spark.agent.facets.builder.TagsRunFacetBuilder")) { |
50 |
| - if (!sparkContext.conf().contains("spark.extraListeners")) { |
51 |
| - sparkContext |
52 |
| - .conf() |
53 |
| - .set("spark.extraListeners", "io.openlineage.spark.agent.OpenLineageSparkListener"); |
54 |
| - } else { |
55 |
| - String extraListeners = sparkContext.conf().get("spark.extraListeners"); |
56 |
| - if (!extraListeners.contains("io.openlineage.spark.agent.OpenLineageSparkListener")) { |
57 |
| - sparkContext |
58 |
| - .conf() |
59 |
| - .set( |
60 |
| - "spark.extraListeners", |
61 |
| - extraListeners + ",io.openlineage.spark.agent.OpenLineageSparkListener"); |
62 |
| - } |
63 |
| - } |
64 |
| - } |
| 46 | + // Disabling this mechanism for this PR. Will be enabled with provided with Config option. |
| 47 | + // if (Utils.classIsLoadable("io.openlineage.spark.agent.OpenLineageSparkListener") |
| 48 | + // && Utils.classIsLoadable( |
| 49 | + // "io.openlineage.spark.agent.facets.builder.TagsRunFacetBuilder")) { |
| 50 | + // if (!sparkContext.conf().contains("spark.extraListeners")) { |
| 51 | + // sparkContext |
| 52 | + // .conf() |
| 53 | + // .set("spark.extraListeners", |
| 54 | + // "io.openlineage.spark.agent.OpenLineageSparkListener"); |
| 55 | + // } else { |
| 56 | + // String extraListeners = sparkContext.conf().get("spark.extraListeners"); |
| 57 | + // if |
| 58 | + // (!extraListeners.contains("io.openlineage.spark.agent.OpenLineageSparkListener")) { |
| 59 | + // sparkContext |
| 60 | + // .conf() |
| 61 | + // .set( |
| 62 | + // "spark.extraListeners", |
| 63 | + // extraListeners + |
| 64 | + // ",io.openlineage.spark.agent.OpenLineageSparkListener"); |
| 65 | + // } |
| 66 | + // } |
| 67 | + // } |
65 | 68 |
|
66 | 69 | // We want to add the Datadog listener as the first listener
|
67 | 70 | AbstractDatadogSparkListener.listener =
|
|
0 commit comments