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 2bfaa88
Show file tree
Hide file tree
Showing 126 changed files with 1,019 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.
9 changes: 9 additions & 0 deletions phoenix5-hive/metastore_db/README_DO_NOT_TOUCH_FILES.txt
Original file line number Diff line number Diff line change
@@ -0,0 +1,9 @@

# *************************************************************************
# *** DO NOT TOUCH FILES IN THIS DIRECTORY! ***
# *** FILES IN THIS DIRECTORY AND SUBDIRECTORIES CONSTITUTE A DERBY ***
# *** DATABASE, WHICH INCLUDES THE DATA (USER AND SYSTEM) AND THE ***
# *** FILES NECESSARY FOR DATABASE RECOVERY. ***
# *** EDITING, ADDING, OR DELETING ANY OF THESE FILES MAY CAUSE DATA ***
# *** CORRUPTION AND LEAVE THE DATABASE IN A NON-RECOVERABLE STATE. ***
# *************************************************************************
Binary file added phoenix5-hive/metastore_db/db.lck
Binary file not shown.
Binary file added phoenix5-hive/metastore_db/dbex.lck
Binary file not shown.
8 changes: 8 additions & 0 deletions phoenix5-hive/metastore_db/log/README_DO_NOT_TOUCH_FILES.txt
Original file line number Diff line number Diff line change
@@ -0,0 +1,8 @@

# *************************************************************************
# *** DO NOT TOUCH FILES IN THIS DIRECTORY! ***
# *** FILES IN THIS DIRECTORY ARE USED BY THE DERBY DATABASE RECOVERY ***
# *** SYSTEM. EDITING, ADDING, OR DELETING FILES IN THIS DIRECTORY ***
# *** WILL CAUSE THE DERBY RECOVERY SYSTEM TO FAIL, LEADING TO ***
# *** NON-RECOVERABLE CORRUPT DATABASES. ***
# *************************************************************************
Binary file added phoenix5-hive/metastore_db/log/log.ctrl
Binary file not shown.
Binary file added phoenix5-hive/metastore_db/log/log1.dat
Binary file not shown.
Binary file added phoenix5-hive/metastore_db/log/logmirror.ctrl
Binary file not shown.
8 changes: 8 additions & 0 deletions phoenix5-hive/metastore_db/seg0/README_DO_NOT_TOUCH_FILES.txt
Original file line number Diff line number Diff line change
@@ -0,0 +1,8 @@

# *************************************************************************
# *** DO NOT TOUCH FILES IN THIS DIRECTORY! ***
# *** FILES IN THIS DIRECTORY ARE USED BY THE DERBY DATABASE TO STORE ***
# *** USER AND SYSTEM DATA. EDITING, ADDING, OR DELETING FILES IN THIS ***
# *** DIRECTORY WILL CORRUPT THE ASSOCIATED DERBY DATABASE AND MAKE ***
# *** IT NON-RECOVERABLE. ***
# *************************************************************************
Binary file added phoenix5-hive/metastore_db/seg0/c10.dat
Binary file not shown.
Binary file added phoenix5-hive/metastore_db/seg0/c101.dat
Binary file not shown.
Binary file added phoenix5-hive/metastore_db/seg0/c111.dat
Binary file not shown.
Binary file added phoenix5-hive/metastore_db/seg0/c121.dat
Binary file not shown.
Binary file added phoenix5-hive/metastore_db/seg0/c130.dat
Binary file not shown.
Binary file added phoenix5-hive/metastore_db/seg0/c141.dat
Binary file not shown.
Binary file added phoenix5-hive/metastore_db/seg0/c150.dat
Binary file not shown.
Binary file added phoenix5-hive/metastore_db/seg0/c161.dat
Binary file not shown.
Binary file added phoenix5-hive/metastore_db/seg0/c171.dat
Binary file not shown.
Binary file added phoenix5-hive/metastore_db/seg0/c180.dat
Binary file not shown.
Binary file added phoenix5-hive/metastore_db/seg0/c191.dat
Binary file not shown.
Binary file added phoenix5-hive/metastore_db/seg0/c1a1.dat
Binary file not shown.
Binary file added phoenix5-hive/metastore_db/seg0/c1b1.dat
Binary file not shown.
Binary file added phoenix5-hive/metastore_db/seg0/c1c0.dat
Binary file not shown.
Binary file added phoenix5-hive/metastore_db/seg0/c1d1.dat
Binary file not shown.
Binary file added phoenix5-hive/metastore_db/seg0/c1e0.dat
Binary file not shown.
Binary file added phoenix5-hive/metastore_db/seg0/c1f1.dat
Binary file not shown.
Binary file added phoenix5-hive/metastore_db/seg0/c20.dat
Binary file not shown.
Binary file added phoenix5-hive/metastore_db/seg0/c200.dat
Binary file not shown.
Binary file added phoenix5-hive/metastore_db/seg0/c211.dat
Binary file not shown.
Binary file added phoenix5-hive/metastore_db/seg0/c221.dat
Binary file not shown.
Binary file added phoenix5-hive/metastore_db/seg0/c230.dat
Binary file not shown.
Binary file added phoenix5-hive/metastore_db/seg0/c241.dat
Binary file not shown.
Binary file added phoenix5-hive/metastore_db/seg0/c251.dat
Binary file not shown.
Binary file added phoenix5-hive/metastore_db/seg0/c260.dat
Binary file not shown.
Binary file added phoenix5-hive/metastore_db/seg0/c271.dat
Binary file not shown.
Binary file added phoenix5-hive/metastore_db/seg0/c281.dat
Binary file not shown.
Binary file added phoenix5-hive/metastore_db/seg0/c290.dat
Binary file not shown.
Binary file added phoenix5-hive/metastore_db/seg0/c2a1.dat
Binary file not shown.
Binary file added phoenix5-hive/metastore_db/seg0/c2b1.dat
Binary file not shown.
Binary file added phoenix5-hive/metastore_db/seg0/c2c1.dat
Binary file not shown.
Binary file added phoenix5-hive/metastore_db/seg0/c2d0.dat
Binary file not shown.
Binary file added phoenix5-hive/metastore_db/seg0/c2e1.dat
Binary file not shown.
Binary file added phoenix5-hive/metastore_db/seg0/c2f0.dat
Binary file not shown.
Binary file added phoenix5-hive/metastore_db/seg0/c300.dat
Binary file not shown.
Binary file added phoenix5-hive/metastore_db/seg0/c31.dat
Binary file not shown.
Binary file added phoenix5-hive/metastore_db/seg0/c311.dat
Binary file not shown.
Binary file added phoenix5-hive/metastore_db/seg0/c321.dat
Binary file not shown.
Binary file added phoenix5-hive/metastore_db/seg0/c331.dat
Binary file not shown.
Binary file added phoenix5-hive/metastore_db/seg0/c340.dat
Binary file not shown.
Binary file added phoenix5-hive/metastore_db/seg0/c351.dat
Binary file not shown.
Binary file added phoenix5-hive/metastore_db/seg0/c361.dat
Binary file not shown.
Binary file added phoenix5-hive/metastore_db/seg0/c371.dat
Binary file not shown.
Binary file added phoenix5-hive/metastore_db/seg0/c380.dat
Binary file not shown.
Binary file added phoenix5-hive/metastore_db/seg0/c391.dat
Binary file not shown.
Binary file added phoenix5-hive/metastore_db/seg0/c3a1.dat
Binary file not shown.
Binary file added phoenix5-hive/metastore_db/seg0/c3b1.dat
Binary file not shown.
Binary file added phoenix5-hive/metastore_db/seg0/c3c0.dat
Binary file not shown.
Binary file added phoenix5-hive/metastore_db/seg0/c3d1.dat
Binary file not shown.
Binary file added phoenix5-hive/metastore_db/seg0/c3e1.dat
Binary file not shown.
Binary file added phoenix5-hive/metastore_db/seg0/c3f1.dat
Binary file not shown.
Binary file added phoenix5-hive/metastore_db/seg0/c400.dat
Binary file not shown.
Binary file added phoenix5-hive/metastore_db/seg0/c41.dat
Binary file not shown.
Binary file added phoenix5-hive/metastore_db/seg0/c411.dat
Binary file not shown.
Binary file added phoenix5-hive/metastore_db/seg0/c421.dat
Binary file not shown.
Binary file added phoenix5-hive/metastore_db/seg0/c430.dat
Binary file not shown.
Binary file added phoenix5-hive/metastore_db/seg0/c441.dat
Binary file not shown.
Binary file added phoenix5-hive/metastore_db/seg0/c451.dat
Binary file not shown.
Binary file added phoenix5-hive/metastore_db/seg0/c461.dat
Binary file not shown.
Binary file added phoenix5-hive/metastore_db/seg0/c470.dat
Binary file not shown.
Binary file added phoenix5-hive/metastore_db/seg0/c481.dat
Binary file not shown.
Binary file added phoenix5-hive/metastore_db/seg0/c51.dat
Binary file not shown.
Binary file added phoenix5-hive/metastore_db/seg0/c60.dat
Binary file not shown.
Binary file added phoenix5-hive/metastore_db/seg0/c71.dat
Binary file not shown.
Binary file added phoenix5-hive/metastore_db/seg0/c81.dat
Binary file not shown.
Binary file added phoenix5-hive/metastore_db/seg0/c90.dat
Binary file not shown.
Binary file added phoenix5-hive/metastore_db/seg0/ca1.dat
Binary file not shown.
Binary file added phoenix5-hive/metastore_db/seg0/cb1.dat
Binary file not shown.
Binary file added phoenix5-hive/metastore_db/seg0/cc0.dat
Binary file not shown.
Binary file added phoenix5-hive/metastore_db/seg0/cd1.dat
Binary file not shown.
Binary file added phoenix5-hive/metastore_db/seg0/ce1.dat
Binary file not shown.
Binary file added phoenix5-hive/metastore_db/seg0/cf0.dat
Binary file not shown.
23 changes: 23 additions & 0 deletions phoenix5-hive/metastore_db/service.properties
Original file line number Diff line number Diff line change
@@ -0,0 +1,23 @@
#/home/stoty/workspaces/apache-phoenix/phoenix-connectors/phoenix5-hive/metastore_db
# ********************************************************************
# *** Please do NOT edit this file. ***
# *** CHANGING THE CONTENT OF THIS FILE MAY CAUSE DATA CORRUPTION. ***
# ********************************************************************
#Tue Nov 28 05:54:57 PST 2023
SysschemasIndex2Identifier=225
SyscolumnsIdentifier=144
SysconglomeratesIndex1Identifier=49
SysconglomeratesIdentifier=32
SyscolumnsIndex2Identifier=177
SysschemasIndex1Identifier=209
SysconglomeratesIndex3Identifier=81
SystablesIndex2Identifier=129
SyscolumnsIndex1Identifier=161
derby.serviceProtocol=org.apache.derby.database.Database
SysschemasIdentifier=192
derby.storage.propertiesId=16
SysconglomeratesIndex2Identifier=65
derby.serviceLocale=en_US
SystablesIdentifier=96
SystablesIndex1Identifier=113
#--- last line, don't put anything after this line ---
Loading

0 comments on commit 2bfaa88

Please sign in to comment.