forked from apache/hbase
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Add hbase-shaded-netty-tcnative to our client and server bundles (apa…
- Loading branch information
1 parent
fcf066d
commit 2681ae1
Showing
8 changed files
with
171 additions
and
8 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,16 @@ | ||
buildpack: | ||
name: Blazar-Buildpack-Java | ||
|
||
# Note: this blazar yaml has been copied to all of the maven submodules (EXCEPT hbase-assembly) so | ||
# that they can be properly configured. If you make changes to this, you will need to make sure all | ||
# submodules are also updated accordingly. If you added a new submodule, you'll need to make sure | ||
# it gets a copy of this .blazar.yaml. In either case, use copy_blazar_yaml.sh to copy to all | ||
# subdirs containing a pom.xml. | ||
# Make sure to also check hbase-assembly/.blazar.yaml to see if any changes should be added there as well. | ||
# Prefer making changes to prepare_environment.sh instead, if possible. | ||
|
||
|
||
before: | ||
- description: "Prepare build environment" | ||
commands: | ||
- $WORKSPACE/build-scripts/prepare_environment.sh |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,134 @@ | ||
<?xml version="1.0" encoding="UTF-8"?> | ||
<project xmlns="https://maven.apache.org/POM/4.0.0" xmlns:xsi="https://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="https://maven.apache.org/POM/4.0.0 https://maven.apache.org/xsd/maven-4.0.0.xsd"> | ||
<!-- | ||
/** | ||
* 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. | ||
*/ | ||
--> | ||
<modelVersion>4.0.0</modelVersion> | ||
<parent> | ||
<groupId>org.apache.hbase</groupId> | ||
<artifactId>hbase-shaded</artifactId> | ||
<version>${revision}</version> | ||
<relativePath>..</relativePath> | ||
</parent> | ||
<artifactId>hbase-shaded-netty-tcnative</artifactId> | ||
<name>Apache HBase - Shaded - Netty tcnative</name> | ||
<properties> | ||
<tcnative.version>2.0.61.Final</tcnative.version> | ||
</properties> | ||
<dependencies> | ||
<dependency> | ||
<groupId>io.netty</groupId> | ||
<artifactId>netty-tcnative-boringssl-static</artifactId> | ||
<version>${tcnative.version}</version> | ||
<classifier>linux-x86_64</classifier> | ||
</dependency> | ||
<dependency> | ||
<groupId>io.netty</groupId> | ||
<artifactId>netty-tcnative-boringssl-static</artifactId> | ||
<version>${tcnative.version}</version> | ||
<classifier>linux-aarch_64</classifier> | ||
</dependency> | ||
</dependencies> | ||
<build> | ||
<plugins> | ||
<plugin> | ||
<groupId>org.apache.maven.plugins</groupId> | ||
<artifactId>maven-site-plugin</artifactId> | ||
<configuration> | ||
<skip>true</skip> | ||
</configuration> | ||
</plugin> | ||
<plugin> | ||
<!--Make it so assembly:single does nothing in here--> | ||
<artifactId>maven-assembly-plugin</artifactId> | ||
<configuration> | ||
<skipAssembly>true</skipAssembly> | ||
</configuration> | ||
</plugin> | ||
<plugin> | ||
<groupId>org.apache.maven.plugins</groupId> | ||
<artifactId>maven-shade-plugin</artifactId> | ||
<executions> | ||
<execution> | ||
<goals> | ||
<goal>shade</goal> | ||
</goals> | ||
<phase>package</phase> | ||
<configuration> | ||
<shadeSourcesContent>true</shadeSourcesContent> | ||
<createSourcesJar>true</createSourcesJar> | ||
<relocations> | ||
<relocation> | ||
<pattern>io.netty</pattern> | ||
<shadedPattern>org.apache.hbase.thirdparty.io.netty</shadedPattern> | ||
</relocation> | ||
</relocations> | ||
<artifactSet> | ||
<includes> | ||
<include>io.netty:*</include> | ||
</includes> | ||
</artifactSet> | ||
</configuration> | ||
</execution> | ||
</executions> | ||
</plugin> | ||
<plugin> | ||
<!--This trick from | ||
https://stackoverflow.com/questions/33825743/rename-files-inside-a-jar-using-some-maven-plugin | ||
The netty jar has a .so in it. Shading requires rename of the .so and then passing a system | ||
property so netty finds the renamed .so and associates it w/ the relocated netty files. | ||
Add this define when running unit tests: | ||
mvn test -Dorg.apache.hbase.thirdparty.io.netty.packagePrefix=org.apache.hbase.thirdparty. -Dtest=TestNettyIPC | ||
See toward the end of this issue for how to pass config: | ||
https://github.com/netty/netty/issues/6665 | ||
TODO: Ensure native works. | ||
NOTE: The 'tofile' in the move command below has the relocation hard-coded | ||
with '-' instead of '.' separators. If change the relocation, need to change here too. | ||
--> | ||
<groupId>org.apache.maven.plugins</groupId> | ||
<artifactId>maven-antrun-plugin</artifactId> | ||
<executions> | ||
<execution> | ||
<id>unpack</id> | ||
<goals> | ||
<goal>run</goal> | ||
</goals> | ||
<phase>package</phase> | ||
<configuration> | ||
<target> | ||
<echo message="unjar"/> | ||
<unzip dest="${project.build.directory}/unpacked/" src="${project.build.directory}/${project.artifactId}-${project.version}.jar"/> | ||
<echo message="Rename netty .so in META-INF"/> | ||
<move file="${project.build.directory}/unpacked/META-INF/native/libnetty_tcnative_linux_x86_64.so" tofile="${project.build.directory}/unpacked/META-INF/native/liborg_apache_hbase_thirdparty_netty_tcnative_linux_x86_64.so"/> | ||
<move file="${project.build.directory}/unpacked/META-INF/native/libnetty_tcnative_linux_aarch_64.so" tofile="${project.build.directory}/unpacked/META-INF/native/liborg_apache_hbase_thirdparty_netty_tcnative_linux_aarch_64.so"/> | ||
<jar basedir="${project.build.directory}/unpacked" destfile="${project.build.directory}/${project.artifactId}-${project.version}.jar"/> | ||
</target> | ||
</configuration> | ||
</execution> | ||
</executions> | ||
</plugin> | ||
</plugins> | ||
</build> | ||
</project> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters