yihua commented on code in PR #618:
URL: https://github.com/apache/incubator-xtable/pull/618#discussion_r1913926861


##########
xtable-hudi/pom.xml:
##########
@@ -0,0 +1,277 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!--
+  ~ Licensed to the Apache Software Foundation (ASF) under one or more
+  ~ contributor license agreements.  See the NOTICE file distributed with
+  ~ this work for additional information regarding copyright ownership.
+  ~ The ASF licenses this file to You under the Apache License, Version 2.0
+  ~ (the "License"); you may not use this file except in compliance with
+  ~ the License.  You may obtain a copy of the License at
+  ~
+  ~     http://www.apache.org/licenses/LICENSE-2.0
+  ~
+  ~ Unless required by applicable law or agreed to in writing, software
+  ~ distributed under the License is distributed on an "AS IS" BASIS,
+  ~ WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+  ~ See the License for the specific language governing permissions and
+  ~ limitations under the License.
+-->
+<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/xsd/maven-4.0.0.xsd";>
+    <modelVersion>4.0.0</modelVersion>
+    <parent>
+        <groupId>org.apache.xtable</groupId>
+        <artifactId>xtable</artifactId>
+        <version>0.2.0-SNAPSHOT</version>
+    </parent>
+
+    <artifactId>xtable-hudi</artifactId>
+    <name>XTable Project Hudi</name>
+
+    <dependencies>
+        <dependency>
+            <groupId>org.apache.xtable</groupId>
+            <artifactId>xtable-api</artifactId>
+            <version>${project.version}</version>
+            <scope>provided</scope>
+        </dependency>
+        <dependency>
+            <groupId>org.apache.xtable</groupId>
+            <artifactId>xtable-core_${scala.binary.version}</artifactId>
+            <version>${project.version}</version>
+            <scope>provided</scope>
+        </dependency>
+        <dependency>
+            <groupId>org.apache.xtable</groupId>
+            <artifactId>xtable-hudi-support-utils</artifactId>
+            <version>${project.version}</version>
+        </dependency>
+
+        <dependency>
+            <groupId>com.google.guava</groupId>
+            <artifactId>guava</artifactId>
+        </dependency>
+
+        <!-- Avro -->
+        <dependency>
+            <groupId>org.apache.avro</groupId>
+            <artifactId>avro</artifactId>
+        </dependency>
+
+        <!-- Parquet -->
+        <dependency>
+            <groupId>org.apache.parquet</groupId>
+            <artifactId>parquet-column</artifactId>
+        </dependency>
+        <dependency>
+            <groupId>org.apache.parquet</groupId>
+            <artifactId>parquet-avro</artifactId>
+        </dependency>
+        <dependency>
+            <groupId>org.apache.parquet</groupId>
+            <artifactId>parquet-hadoop</artifactId>
+        </dependency>
+
+        <!-- Hudi dependencies -->
+        <dependency>
+            <groupId>org.apache.hudi</groupId>
+            
<artifactId>hudi-spark${spark.version.prefix}-bundle_${scala.binary.version}</artifactId>
+            <scope>test</scope>
+        </dependency>
+        <dependency>
+            <groupId>org.apache.hudi</groupId>
+            <artifactId>hudi-java-client</artifactId>
+        </dependency>
+
+        <!-- Hadoop dependencies -->
+        <dependency>
+            <groupId>org.apache.hadoop</groupId>
+            <artifactId>hadoop-common</artifactId>
+            <scope>provided</scope>
+        </dependency>
+
+        <!-- Logging API -->
+        <dependency>
+            <groupId>org.apache.logging.log4j</groupId>
+            <artifactId>log4j-api</artifactId>
+        </dependency>
+
+        <!-- Hudi dependencies for reading/writing tables -->
+        <dependency>
+            <groupId>org.apache.spark</groupId>
+            <artifactId>spark-core_${scala.binary.version}</artifactId>
+            <scope>provided</scope>
+        </dependency>
+        <dependency>
+            <groupId>org.apache.spark</groupId>
+            <artifactId>spark-sql_${scala.binary.version}</artifactId>
+            <scope>provided</scope>
+        </dependency>
+
+        <!-- Mockito -->
+        <dependency>
+            <groupId>org.mockito</groupId>
+            <artifactId>mockito-core</artifactId>
+            <scope>test</scope>
+        </dependency>
+
+        <!-- Junit -->
+        <dependency>
+            <groupId>org.junit.jupiter</groupId>
+            <artifactId>junit-jupiter-api</artifactId>
+            <scope>test</scope>
+        </dependency>
+        <dependency>
+            <groupId>org.junit.jupiter</groupId>
+            <artifactId>junit-jupiter-params</artifactId>
+            <scope>test</scope>
+        </dependency>
+        <dependency>
+            <groupId>org.junit.jupiter</groupId>
+            <artifactId>junit-jupiter-engine</artifactId>
+            <scope>test</scope>
+        </dependency>
+
+        <!-- Test logging -->
+        <dependency>
+            <groupId>org.apache.logging.log4j</groupId>
+            <artifactId>log4j-core</artifactId>
+            <scope>test</scope>
+        </dependency>
+        <dependency>
+            <groupId>org.apache.logging.log4j</groupId>
+            <artifactId>log4j-slf4j2-impl</artifactId>
+            <scope>test</scope>
+        </dependency>
+
+        <dependency>
+            <groupId>org.apache.commons</groupId>
+            <artifactId>commons-lang3</artifactId>
+            <scope>test</scope>
+        </dependency>
+
+        <dependency>
+            <groupId>org.apache.xtable</groupId>
+            <artifactId>xtable-core_${scala.binary.version}</artifactId>
+            <version>${project.version}</version>
+            <classifier>tests</classifier>
+            <type>test-jar</type>
+            <scope>test</scope>
+        </dependency>
+    </dependencies>
+
+    <build>
+        <plugins>
+            <plugin>
+                <groupId>org.apache.maven.plugins</groupId>
+                <artifactId>maven-jar-plugin</artifactId>
+                <executions>
+                    <execution>
+                        <goals>
+                            <goal>test-jar</goal>
+                        </goals>
+                    </execution>
+                </executions>
+            </plugin>
+            <plugin>
+                <groupId>org.apache.maven.plugins</groupId>
+                <artifactId>maven-shade-plugin</artifactId>
+                <executions>
+                    <execution>
+                        <phase>package</phase>
+                        <goals>
+                            <goal>shade</goal>
+                        </goals>
+                        <configuration>
+                            <createSourcesJar>true</createSourcesJar>
+                            <transformers>
+                                <transformer 
implementation="org.apache.maven.plugins.shade.resource.ApacheLicenseResourceTransformer">
 </transformer>
+                                <transformer 
implementation="org.apache.maven.plugins.shade.resource.DontIncludeResourceTransformer">
+                                    <resources>
+                                        <resource>LICENSE</resource>
+                                        <resource>NOTICE</resource>
+                                        <resource>NOTICE.txt</resource>
+                                    </resources>
+                                </transformer>
+                                <transformer 
implementation="org.apache.maven.plugins.shade.resource.IncludeResourceTransformer">
+                                    <resource>META-INF/LICENSE</resource>
+                                    
<file>target/classes/META-INF/LICENSE</file>
+                                </transformer>
+                                <transformer 
implementation="org.apache.maven.plugins.shade.resource.IncludeResourceTransformer">
+                                    <resource>META-INF/NOTICE</resource>
+                                    <file>target/classes/META-INF/NOTICE</file>
+                                </transformer>
+                            </transformers>
+                            <artifactSet>
+                                <includes combine.children="append">
+                                    
<include>org.apache.xtable:xtable-hudi-support-utils</include>
+                                    
<include>com.fasterxml.jackson.core:jackson-databind</include>
+                                    
<include>com.fasterxml.jackson.datatype:jackson-datatype-jsr310</include>
+                                    
<include>com.fasterxml.jackson.core:jackson-core</include>
+                                    
<include>com.fasterxml.jackson.core:jackson-annotations</include>
+                                    
<include>org.apache.parquet:parquet-column</include>
+                                    
<include>org.apache.parquet:parquet-avro</include>
+                                    
<include>org.apache.parquet:parquet-common</include>
+                                    
<include>org.apache.parquet:parquet-encoding</include>
+                                    
<include>org.apache.parquet:parquet-hadoop</include>
+                                    
<include>org.apache.parquet:parquet-format-structures</include>
+                                    
<include>org.apache.hudi:hudi-java-client</include>
+                                    
<include>org.apache.hudi:hudi-client-common</include>
+                                    
<include>org.apache.hudi:hudi-common</include>
+                                    <include>org.apache.avro:avro</include>
+                                    <include>com.google.guava:guava</include>
+                                    <!-- hbase -->
+                                    
<include>org.apache.hbase:hbase-client</include>
+                                    
<include>org.apache.hbase:hbase-common</include>
+                                    
<include>org.apache.hbase:hbase-hadoop-compat</include>
+                                    
<include>org.apache.hbase:hbase-metrics</include>
+                                    
<include>org.apache.hbase:hbase-metrics-api</include>
+                                    
<include>org.apache.hbase:hbase-protocol</include>
+                                    
<include>org.apache.hbase:hbase-protocol-shaded</include>
+                                    
<include>org.apache.hbase:hbase-server</include>
+                                    
<include>org.apache.hbase.thirdparty:hbase-shaded-miscellaneous</include>
+                                    
<include>org.apache.hbase.thirdparty:hbase-shaded-netty</include>
+                                    
<include>org.apache.hbase.thirdparty:hbase-shaded-protobuf</include>
+                                </includes>
+                            </artifactSet>
+                            <relocations combine.children="append">
+                                <relocation>
+                                    <pattern>org.apache.parquet.</pattern>
+                                    
<shadedPattern>org.apache.xtable.shade.org.apache.parquet.</shadedPattern>
+                                </relocation>
+                                <relocation>
+                                    <pattern>org.apache.hudi.</pattern>
+                                    
<shadedPattern>org.apache.xtable.shade.org.apache.hudi.</shadedPattern>
+                                    <excludes>
+                                        
<exclude>org.apache.hudi.io.storage.HoodieHBaseKVComparator</exclude>
+                                    </excludes>

Review Comment:
   One way to validate the conjecture above is to remove this exclusion to see 
if the test passes or a different error is thrown (by removing the exclusion, 
there should be no clash any more, and the 
`org.apache.xtable.shade.org.apache.hudi.io.storage.HoodieHBaseKVComparator` is 
written as the comparator in the HFile if the test table is prepared using the 
XTable bundle).  Still, we need to figure out how to properly handle 
`org.apache.hudi.io.storage.HoodieHBaseKVComparator` as the comparator class 
since the fully-qualified class name needs to be preserved for reading HFile 
format in Hudi.



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

Reply via email to