gortiz commented on code in PR #19448:
URL: https://github.com/apache/pinot/pull/19448#discussion_r4642018587


##########
pom.xml:
##########
@@ -1749,6 +1867,49 @@
         <version>${wire.version}</version>
       </dependency>
 
+      <!-- Patched third-party jars, see pinot-dependency-patches/pom.xml -->
+      <dependency>
+        <groupId>org.apache.pinot</groupId>
+        <artifactId>pinot-patched-third-party-jackson-core</artifactId>
+        <version>${project.version}</version>

Review Comment:
   Good catch, thanks. Fixed in 1398544ddd: the six `pinot-patched-*` entries 
now live in `pinot-bom/pom.xml` and the root copies are gone. I checked it with 
a downstream project that inherits the root pom at `2.0.0-SNAPSHOT` and imports 
`pinot-bom:1.7.0-SNAPSHOT`. The patches now resolve to `1.7.0-SNAPSHOT`, the 
same as `pinot-s3`.
   



##########
pinot-plugins/pinot-batch-ingestion/pinot-batch-ingestion-spark-3/pom.xml:
##########
@@ -32,7 +32,14 @@
   <url>https://pinot.apache.org/</url>
   <properties>
     <pinot.root>${basedir}/../../..</pinot.root>
+    <!-- This jar runs inside a JVM Pinot does not control, so it relocates 
its libraries in every
+         build mode, including thin-plugins. See shade.jackson.prefix in the 
root pom. -->
+    
<shade.jackson.prefix>${shade.prefix}.com.fasterxml.jackson</shade.jackson.prefix>
+    <shade.guava.prefix>${shade.prefix}.com.google.common</shade.guava.prefix>
+    <shade.scala.prefix>${shade.prefix}.org.scala-lang</shade.scala.prefix>

Review Comment:
   You are right, and it is a bit wider than the `JsonUtils` call. I scanned 
the bytecode of the Spark fat jar against the thin `pinot-all`. There are three 
broken references, all in `SegmentGenerationTaskRunner`: the two `JsonUtils` 
methods and `Preconditions.checkState`. The fat jar does not bundle Guava, so 
it relies on `pinot-all` for the relocated copy. The Hadoop fat jar has the 
same problem with 94 references, most of them from the Hadoop classes it embeds.
   
   The root issue is that everything on the Spark or Hadoop classpath (core, 
the ingestion bundle and the input format plugins) must share one relocation 
scheme, and the thin layout breaks that. Bundling Jackson and Guava into the 
ingestion jar is not enough, because `JsonUtils` and the segment creation code 
still come from `pinot-all`. A coherent bundle would end up as a relocated copy 
of `pinot-all` plus the plugins. On top of that, the thin `pinot-all` would put 
an unrelocated Jackson ahead of Spark's own copy.
   
   So for this PR I will keep the scope narrow: Spark and Hadoop ingestion are 
not supported from a `thin-plugins` distribution for now. I will make the 
launch commands fail with a clear message when they run from the thin layout, 
and document it in the PR description. The default build does not change, so 
the existing Spark and Hadoop flows keep working. A proper external ingestion 
bundle for the thin layout can come as a follow-up.
   



-- 
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]

Reply via email to