Skip to content

Commit

Permalink
PHOENIX-7366 Use Phoenix 5.2 to compile phoenix-connectors
Browse files Browse the repository at this point in the history
also refactor maven project setup
also merge phoenix5-spark3-it back into phoenix5-spark module
  • Loading branch information
stoty committed Jul 23, 2024
1 parent 0ff7a9b commit 3d1f391
Show file tree
Hide file tree
Showing 45 changed files with 971 additions and 975 deletions.
73 changes: 38 additions & 35 deletions phoenix5-hive-shaded/pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -48,16 +48,16 @@
<artifactId>phoenix-hbase-compat-${hbase.compat.version}</artifactId>
<scope>runtime</scope>
</dependency>
<!-- maven-shade-plugin doesn't inherit dependency settings, we must duplicate them to avoid
adding the provided dependencies -->
<!-- maven-shade-plugin doesn't inherit dependency settings, we must
duplicate them to avoid adding the provided dependencies -->
<dependency>
<groupId>org.apache.phoenix</groupId>
<artifactId>phoenix-hbase-compat-${hbase.compat.version}</artifactId>
<scope>runtime</scope>
<optional>true</optional>
</dependency>
<!-- Hive dependencies cannot be specified in the phoenix-hive-common, because of
hbase transitive dependency version conflicts -->
<!-- Hive dependencies cannot be specified in the phoenix-hive-common,
because of hbase transitive dependency version conflicts -->
<dependency>
<groupId>org.apache.hive</groupId>
<artifactId>hive-cli</artifactId>
Expand Down Expand Up @@ -115,11 +115,12 @@
</exclusion>
</exclusions>
</dependency>
<!-- Dependencies below should be the same for Hive, Spark and Spark3 shading config -->
<!-- Phoenix excludes commons-beanutils from the Omid dependency, but that's basically a bug.
We need to add it back, so that we don't depend on hadoop's common-beanutils, which may or
may not be shaded.
This can be removed once we use a Phoenix version that doesn't have this problem -->
<!-- Dependencies below should be the same for Hive, Spark and Spark3
shading config -->
<!-- Phoenix excludes commons-beanutils from the Omid dependency, but
that's basically a bug. We need to add it back, so that we don't depend on
hadoop's common-beanutils, which may or may not be shaded. This can be removed
once we use a Phoenix version that doesn't have this problem -->
<dependency>
<groupId>commons-beanutils</groupId>
<artifactId>commons-beanutils</artifactId>
Expand All @@ -131,10 +132,10 @@
<groupId>org.apache.hadoop</groupId>
<artifactId>hadoop-common</artifactId>
<exclusions>
<exclusion>
<groupId>commons-beanutils</groupId>
<artifactId>commons-beanutils</artifactId>
</exclusion>
<exclusion>
<groupId>commons-beanutils</groupId>
<artifactId>commons-beanutils</artifactId>
</exclusion>
</exclusions>
<scope>provided</scope>
</dependency>
Expand Down Expand Up @@ -291,8 +292,8 @@
<artifactId>protobuf-java</artifactId>
<scope>provided</scope>
</dependency>
<!-- Other dependencies we don't want to shade in, but are not transitively excluded by the
above for some reason -->
<!-- Other dependencies we don't want to shade in, but are not transitively
excluded by the above for some reason -->
<dependency>
<groupId>com.google.guava</groupId>
<artifactId>guava</artifactId>
Expand All @@ -308,7 +309,7 @@
<scope>provided</scope>
</dependency>
</dependencies>

<build>
<plugins>
<plugin>
Expand Down Expand Up @@ -362,26 +363,26 @@
</filters>
<transformers>
<transformer
implementation="org.apache.maven.plugins.shade.resource.ServicesResourceTransformer" />
implementation="org.apache.maven.plugins.shade.resource.ServicesResourceTransformer" />
<transformer
implementation="org.apache.maven.plugins.shade.resource.IncludeResourceTransformer">
implementation="org.apache.maven.plugins.shade.resource.IncludeResourceTransformer">
<resource>csv-bulk-load-config.properties</resource>
<file>
${project.basedir}/../config/csv-bulk-load-config.properties
</file>
</transformer>
<transformer
implementation="org.apache.maven.plugins.shade.resource.IncludeResourceTransformer">
implementation="org.apache.maven.plugins.shade.resource.IncludeResourceTransformer">
<resource>README.md</resource>
<file>${project.basedir}/../README.md</file>
</transformer>
<transformer
implementation="org.apache.maven.plugins.shade.resource.IncludeResourceTransformer">
implementation="org.apache.maven.plugins.shade.resource.IncludeResourceTransformer">
<resource>LICENSE.txt</resource>
<file>${project.basedir}/../LICENSE</file>
</transformer>
<transformer
implementation="org.apache.maven.plugins.shade.resource.IncludeResourceTransformer">
implementation="org.apache.maven.plugins.shade.resource.IncludeResourceTransformer">
<resource>NOTICE</resource>
<file>${project.basedir}/../NOTICE</file>
</transformer>
Expand All @@ -404,24 +405,24 @@
<exclude>org/w3c/dom/**</exclude>
<exclude>org/xml/sax/**</exclude>
<!-- Extras compared to Hadoop -->
<!-- Hbase classes - Maybe these could be shaded as well ? -->
<!-- Hbase classes - Maybe these could be shaded as well
? -->
<exclude>org/apache/hbase/**</exclude>
<!-- We use the spark classpath directly -->
<exclude>org/apache/spark/**</exclude>
<!-- Phoenix classes -->
<exclude>org/apache/phoenix/**</exclude>
<exclude>org/apache/omid/**</exclude>
<!-- Do want/need to expose Tephra as well ? -->
<!-- See PHOENIX-7118
Depending on the Spark classpath we may need to leave this unshaded, relocate
it under org/apache/hadoop/shaded/ or under org/apache/hadoop/hbase/shaded/.
The only thing that is guaranteed not to work is relocating it under
${shaded.package} -->
<!-- See PHOENIX-7118 Depending on the Spark classpath we
may need to leave this unshaded, relocate it under org/apache/hadoop/shaded/
or under org/apache/hadoop/hbase/shaded/. The only thing that is guaranteed
not to work is relocating it under ${shaded.package} -->
<exclude>org/apache/commons/configuration2/**</exclude>
</excludes>
</relocation>
<!-- We cannot use the more elegant shading rules in -client
and -server for com packages, but it SHOULD be equivalent, except for the
<!-- We cannot use the more elegant shading rules in -client
and -server for com packages, but it SHOULD be equivalent, except for the
protobuf change for hbase-shaded-client compatibility -->
<relocation>
<pattern>com/beust/</pattern>
Expand Down Expand Up @@ -451,8 +452,8 @@
<pattern>com/google/inject/</pattern>
<shadedPattern>${shaded.package}.com.google.inject.</shadedPattern>
</relocation>
<!-- This is protobuf 2.5.0 which is shaded to this package in hbase-shaded-client,
not the modified protobuf 3.x from hbase-thirdparty -->
<!-- This is protobuf 2.5.0 which is shaded to this package in
hbase-shaded-client, not the modified protobuf 3.x from hbase-thirdparty -->
<relocation>
<pattern>com/google/protobuf/</pattern>
<shadedPattern>${hbase.shaded.package}.com.google.protobuf.</shadedPattern>
Expand All @@ -478,7 +479,8 @@
<pattern>io/</pattern>
<shadedPattern>${shaded.package}.io.</shadedPattern>
<excludes>
<!-- Exclude config keys for Hadoop that look like package names -->
<!-- Exclude config keys for Hadoop that look like package
names -->
<exclude>io/compression/**</exclude>
<exclude>io/mapfile/**</exclude>
<exclude>io/map/index/*</exclude>
Expand Down Expand Up @@ -522,7 +524,8 @@
<pattern>net/</pattern>
<shadedPattern>${shaded.package}.net.</shadedPattern>
<excludes>
<!-- Exclude config keys for Hadoop that look like package names -->
<!-- Exclude config keys for Hadoop that look like package
names -->
<exclude>net/topology/**</exclude>
</excludes>
</relocation>
Expand Down Expand Up @@ -579,8 +582,8 @@
<artifactId>maven-compiler-plugin</artifactId>
<executions>
<execution>
<id>default-compile</id>
<phase>none</phase>
<id>default-compile</id>
<phase>none</phase>
</execution>
</executions>
</plugin>
Expand Down
Empty file added phoenix5-hive/README.md
Empty file.
Loading

0 comments on commit 3d1f391

Please sign in to comment.