KurtYoung commented on a change in pull request #8205: [FLINK-12238] 
[TABLE/SQL] Support database related operations in GenericHiveMetastoreCatalog 
and setup flink-connector-hive module
URL: https://github.com/apache/flink/pull/8205#discussion_r277157140
 
 

 ##########
 File path: flink-connectors/flink-connector-hive/pom.xml
 ##########
 @@ -0,0 +1,360 @@
+<?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.flink</groupId>
+               <artifactId>flink-connectors</artifactId>
+               <version>1.9-SNAPSHOT</version>
+               <relativePath>..</relativePath>
+       </parent>
+
+       <artifactId>flink-connector-hive_${scala.binary.version}</artifactId>
+       <name>flink-connector-hive</name>
+
+       <packaging>jar</packaging>
+
+       <properties>
+               <hive.version>2.3.4</hive.version>
+       </properties>
+
+       <dependencies>
+
+               <!-- core dependencies -->
+
+               <dependency>
+                       <groupId>org.apache.flink</groupId>
+                       <artifactId>flink-table-common</artifactId>
+                       <version>${project.version}</version>
+                       <scope>provided</scope>
+               </dependency>
+
+               <dependency>
+                       <groupId>org.apache.flink</groupId>
+                       <artifactId>flink-table-api-java</artifactId>
+                       <version>${project.version}</version>
+                       <scope>provided</scope>
+               </dependency>
+
+               <!-- hadoop dependency -->
+               <!-- Hive 2.3.4 depends on hadoop-common 2.7.2 for its crypto 
classes -->
+
+               <dependency>
+                       <groupId>org.apache.hadoop</groupId>
+                       <artifactId>hadoop-common</artifactId>
+                       <version>2.7.2</version>
+                       <exclusions>
+                               <exclusion>
+                                       
<groupId>com.google.code.findbugs</groupId>
+                                       <artifactId>jsr305</artifactId>
+                               </exclusion>
+                               <exclusion>
+                                       <groupId>com.google.guava</groupId>
+                                       <artifactId>guava</artifactId>
+                               </exclusion>
+                               <exclusion>
+                                       <groupId>com.google.protobuf</groupId>
+                                       <artifactId>protobuf-java</artifactId>
+                               </exclusion>
+                               <exclusion>
+                                       <groupId>com.sun.jersey</groupId>
+                                       <artifactId>jersey-core</artifactId>
+                               </exclusion>
+                               <exclusion>
+                                       <groupId>com.sun.jersey</groupId>
+                                       <artifactId>jersey-json</artifactId>
+                               </exclusion>
+                               <exclusion>
+                                       <groupId>com.sun.jersey</groupId>
+                                       <artifactId>jersey-server</artifactId>
+                               </exclusion>
+                               <exclusion>
+                                       <groupId>commons-cli</groupId>
+                                       <artifactId>commons-cli</artifactId>
+                               </exclusion>
+                               <exclusion>
+                                       <groupId>commons-codec</groupId>
+                                       <artifactId>commons-codec</artifactId>
+                               </exclusion>
+                               <exclusion>
+                                       <groupId>commons-collections</groupId>
+                                       
<artifactId>commons-collections</artifactId>
+                               </exclusion>
+                               <exclusion>
+                                       <groupId>commons-httpclient</groupId>
+                                       
<artifactId>commons-httpclient</artifactId>
+                               </exclusion>
+                               <exclusion>
+                                       <groupId>commons-io</groupId>
+                                       <artifactId>commons-io</artifactId>
+                               </exclusion>
+                               <exclusion>
+                                       <groupId>commons-lang</groupId>
+                                       <artifactId>commons-lang</artifactId>
+                               </exclusion>
+                               <exclusion>
+                                       <groupId>commons-logging</groupId>
+                                       <artifactId>commons-logging</artifactId>
+                               </exclusion>
+                               <exclusion>
+                                       <groupId>commons-net</groupId>
+                                       <artifactId>commons-net</artifactId>
+                               </exclusion>
+                               <exclusion>
+                                       <groupId>javax.servlet</groupId>
+                                       <artifactId>servlet-api</artifactId>
+                               </exclusion>
+                               <exclusion>
+                                       <groupId>log4j</groupId>
+                                       <artifactId>log4j</artifactId>
+                               </exclusion>
+                               <exclusion>
+                                       <groupId>net.java.dev.jets3t</groupId>
+                                       <artifactId>jets3t</artifactId>
+                               </exclusion>
+                               <exclusion>
+                                       <groupId>org.apache.avro</groupId>
+                                       <artifactId>avro</artifactId>
+                               </exclusion>
+                               <exclusion>
+                                       <groupId>org.apache.commons</groupId>
+                                       <artifactId>commons-math3</artifactId>
+                               </exclusion>
+                               <exclusion>
+                                       <groupId>org.apache.commons</groupId>
+                                       
<artifactId>commons-compress</artifactId>
+                               </exclusion>
+                               <exclusion>
+                                       <groupId>org.apache.curator</groupId>
+                                       <artifactId>curator-client</artifactId>
+                               </exclusion>
+                               <exclusion>
+                                       <groupId>org.apache.curator</groupId>
+                                       <artifactId>curator-recipes</artifactId>
+                               </exclusion>
+                       </exclusions>
+               </dependency>
+
+               <!-- Hive metastore dependencies -->
+
+               <dependency>
+                       <groupId>org.apache.hive</groupId>
+                       <artifactId>hive-metastore</artifactId>
+                       <version>${hive.version}</version>
+                       <exclusions>
+                               <exclusion>
+                                       <groupId>org.apache.hadoop</groupId>
+                                       <artifactId>hadoop-auth</artifactId>
+                               </exclusion>
+                               <exclusion>
+                                       <groupId>com.google.guava</groupId>
+                                       <artifactId>guava</artifactId>
+                               </exclusion>
+                       </exclusions>
+               </dependency>
+
+               <dependency>
+                       <groupId>org.apache.hive</groupId>
+                       <artifactId>hive-exec</artifactId>
+                       <version>${hive.version}</version>
+                       <exclusions>
+                               <exclusion>
+                                       <groupId>org.apache.calcite</groupId>
+                                       <artifactId>calcite-core</artifactId>
+                               </exclusion>
+                               <exclusion>
+                                       <groupId>org.apache.calcite</groupId>
+                                       <artifactId>calcite-druid</artifactId>
+                               </exclusion>
+                               <exclusion>
+                                       
<groupId>org.apache.calcite.avatica</groupId>
+                                       <artifactId>avatica</artifactId>
+                               </exclusion>
+                               <exclusion>
+                                       <groupId>commons-codec</groupId>
+                                       <artifactId>commons-codec</artifactId>
+                               </exclusion>
+                               <exclusion>
+                                       <groupId>commons-httpclient</groupId>
+                                       
<artifactId>commons-httpclient</artifactId>
+                               </exclusion>
+                               <exclusion>
+                                       <groupId>commons-io</groupId>
+                                       <artifactId>commons-io</artifactId>
+                               </exclusion>
+                               <exclusion>
+                                       
<groupId>org.apache.logging.log4j</groupId>
+                                       <artifactId>log4j-1.2-api</artifactId>
+                               </exclusion>
+                               <exclusion>
+                                       
<groupId>org.apache.logging.log4j</groupId>
+                                       
<artifactId>log4j-slf4j-impl</artifactId>
+                               </exclusion>
+                               <exclusion>
+                                       <groupId>org.slf4j</groupId>
+                                       <artifactId>slf4j-api</artifactId>
+                               </exclusion>
+                               <exclusion>
+                                       <groupId>org.apache.spark</groupId>
+                                       <artifactId>spark-core_2.11</artifactId>
+                               </exclusion>
+                               <exclusion>
+                                       <groupId>org.apache.tez</groupId>
+                                       <artifactId>tez-api</artifactId>
+                               </exclusion>
+                               <exclusion>
+                                       <groupId>org.apache.tez</groupId>
+                                       
<artifactId>tez-runtime-library</artifactId>
+                               </exclusion>
+                               <exclusion>
+                                       <groupId>org.apache.tez</groupId>
+                                       
<artifactId>tez-runtime-internals</artifactId>
+                               </exclusion>
+                               <exclusion>
+                                       <groupId>org.apache.tez</groupId>
+                                       <artifactId>tez-mapreduce</artifactId>
+                               </exclusion>
+                               <exclusion>
+                                       <groupId>org.apache.zookeeper</groupId>
+                                       <artifactId>zookeeper</artifactId>
+                               </exclusion>
+                               <exclusion>
+                                       <groupId>org.apache.curator</groupId>
+                                       
<artifactId>curator-framework</artifactId>
+                               </exclusion>
+                               <exclusion>
+                                       <groupId>org.apache.curator</groupId>
+                                       <artifactId>apache-curator</artifactId>
+                               </exclusion>
+                               <exclusion>
+                                       <groupId>com.google.code.gson</groupId>
+                                       <artifactId>gson</artifactId>
+                               </exclusion>
+                       </exclusions>
+               </dependency>
+
+               <!-- test dependencies -->
+
+               <dependency>
+                       <groupId>org.apache.flink</groupId>
+                       <artifactId>flink-table-common</artifactId>
+                       <version>${project.version}</version>
+                       <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-enforcer-plugin</artifactId>
+                    <executions>
+                        <execution>
+                            <id>dependency-convergence</id>
+                            <goals>
+                                <goal>enforce</goal>
+                            </goals>
+                            <configuration>
+                                <skip>true</skip>
+                            </configuration>
+                        </execution>
+                    </executions>
+                </plugin>
+
+                <plugin>
+                    <groupId>org.apache.maven.plugins</groupId>
+                    <artifactId>maven-shade-plugin</artifactId>
+                    <executions>
+                        <execution>
+                            <id>shade-flink</id>
+                            <phase>package</phase>
+                            <goals>
+                                <goal>shade</goal>
+                            </goals>
+                            <configuration>
+                                <artifactSet>
+                                    <includes>
 
 Review comment:
   I tried to package this module and found we shaded lots of classes and some 
of them seems to be unnecessary. I would suggest to bring 
https://issues.apache.org/jira/browse/FLINK-12266 into this PR, make a list to 
show how many dependencies have been shaded into this package. 
   
   Also I would cc @twalthr and @zentol , do you have any "best practices" to 
follow when we introduce a big dependency? 

----------------------------------------------------------------
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.
 
For queries about this service, please contact Infrastructure at:
[email protected]


With regards,
Apache Git Services

Reply via email to