|
59 | 59 | <spotless-maven-plugin.version>3.5.1</spotless-maven-plugin.version> |
60 | 60 |
|
61 | 61 | <kubernetes-client.version>7.7.0</kubernetes-client.version> |
| 62 | + <!-- |
| 63 | + Jackson is bundled and relocated (see maven-shade-plugin), so it is decoupled from the |
| 64 | + Jackson that Hadoop ships. Keep this aligned with the version the kubernetes-client pulls in |
| 65 | + (jackson-datatype-jsr310 / jackson-dataformat-yaml) so the bundled Jackson set is consistent. --> |
| 66 | + <jackson.version>2.21.3</jackson.version> |
62 | 67 | </properties> |
63 | 68 |
|
| 69 | + <dependencyManagement> |
| 70 | + <dependencies> |
| 71 | + <!-- |
| 72 | + Force every Jackson module (databind, core, annotations, jsr310, yaml) to a single |
| 73 | + version. Otherwise Maven mediation pins some modules (e.g. jackson-core) to the old |
| 74 | + version pulled in through Hadoop's (provided) dependency tree, leaving the bundled and |
| 75 | + relocated Jackson set internally inconsistent. --> |
| 76 | + <dependency> |
| 77 | + <groupId>com.fasterxml.jackson</groupId> |
| 78 | + <artifactId>jackson-bom</artifactId> |
| 79 | + <version>${jackson.version}</version> |
| 80 | + <type>pom</type> |
| 81 | + <scope>import</scope> |
| 82 | + </dependency> |
| 83 | + </dependencies> |
| 84 | + </dependencyManagement> |
| 85 | + |
64 | 86 | <dependencies> |
65 | 87 | <dependency> |
66 | 88 | <groupId>org.apache.hadoop</groupId> |
|
80 | 102 | <version>${slf4j.version}</version> |
81 | 103 | <scope>provided</scope> |
82 | 104 | </dependency> |
| 105 | + <!-- |
| 106 | + Bundled (not provided) and relocated via the shade plugin, see the relocations there. |
| 107 | + Pinned to the version used by the fabric8 kubernetes-client so the whole Jackson set |
| 108 | + (databind, core, annotations, jsr310, yaml) stays internally consistent, independent of |
| 109 | + whatever Jackson the target Hadoop ships. --> |
83 | 110 | <dependency> |
84 | 111 | <groupId>com.fasterxml.jackson.core</groupId> |
85 | 112 | <artifactId>jackson-databind</artifactId> |
86 | 113 | <version>${jackson.version}</version> |
87 | | - <scope>provided</scope> |
88 | 114 | </dependency> |
89 | 115 | <!-- Needed by topology-provider --> |
90 | 116 | <dependency> |
|
194 | 220 | <goal>shade</goal> |
195 | 221 | </goals> |
196 | 222 | <phase>package</phase> |
| 223 | + <configuration> |
| 224 | + <relocations> |
| 225 | + <!-- |
| 226 | + Relocate Jackson so the bundled (fabric8 kubernetes-client) Jackson is fully |
| 227 | + self-contained and does not clash with the Jackson that Hadoop ships on its |
| 228 | + classpath. Without this, the NameNode loads Hadoop's old jackson-databind |
| 229 | + (e.g. 2.12.7 on HDFS 3.4.x) while our bundled jackson-datatype-jsr310 expects a |
| 230 | + newer one, causing NoClassDefFoundError (e.g. ToEmptyObjectSerializer). --> |
| 231 | + <relocation> |
| 232 | + <pattern>com.fasterxml.jackson</pattern> |
| 233 | + <shadedPattern>tech.stackable.shaded.com.fasterxml.jackson</shadedPattern> |
| 234 | + </relocation> |
| 235 | + </relocations> |
| 236 | + </configuration> |
197 | 237 | </execution> |
198 | 238 | </executions> |
199 | 239 | </plugin> |
|
286 | 326 | <hadoop.version>3.4.2</hadoop.version> |
287 | 327 | <!-- Taken from https://mvnrepository.com/artifact/org.apache.hadoop/hadoop-common/3.4.2 --> |
288 | 328 | <slf4j.version>1.7.36</slf4j.version> |
289 | | - <jackson.version>2.12.7.1</jackson.version> |
290 | 329 | </properties> |
291 | 330 | </profile> |
292 | 331 | <profile> |
|
295 | 334 | <hadoop.version>3.4.3</hadoop.version> |
296 | 335 | <!-- Taken from https://mvnrepository.com/artifact/org.apache.hadoop/hadoop-common/3.4.3 --> |
297 | 336 | <slf4j.version>1.7.36</slf4j.version> |
298 | | - <jackson.version>2.12.7.1</jackson.version> |
299 | 337 | </properties> |
300 | 338 | </profile> |
301 | 339 | <profile> |
|
304 | 342 | <hadoop.version>3.5.0</hadoop.version> |
305 | 343 | <!-- Taken from https://mvnrepository.com/artifact/org.apache.hadoop/hadoop-common/3.5.0 --> |
306 | 344 | <slf4j.version>1.7.36</slf4j.version> |
307 | | - <jackson.version>2.18.6</jackson.version> |
308 | 345 | </properties> |
309 | 346 | </profile> |
310 | 347 | </profiles> |
|
0 commit comments