yihua commented on code in PR #7224:
URL: https://github.com/apache/hudi/pull/7224#discussion_r1025919448


##########
packaging/hudi-cli-bundle/hudi-cli-bundle.sh:
##########
@@ -0,0 +1,30 @@
+#!/usr/bin/env bash

Review Comment:
   should the file name be `hudi-cli.sh` or `start-hudi-cli.sh` to be readable?



##########
packaging/hudi-cli-bundle/pom.xml:
##########
@@ -0,0 +1,646 @@
+<?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";>
+    <parent>
+        <artifactId>hudi</artifactId>
+        <groupId>org.apache.hudi</groupId>
+        <version>0.13.0-SNAPSHOT</version>
+        <relativePath>../../pom.xml</relativePath>
+    </parent>
+    <modelVersion>4.0.0</modelVersion>
+    <artifactId>hudi-cli-bundle</artifactId>
+    <packaging>jar</packaging>
+
+    <properties>
+        <checkstyle.skip>true</checkstyle.skip>
+        <main.basedir>${project.parent.basedir}</main.basedir>
+        <skipTests>true</skipTests>
+        <javax.servlet.version>3.1.0</javax.servlet.version>
+    </properties>
+
+    <build>
+        <plugins>
+            <plugin>
+                <groupId>org.apache.rat</groupId>
+                <artifactId>apache-rat-plugin</artifactId>
+            </plugin>
+            <plugin>
+                <groupId>org.apache.maven.plugins</groupId>
+                <artifactId>maven-shade-plugin</artifactId>
+                <version>${maven-shade-plugin.version}</version>
+                <executions>
+                    <execution>
+                        <phase>package</phase>
+                        <goals>
+                            <goal>shade</goal>
+                        </goals>
+                        <configuration>
+                            
<createSourcesJar>${shadeSources}</createSourcesJar>
+                            
<dependencyReducedPomLocation>${project.build.directory}/dependency-reduced-pom.xml
+                            </dependencyReducedPomLocation>
+                            <transformers>
+                                <transformer 
implementation="org.apache.maven.plugins.shade.resource.ApacheLicenseResourceTransformer"
 />
+                                <transformer 
implementation="org.apache.maven.plugins.shade.resource.ApacheNoticeResourceTransformer">
+                                    <addHeader>true</addHeader>
+                                </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.AppendingTransformer">
+                                    
<resource>META-INF/services/org.apache.spark.sql.sources.DataSourceRegister</resource>
+                                </transformer>
+                                <transformer 
implementation="org.apache.maven.plugins.shade.resource.AppendingTransformer">
+                                    
<resource>META-INF/spring.handlers</resource>
+                                </transformer>
+                                <transformer 
implementation="org.apache.maven.plugins.shade.resource.AppendingTransformer">
+                                    
<resource>META-INF/spring.schemas</resource>
+                                </transformer>
+                                <transformer 
implementation="org.apache.maven.plugins.shade.resource.AppendingTransformer">
+                                    
<resource>META-INF/spring.factories</resource>
+                                </transformer>
+                                <transformer 
implementation="org.apache.maven.plugins.shade.resource.ServicesResourceTransformer"/>
+                                <transformer 
implementation="org.apache.maven.plugins.shade.resource.ManifestResourceTransformer">
+                                    
<mainClass>org.apache.hudi.cli.Main</mainClass>
+                                </transformer>
+                                <transformer 
implementation="org.apache.maven.plugins.shade.resource.AppendingTransformer">
+                                    
<resource>META-INF/spring/org.springframework.boot.actuate.autoconfigure.web.ManagementContextConfiguration.imports</resource>
+                                </transformer>
+                                <transformer 
implementation="org.apache.maven.plugins.shade.resource.AppendingTransformer">
+                                    
<resource>META-INF/spring/org.springframework.boot.autoconfigure.AutoConfiguration.imports</resource>
+                                </transformer>
+                            </transformers>
+                            <artifactSet>
+                                <includes combine.children="append">
+                                    
<include>org.apache.hudi:hudi-common</include>
+                                    <include>org.apache.hudi:hudi-cli</include>
+                                    
<include>org.apache.hudi:hudi-client-common</include>
+                                    
<include>org.apache.hudi:hudi-spark-client</include>
+                                    
<include>org.apache.hudi:hudi-spark-common_${scala.binary.version}</include>
+                                    
<include>org.apache.hudi:hudi-spark_${scala.binary.version}</include>
+                                    
<include>org.apache.hudi:${hudi.spark.module}_${scala.binary.version}</include>
+                                    
<include>org.apache.hudi:${hudi.spark.common.modules.1}</include>
+                                    
<include>org.apache.hudi:${hudi.spark.common.modules.2}</include>

Review Comment:
   Could we separate hudi-spark-related modules out so that the hudi-cli-bundle 
does not rely on Spark and Scala versions?  Right now, this can change if 
different Spark and Scala versions are different, and we need to provide 
different flavors of hudi-cli-bundles, which can be hard to maintain.
   
   If we separate out the Hudi Spark related modules, we can ask the use to the 
hudi-cli-bundle with the hudi-spark-bundle corresponding to the Spark version 
used.



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