Skip to content

Commit

Permalink
[FLINK-17678][hbase] Add flink-sql-connector-hbase module to provide …
Browse files Browse the repository at this point in the history
…uber jar for HBase connector

This closes apache#12687
  • Loading branch information
leonardBang committed Jun 23, 2020
1 parent de8a385 commit 6c7416a
Show file tree
Hide file tree
Showing 17 changed files with 2,620 additions and 23 deletions.
153 changes: 153 additions & 0 deletions flink-connectors/flink-sql-connector-hbase/pom.xml
Original file line number Diff line number Diff line change
@@ -0,0 +1,153 @@
<?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:https://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:https://maven.apache.org/POM/4.0.0"
xmlns:xsi="http:https://www.w3.org/2001/XMLSchema-instance"
xsi:schemaLocation="http:https://maven.apache.org/POM/4.0.0 http:https://maven.apache.org/xsd/maven-4.0.0.xsd">
<parent>
<artifactId>flink-connectors</artifactId>
<groupId>org.apache.flink</groupId>
<version>1.12-SNAPSHOT</version>
<relativePath>..</relativePath>
</parent>
<modelVersion>4.0.0</modelVersion>

<artifactId>flink-sql-connector-hbase_${scala.binary.version}</artifactId>
<name>flink-sql-connector-hbase</name>

<packaging>jar</packaging>

<dependencies>
<dependency>
<groupId>org.apache.flink</groupId>
<artifactId>flink-connector-hbase_${scala.binary.version}</artifactId>
<version>${project.version}</version>
</dependency>
</dependencies>

<build>
<plugins>
<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>
<!--
Make the file hbase-default.xml under flink-sql-connector-hbase/src/main/resources as the
hbase-default.xml in the shaded target jar here, because we don't want to check the hbase
version at client side. Also we don't need the extra default configs keys.
-->
<transformers>
<transformer
implementation="org.apache.maven.plugins.shade.resource.IncludeResourceTransformer">
<resource>hbase-default.xml</resource>
<file>hbase-default.xml</file>
</transformer>
</transformers>
<shadeTestJar>false</shadeTestJar>
<artifactSet>
<includes>
<include>org.apache.flink:flink-connector-hbase_${scala.binary.version}</include>
<include>org.apache.hbase:hbase-*</include>
<include>org.apache.zookeeper:zookeeper</include>
<include>org.apache.htrace:htrace-core</include>
<include>com.google.guava:guava</include>
<include>com.google.protobuf:protobuf-java</include>
<include>com.yammer.metrics:metrics-core</include>
<include>commons-logging:commons-logging</include>
<include>commons-lang:commons-lang</include>
<include>commons-configuration:commons-configuration</include>
<include>commons-codec:commons-codec</include>
<include>io.netty:netty-all</include>
</includes>
<excludes>
<exclude>org.apache.hbase:hbase-metrics*</exclude>
<exclude>org.apache.hbase:hbase-server*</exclude>
<exclude>org.apache.hbase:hbase-hadoop*-compat</exclude>
</excludes>
</artifactSet>
<filters>
<filter>
<artifact>*:*</artifact>
<excludes>
<!-- excluded all these files for a clean jar -->
<exclude>META-INF/services/com.fasterxml.**</exclude>
<exclude>META-INF/services/org.apache.hadoop.**</exclude>
<exclude>META-INF/services/javax.**</exclude>
<exclude>digesterRules.xml</exclude>
<exclude>properties.dtd</exclude>
<exclude>PropertyList-1.0.dtd</exclude>
<exclude>LICENSE.txt</exclude>
</excludes>
</filter>
</filters>
<relocations>
<!-- Force relocation of all HBase dependencies. -->
<relocation>
<pattern>org.apache.zookeeper</pattern>
<shadedPattern>org.apache.flink.hbase.shaded.org.apache.zookeeper</shadedPattern>
</relocation>
<relocation>
<pattern>org.apache.htrace</pattern>
<shadedPattern>org.apache.flink.hbase.shaded.org.apache.htrace</shadedPattern>
</relocation>
<relocation>
<pattern>com.google</pattern>
<shadedPattern>org.apache.flink.hbase.shaded.com.google</shadedPattern>
</relocation>
<relocation>
<pattern>com.yammer.metrics</pattern>
<shadedPattern>org.apache.flink.hbase.shaded.com.yammer.metrics</shadedPattern>
</relocation>
<relocation>
<pattern>org.apache.commons</pattern>
<shadedPattern>org.apache.flink.hbase.shaded.org.apache.commons</shadedPattern>
</relocation>
<relocation>
<pattern>org.apache.jute</pattern>
<shadedPattern>org.apache.flink.hbase.shaded.org.apache.jute</shadedPattern>
</relocation>
<relocation>
<pattern>io.netty</pattern>
<shadedPattern>org.apache.flink.hbase.shaded.io.netty</shadedPattern>
</relocation>
<relocation>
<pattern>org.apache.hadoop.hbase</pattern>
<shadedPattern>org.apache.flink.hbase.shaded.org.apache.hadoop.hbase</shadedPattern>
<!-- HBase client uses shaded KeyValueCodec to encode data and put the class name in
the header of request, the HBase region server can not load the shaded
KeyValueCodec class when decode the data, so we exclude them here. -->
<excludes>
<exclude>org.apache.hadoop.hbase.codec.*</exclude>
</excludes>
</relocation>
</relocations>
</configuration>
</execution>
</executions>
</plugin>
</plugins>
</build>
</project>
Original file line number Diff line number Diff line change
@@ -0,0 +1,35 @@
flink-sql-connector-hbase
Copyright 2014-2020 The Apache Software Foundation

This product includes software developed at
The Apache Software Foundation (http:https://www.apache.org/).

This project bundles the following dependencies under the Apache Software License 2.0. (http:https://www.apache.org/licenses/LICENSE-2.0.txt)

- com.google.guava:guava:12.0.1
- com.yammer.metrics:metrics-core:2.2.0
- commons-codec:commons-codec:1.10
- commons-configuration:commons-configuration:1.7
- commons-lang:commons-lang:2.6
- commons-logging:commons-logging:1.1.3
- io.netty:netty-all:4.1.44.Final
- org.apache.hbase:hbase-client:1.4.3
- org.apache.hbase:hbase-common:1.4.3
- org.apache.hbase:hbase-prefix-tree:1.4.3
- org.apache.hbase:hbase-procedure:1.4.3
- org.apache.hbase:hbase-protocol:1.4.3
- org.apache.htrace:htrace-core:3.1.0-incubating
- org.apache.zookeeper:zookeeper:3.4.14

This project bundles the following dependencies under the BSD license.
See bundled license files for details.

- com.google.protobuf:protobuf-java:2.5.0

The bundled Apache HTrace org.apache.htrace:htrace-core dependency bundles the following dependencies under
the Apache Software License 2.0 (http:https://www.apache.org/licenses/LICENSE-2.0.txt)

- com.fasterxml.jackson.core:jackson-annotations:2.4.0
- com.fasterxml.jackson.core:jackson-core:2.4.0
- com.fasterxml.jackson.core:jackson-databind:2.4.0
- commons-logging:commons-logging:1.1.1
Original file line number Diff line number Diff line change
@@ -0,0 +1,32 @@
Copyright 2008 Google Inc. All rights reserved.

Redistribution and use in source and binary forms, with or without
modification, are permitted provided that the following conditions are
met:

* Redistributions of source code must retain the above copyright
notice, this list of conditions and the following disclaimer.
* Redistributions in binary form must reproduce the above
copyright notice, this list of conditions and the following disclaimer
in the documentation and/or other materials provided with the
distribution.
* Neither the name of Google Inc. nor the names of its
contributors may be used to endorse or promote products derived from
this software without specific prior written permission.

THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
"AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR
A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT
OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY
THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
(INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.

Code generated by the Protocol Buffer compiler is owned by the owner
of the input file used when generating it. This code is not
standalone and requires a support library to be linked with it. This
support library is itself covered by the above license.
Loading

0 comments on commit 6c7416a

Please sign in to comment.