| <?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"> |
| |
| <!-- This pom creates a jar which excludes most of the hive-exec classes to |
| reduce the dependency footprint of hive in Impala. It uses maven-shade-plugin |
| to include only those classes which are needed by fe to compile and run in a |
| hive-3 environment. Additionally, it relocates some of the transitive dependencies |
| coming from hive-exec so that it does not conflict with Impala's version of |
| the same dependencies |
| --> |
| <parent> |
| <groupId>org.apache.impala</groupId> |
| <artifactId>impala-parent</artifactId> |
| <version>5.0.0-SNAPSHOT</version> |
| <relativePath>../../pom.xml</relativePath> |
| </parent> |
| <modelVersion>4.0.0</modelVersion> |
| <artifactId>impala-minimal-hive-exec</artifactId> |
| <packaging>jar</packaging> |
| |
| <dependencies> |
| <dependency> |
| <groupId>org.apache.hive</groupId> |
| <artifactId>hive-exec</artifactId> |
| </dependency> |
| </dependencies> |
| |
| <!-- For different major versions of Hive, some classes have differences |
| in namespaces. --> |
| <profiles> |
| <profile> |
| <id>hive-major-version-3</id> |
| <activation> |
| <property> |
| <name>env.IMPALA_HIVE_MAJOR_VERSION</name> |
| <value>3</value> |
| </property> |
| </activation> |
| <build> |
| <plugins> |
| <plugin> |
| <artifactId>maven-shade-plugin</artifactId> |
| <configuration> |
| <relocations> |
| <relocation> |
| <pattern>com.google</pattern> |
| <shadedPattern>hiveexec.com.google</shadedPattern> |
| </relocation> |
| </relocations> |
| </configuration> |
| </plugin> |
| </plugins> |
| </build> |
| </profile> |
| |
| <profile> |
| <id>hive-major-version-2</id> |
| <activation> |
| <property> |
| <name>env.IMPALA_HIVE_MAJOR_VERSION</name> |
| <value>2</value> |
| </property> |
| </activation> |
| <build> |
| <plugins> |
| <plugin> |
| <artifactId>maven-shade-plugin</artifactId> |
| <configuration> |
| <relocations> |
| <relocation> |
| <pattern>org.apache.hive.com.google</pattern> |
| <shadedPattern>hiveexec.com.google</shadedPattern> |
| </relocation> |
| </relocations> |
| </configuration> |
| </plugin> |
| </plugins> |
| </build> |
| </profile> |
| </profiles> |
| |
| <build> |
| <plugins> |
| <plugin> |
| <artifactId>maven-shade-plugin</artifactId> |
| <configuration> |
| <artifactSet> |
| <includes> |
| <include>org.apache.hive:hive-exec</include> |
| </includes> |
| </artifactSet> |
| <relocations> |
| <relocation> |
| <pattern>org.joda.time</pattern> |
| <shadedPattern>hiveexec.org.joda.time</shadedPattern> |
| </relocation> |
| </relocations> |
| <filters> |
| <filter> |
| <artifact>org.apache.hive:hive-exec</artifact> |
| <includes> |
| <include>META-INF/services/org.apache.hadoop.fs.FileSystem</include> |
| <include>org/apache/hadoop/hive/ql/io/SingleFileSystem*</include> |
| <include>org/apache/hadoop/hive/conf/**/*</include> |
| <include>org/apache/hadoop/hive/common/type/*</include> |
| <include>org/apache/hadoop/hive/common/FileUtils*</include> |
| <include>org/apache/hive/common/util/TxnIdUtils*</include> |
| <!-- Needed to support describe formatted command compat with Hive --> |
| <include>org/apache/hadoop/hive/ql/metadata/**/*</include> |
| <!-- Needed to support describe formatted command since HIVE-24509 --> |
| <include>org/apache/hadoop/hive/ql/ddl/ShowUtils.class</include> |
| <include>org/apache/hadoop/hive/ql/parse/SemanticException.class</include> |
| <!-- Needed to support Hive udfs --> |
| <include>org/apache/hadoop/hive/ql/exec/*UDF*</include> |
| <include>org/apache/hadoop/hive/ql/exec/UDAF.class</include> |
| <include>org/apache/hadoop/hive/ql/exec/MapredContext.class</include> |
| <include>org/apache/hadoop/hive/ql/exec/FunctionUtils*</include> |
| <include>org/apache/hadoop/hive/ql/parse/GenericHiveLexer*</include> |
| <include>org/apache/hadoop/hive/ql/parse/HiveLexer*</include> |
| <include>org/apache/hadoop/hive/ql/parse/ANTLRNoCaseStringStream*</include> |
| <include>org/apache/hadoop/hive/ql/parse/ParseError*</include> |
| <include>org/apache/hadoop/hive/ql/parse/Quotation*</include> |
| <include>org/apache/hadoop/hive/ql/udf/**/*</include> |
| <!-- Many of the UDFs are annotated with their vectorized counter-parts. |
| Including them makes sure that we don't break --> |
| <include>org/apache/hadoop/hive/ql/exec/vector/expressions/**/*</include> |
| <include>org/apache/hive/common/HiveVersionAnnotation.class</include> |
| <include>org/apache/hive/common/HiveCompat*</include> |
| <include>org/apache/hive/common/package-info.class</include> |
| <include>org/apache/hive/common/util/**</include> |
| <include>org/apache/hive/service/rpc/thrift/**</include> |
| <include>org/apache/hadoop/hive/serde/**</include> |
| <include>org/apache/hadoop/hive/serde2/**</include> |
| <!-- IMPALA-9548: Add UDF stats estimator --> |
| <include>org/apache/hadoop/hive/ql/plan/ColStatistics.class</include> |
| <include>org/apache/hadoop/hive/ql/stats/estimator/**</include> |
| <include>org/apache/hive/service/rpc/thrift/**</include> |
| <include>org/apache/hadoop/hive/ql/ErrorMsg.class</include> |
| <include>com/google/**</include> |
| <include>com/esri/**</include> |
| <!-- IMPALA-10261: Some versions of Hive shade guava, so include |
| the shaded path as well --> |
| <include>org/apache/hive/com/google/**</include> |
| </includes> |
| </filter> |
| </filters> |
| </configuration> |
| </plugin> |
| </plugins> |
| </build> |
| </project> |