You are viewing a plain text version of this content. The canonical link for it is here.
Posted to issues@hbase.apache.org by GitBox <gi...@apache.org> on 2020/03/09 20:57:19 UTC

[GitHub] [hbase-thirdparty] jojochuang commented on a change in pull request #13: HBASE-23811. [OpenTracing] Add shaded JaegerTracing tracer to hbase-thirdparty.

jojochuang commented on a change in pull request #13: HBASE-23811. [OpenTracing] Add shaded JaegerTracing tracer to hbase-thirdparty.
URL: https://github.com/apache/hbase-thirdparty/pull/13#discussion_r389957220
 
 

 ##########
 File path: hbase-shaded-jaeger/pom.xml
 ##########
 @@ -0,0 +1,176 @@
+<?xml version="1.0"?>
+<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>
+        <artifactId>hbase-thirdparty</artifactId>
+        <groupId>org.apache.hbase.thirdparty</groupId>
+        <version>3.3.0-SNAPSHOT</version>
+        <relativePath>..</relativePath>
+    </parent>
+    <artifactId>hbase-shaded-jaeger</artifactId>
+    <name>Apache HBase Relocated (Shaded) JaegerTracing Libs</name>
+    <description>The shaded uber jar of JaegerTracing library used by HBase.</description>
+
+    <dependencies>
+        <dependency>
+            <groupId>io.jaegertracing</groupId>
+            <artifactId>jaeger-client</artifactId>
+            <version>${jaegertracing.version}</version>
+        </dependency>
+    </dependencies>
+
+    <build>
+        <pluginManagement>
+            <plugins>
+                <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>
+                            <id>aggregate-into-a-jar-with-relocated-third-parties</id>
+                            <phase>package</phase>
+                            <goals>
+                                <goal>shade</goal>
+                            </goals>
+                            <configuration>
+                                <createSourcesJar>false</createSourcesJar>
+                                <shadedArtifactAttached>false</shadedArtifactAttached>
+                                <shadeTestJar>false</shadeTestJar>
+
+                                <artifactSet>
+                                    <excludes>
+                                        <exclude>org.apache.httpcomponents:httpclient</exclude>  <!-- hadoop-common has it too -->
+                                        <exclude>commons-logging:commons-logging</exclude>       <!-- transitively added by hbase-common -> commons-validator -->
+                                        <exclude>commons-codec:commons-codec</exclude>           <!-- hbase-common has it too -->
+                                        <exclude>org.apache.httpcomponents:httpcore</exclude>    <!-- hbase-common has it too -->
+                                        <exclude>javax.annotation:javax.annotation-api</exclude> <!-- comes in through JDK -->
+                                        <exclude>org.slf4j:slf4j-api</exclude>                   <!-- hbase-common has it too -->
+                                        <exclude>io.opentracing:*</exclude>                      <!-- hbase-common declares this dependency too -->
+                                    </excludes>
+                                </artifactSet>
+
+                                <relocations>
+                                    <!-- shade gson, which is transitively included via jaeger-core -->
 
 Review comment:
   Thanks @busbey for the suggest. Found a trick to:
   1.  exclude gson from the shaded jar, but
   2. update the reference to gson classes to the gson in the hbase-shaded-misc jar.
   
   Verified the gson classes are not in the hbase-shaded-jaeger jar and that the byte code references  org.apache.hbase.thirdparty.com.google.gson.*;

----------------------------------------------------------------
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:
users@infra.apache.org


With regards,
Apache Git Services