Skip to content

Commit

Permalink
PHOENIX-6940 Add a connector variant for Hive 4
Browse files Browse the repository at this point in the history
also:
partially sync org.apache.phoenix.hive.ql.index classes to Hive 4
rename org.apache.phoenix.hive.ql.index package and classes
remove HiveCompatUtil
merge phoenix5-hive-it back into phoenix5-hive
  • Loading branch information
stoty committed Aug 13, 2024
1 parent 4c880e2 commit 4870ed8
Show file tree
Hide file tree
Showing 98 changed files with 14,889 additions and 309 deletions.
68 changes: 66 additions & 2 deletions phoenix5-connectors-assembly/pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -41,14 +41,34 @@
<groupId>org.apache.phoenix</groupId>
<artifactId>phoenix5-hive</artifactId>
</dependency>
<dependency>
<groupId>org.apache.phoenix</groupId>
<artifactId>phoenix5-hive-shaded</artifactId>
</dependency>
<dependency>
<groupId>org.apache.phoenix</groupId>
<artifactId>phoenix5-hive4</artifactId>
</dependency>
<dependency>
<groupId>org.apache.phoenix</groupId>
<artifactId>phoenix5-hive4-shaded</artifactId>
</dependency>
<dependency>
<groupId>org.apache.phoenix</groupId>
<artifactId>phoenix5-spark</artifactId>
</dependency>
<dependency>
<groupId>org.apache.phoenix</groupId>
<artifactId>phoenix5-spark-shaded</artifactId>
</dependency>
<dependency>
<groupId>org.apache.phoenix</groupId>
<artifactId>phoenix5-spark3</artifactId>
</dependency>
<dependency>
<groupId>org.apache.phoenix</groupId>
<artifactId>phoenix5-spark3-shaded</artifactId>
</dependency>
</dependencies>

<build>
Expand All @@ -58,7 +78,7 @@
<groupId>org.codehaus.mojo</groupId>
<executions>
<execution>
<id>hive without version</id>
<id>hive3 without version</id>
<phase>package</phase>
<goals>
<goal>exec</goal>
Expand All @@ -78,7 +98,7 @@
</configuration>
</execution>
<execution>
<id>hive-shaded without version</id>
<id>hive3-shaded without version</id>
<phase>package</phase>
<goals>
<goal>exec</goal>
Expand All @@ -97,6 +117,46 @@
</arguments>
</configuration>
</execution>
<execution>
<id>hive4 without version</id>
<phase>package</phase>
<goals>
<goal>exec</goal>
</goals>
<configuration>
<executable>ln</executable>
<workingDirectory>${project.basedir}/../phoenix5-hive4/target</workingDirectory>
<arguments>
<argument>-fnsv</argument>
<argument>
phoenix5-hive4-${project.version}.jar
</argument>
<argument>
phoenix5-hive4.jar
</argument>
</arguments>
</configuration>
</execution>
<execution>
<id>hive4-shaded without version</id>
<phase>package</phase>
<goals>
<goal>exec</goal>
</goals>
<configuration>
<executable>ln</executable>
<workingDirectory>${project.basedir}/../phoenix5-hive4-shaded/target</workingDirectory>
<arguments>
<argument>-fnsv</argument>
<argument>
phoenix5-hive4-shaded-${project.version}.jar
</argument>
<argument>
phoenix5-hive4-shaded.jar
</argument>
</arguments>
</configuration>
</execution>
<execution>
<id>spark without version</id>
<phase>package</phase>
Expand Down Expand Up @@ -228,6 +288,10 @@
<groupId>org.apache.phoenix</groupId>
<artifactId>phoenix5-hive-shaded</artifactId>
</dependency>
<dependency>
<groupId>org.apache.phoenix</groupId>
<artifactId>phoenix5-hive4-shaded</artifactId>
</dependency>
<dependency>
<groupId>org.apache.phoenix</groupId>
<artifactId>phoenix5-spark-shaded</artifactId>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -45,5 +45,13 @@
<include>phoenix5-hive.jar</include>
</includes>
</fileSet>
<fileSet>
<directory>${project.basedir}/../phoenix5-hive4/target</directory>
<outputDirectory>/</outputDirectory>
<includes>
<include>phoenix5-hive4-${project.version}.jar</include>
<include>phoenix5-hive4.jar</include>
</includes>
</fileSet>
</fileSets>
</component>
Original file line number Diff line number Diff line change
Expand Up @@ -45,5 +45,13 @@
<include>phoenix5-hive-shaded.jar</include>
</includes>
</fileSet>
<fileSet>
<directory>${project.basedir}/../phoenix5-hive4-shaded/target</directory>
<outputDirectory>/</outputDirectory>
<includes>
<include>phoenix5-hive4-shaded-${project.version}.jar</include>
<include>phoenix5-hive4-shaded.jar</include>
</includes>
</fileSet>
</fileSets>
</component>
260 changes: 260 additions & 0 deletions phoenix5-hive-shaded/dependency-reduced-pom.xml
Original file line number Diff line number Diff line change
@@ -0,0 +1,260 @@
<?xml version="1.0" encoding="UTF-8"?>
<project xmlns="http://maven.apache.org/POM/4.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/maven-v4_0_0.xsd">
<parent>
<artifactId>phoenix-connectors</artifactId>
<groupId>org.apache.phoenix</groupId>
<version>6.0.0-SNAPSHOT</version>
</parent>
<modelVersion>4.0.0</modelVersion>
<artifactId>phoenix5-hive-shaded</artifactId>
<name>Shaded Phoenix Hive Connector for Phoenix 5</name>
<build>
<plugins>
<plugin>
<artifactId>maven-shade-plugin</artifactId>
<executions>
<execution>
<phase>package</phase>
<goals>
<goal>shade</goal>
</goals>
</execution>
</executions>
<configuration>
<shadedArtifactAttached>false</shadedArtifactAttached>
<promoteTransitiveDependencies>true</promoteTransitiveDependencies>
<filters>
<filter>
<artifact>*:*</artifact>
<excludes>
<exclude>META-INF/*.SF</exclude>
<exclude>META-INF/*.DSA</exclude>
<exclude>META-INF/*.RSA</exclude>
<exclude>META-INF/license/*</exclude>
<exclude>META-INF/NOTICE</exclude>
<exclude>LICENSE.*</exclude>
<exclude>NOTICE.*</exclude>
<exclude>NOTICE</exclude>
<exclude>README*</exclude>
<exclude>log4j.properties</exclude>
</excludes>
</filter>
<filter>
<artifact>org.apache.hadoop:hadoop-yarn-common</artifact>
<excludes>
<exclude>org/apache/hadoop/yarn/factories/package-info.class</exclude>
<exclude>org/apache/hadoop/yarn/util/package-info.class</exclude>
<exclude>org/apache/hadoop/yarn/factory/providers/package-info.class</exclude>
<exclude>org/apache/hadoop/yarn/client/api/impl/package-info.class</exclude>
<exclude>org/apache/hadoop/yarn/client/api/package-info.class</exclude>
<exclude>webapps/**</exclude>
</excludes>
</filter>
<filter>
<artifact>org.apache.commons:commons-math3</artifact>
<excludes>
<exclude>assets/**</exclude>
</excludes>
</filter>
<filter>
<artifact>org.apache.hbase:hbase-server</artifact>
<excludes>
<exclude>hbase-webapps/**</exclude>
</excludes>
</filter>
</filters>
<transformers>
<transformer />
<transformer>
<resource>csv-bulk-load-config.properties</resource>
<file>${project.basedir}/../config/csv-bulk-load-config.properties</file>
</transformer>
<transformer>
<resource>README.md</resource>
<file>${project.basedir}/../README.md</file>
</transformer>
<transformer>
<resource>LICENSE.txt</resource>
<file>${project.basedir}/../LICENSE</file>
</transformer>
<transformer>
<resource>NOTICE</resource>
<file>${project.basedir}/../NOTICE</file>
</transformer>
</transformers>
<relocations>
<relocation>
<pattern>org/</pattern>
<shadedPattern>${shaded.package}.org.</shadedPattern>
<excludes>
<exclude>org/apache/hadoop/**</exclude>
<exclude>org/apache/htrace/**</exclude>
<exclude>org/slf4j/**</exclude>
<exclude>org/apache/commons/logging/**</exclude>
<exclude>org/apache/log4j/**</exclude>
<exclude>org/ietf/jgss/**</exclude>
<exclude>org/omg/**</exclude>
<exclude>org/w3c/dom/**</exclude>
<exclude>org/xml/sax/**</exclude>
<exclude>org/apache/hbase/**</exclude>
<exclude>org/apache/spark/**</exclude>
<exclude>org/apache/phoenix/**</exclude>
<exclude>org/apache/omid/**</exclude>
<exclude>org/apache/commons/configuration2/**</exclude>
</excludes>
</relocation>
<relocation>
<pattern>com/beust/</pattern>
<shadedPattern>${shaded.package}.com.beust.</shadedPattern>
</relocation>
<relocation>
<pattern>com/clearspring/</pattern>
<shadedPattern>${shaded.package}.com.clearspring.</shadedPattern>
</relocation>
<relocation>
<pattern>com/codahale/</pattern>
<shadedPattern>${shaded.package}.come.codahale.</shadedPattern>
</relocation>
<relocation>
<pattern>com/fasterxml/</pattern>
<shadedPattern>${shaded.package}.com.fasterxml.</shadedPattern>
</relocation>
<relocation>
<pattern>com/force/</pattern>
<shadedPattern>${shaded.package}.com.force.</shadedPattern>
</relocation>
<relocation>
<pattern>com/google/gson/</pattern>
<shadedPattern>${shaded.package}.com.google.gson.</shadedPattern>
</relocation>
<relocation>
<pattern>com/google/inject/</pattern>
<shadedPattern>${shaded.package}.com.google.inject.</shadedPattern>
</relocation>
<relocation>
<pattern>com/google/protobuf/</pattern>
<shadedPattern>${hbase.shaded.package}.com.google.protobuf.</shadedPattern>
</relocation>
<relocation>
<pattern>com/ibm/</pattern>
<shadedPattern>${shaded.package}.com.ibm.</shadedPattern>
</relocation>
<relocation>
<pattern>com/lmax/</pattern>
<shadedPattern>${shaded.package}.com.lmax.</shadedPattern>
</relocation>
<relocation>
<pattern>com/sun/jna/</pattern>
<shadedPattern>${shaded.package}.com.sun.jna.</shadedPattern>
</relocation>
<relocation>
<pattern>com/squareup</pattern>
<shadedPattern>${shaded.package}.com.squareup.</shadedPattern>
</relocation>
<relocation>
<pattern>io/</pattern>
<shadedPattern>${shaded.package}.io.</shadedPattern>
<excludes>
<exclude>io/compression/**</exclude>
<exclude>io/mapfile/**</exclude>
<exclude>io/map/index/*</exclude>
<exclude>io/seqfile/**</exclude>
<exclude>io/file/buffer/size</exclude>
<exclude>io/skip/checksum/errors</exclude>
<exclude>io/sort/*</exclude>
<exclude>io/serializations</exclude>
</excludes>
</relocation>
<relocation>
<pattern>javax/el/</pattern>
<shadedPattern>${shaded.package}.javax.el.</shadedPattern>
</relocation>
<relocation>
<pattern>javax/cache/</pattern>
<shadedPattern>${shaded.package}.javax.cache.</shadedPattern>
</relocation>
<relocation>
<pattern>javax/servlet/</pattern>
<shadedPattern>${shaded.package}.javax.servlet.</shadedPattern>
</relocation>
<relocation>
<pattern>javax/ws/</pattern>
<shadedPattern>${shaded.package}.javax.ws.</shadedPattern>
</relocation>
<relocation>
<pattern>javax/annotation/</pattern>
<shadedPattern>${shaded.package}.javax.annotation.</shadedPattern>
</relocation>
<relocation>
<pattern>javax/inject/</pattern>
<shadedPattern>${shaded.package}.javax.inject.</shadedPattern>
</relocation>
<relocation>
<pattern>javax/validation/</pattern>
<shadedPattern>${shaded.package}.javax.validation.</shadedPattern>
</relocation>
<relocation>
<pattern>net/</pattern>
<shadedPattern>${shaded.package}.net.</shadedPattern>
<excludes>
<exclude>net/topology/**</exclude>
</excludes>
</relocation>
<relocation>
<pattern>okio/</pattern>
<shadedPattern>${shaded.package}.okio.</shadedPattern>
</relocation>
<relocation>
<pattern>co/</pattern>
<shadedPattern>${shaded.package}.co.</shadedPattern>
</relocation>
<relocation>
<pattern>it/</pattern>
<shadedPattern>${shaded.package}.it.</shadedPattern>
</relocation>
<relocation>
<pattern>javassist/</pattern>
<shadedPattern>${shaded.package}.javassist.</shadedPattern>
</relocation>
<relocation>
<pattern>jersey/</pattern>
<shadedPattern>${shaded.package}.jersey.</shadedPattern>
</relocation>
<relocation>
<pattern>jline/</pattern>
<shadedPattern>${shaded.package}.jline.</shadedPattern>
</relocation>
<relocation>
<pattern>mozilla/</pattern>
<shadedPattern>${shaded.package}.mozilla.</shadedPattern>
</relocation>
<relocation>
<pattern>tables/</pattern>
<shadedPattern>${shaded.package}.tables.</shadedPattern>
</relocation>
</relocations>
</configuration>
</plugin>
<plugin>
<artifactId>maven-compiler-plugin</artifactId>
<executions>
<execution>
<id>default-compile</id>
<phase>none</phase>
</execution>
</executions>
</plugin>
<plugin>
<artifactId>maven-dependency-plugin</artifactId>
<configuration>
<skip>true</skip>
</configuration>
</plugin>
</plugins>
</build>
<properties>
<hive.version>${hive3.version}</hive.version>
<test.tmp.dir>${project.build.directory}/tmp</test.tmp.dir>
<top.dir>${project.basedir}/..</top.dir>
</properties>
</project>
Loading

0 comments on commit 4870ed8

Please sign in to comment.