Commit 9a8b2860 authored by fwang12's avatar fwang12 Committed by Cheng Pan
Browse files

[KYUUBI #506] Shade curator dependencies to avoid impaction by external jars

![turboFei](https://badgen.net/badge/Hello/turboFei/green) [![Closes #506](https://badgen.net/badge/Preview/Closes%20%23506/blue)](https://github.com/yaooqinn/kyuubi/pull/506) ![26](https://badgen.net/badge/%2B/26/red) ![3](https://badgen.net/badge/-/3/green) ![1](https://badgen.net/badge/commits/1/yellow) ![Target Issue](https://badgen.net/badge/Missing/Target%20Issue/ff0000) ![Test Plan](https://badgen.net/badge/Missing/Test%20Plan/ff0000) ![Bug](https://badgen.net/badge/Label/Bug/) [<img width="16" alt="Powered by Pull Request Badge" src="https://user-images.githubusercontent.com/1393946/111216524-d2bb8e00-85d4-11eb-821b-ed4c00989c02.png">](https://pullrequestbadge.com/?utm_medium=github&utm_source=yaooqinn&utm_campaign=badge_info)<!-- PR-BADGE: PLEASE DO NOT REMOVE THIS COMMENT -->

<!--
Thanks for sending a pull request!

Here are some tips for you:
  1. If this is your first time, please read our contributor guidelines: https://kyuubi.readthedocs.io/en/latest/community/contributions.html
  2. If the PR is related to an issue in https://github.com/yaooqinn/kyuubi/issues, add '[KYUUBI #XXXX]' in your PR title, e.g., '[KYUUBI #XXXX] Your PR title ...'.
  3. If the PR is unfinished, add '[WIP]' in your PR title, e.g., '[WIP][KYUUBI #XXXX] Your PR title ...'.
-->

### _Why are the changes needed?_
Shade curator dependencies to avoid impaction by external jars.

### _How was this patch tested?_
- [ ] Add some test cases that check the changes thoroughly including negative and positive cases if possible

- [ ] Add screenshots for manual tests if appropriate

- [ ] [Run test](https://kyuubi.readthedocs.io/en/latest/tools/testing.html#running-tests

) locally before make a pull request

Closes #506 from turboFei/shade_curator_new.

Closes #506

4c6fdeaa [fwang12] Shade curator dependencies to avoid impaction by external jars
Authored-by: default avatarfwang12 <fwang12@ebay.com>
Signed-off-by: default avatarCheng Pan <379377944@qq.com>
parent f2ba4523
Showing with 26 additions and 3 deletions
+26 -3
......@@ -167,8 +167,29 @@
<includes>
<include>org.apache.kyuubi:kyuubi-common</include>
<include>org.apache.kyuubi:kyuubi-ha</include>
<include>org.apache.curator:curator-client</include>
<include>org.apache.curator:curator-framework</include>
<include>org.apache.curator:curator-recipes</include>
<include>org.apache.curator:curator-test</include>
<include>org.javassist:javassist</include>
</includes>
</artifactSet>
<relocations>
<relocation>
<pattern>org.apache.curator</pattern>
<shadedPattern>${kyuubi.shade.packageName}.org.apache.curator</shadedPattern>
<includes>
<include>org.apache.curator.**</include>
</includes>
</relocation>
<relocation>
<pattern>org.javassist</pattern>
<shadedPattern>${kyuubi.shade.packageName}.org.javassist</shadedPattern>
<includes>
<include>org.javassist.**</include>
</includes>
</relocation>
</relocations>
</configuration>
<executions>
<execution>
......
......@@ -26,7 +26,7 @@ import javax.security.auth.login.Configuration
import scala.collection.JavaConverters._
import org.apache.curator.framework.{CuratorFramework, CuratorFrameworkFactory}
import org.apache.curator.framework.recipes.nodes.PersistentEphemeralNode
import org.apache.curator.framework.recipes.nodes.{PersistentEphemeralNode, PersistentNode}
import org.apache.curator.framework.state.{ConnectionState, ConnectionStateListener}
import org.apache.curator.framework.state.ConnectionState.{CONNECTED, LOST, RECONNECTED}
import org.apache.curator.retry._
......@@ -59,14 +59,14 @@ abstract class ServiceDiscovery private (
this(classOf[ServiceDiscovery].getSimpleName, server)
private var _zkClient: CuratorFramework = _
private var _serviceNode: PersistentEphemeralNode = _
private var _serviceNode: PersistentNode = _
/**
* a pre-defined namespace used to publish the instance of the associate service
*/
private var _namespace: String = _
def zkClient: CuratorFramework = _zkClient
def serviceNode: PersistentEphemeralNode = _serviceNode
def serviceNode: PersistentNode = _serviceNode
def namespace: String = _namespace
override def initialize(conf: KyuubiConf): Unit = {
......
......@@ -105,6 +105,8 @@
<maven.plugin.download.version>1.6.0</maven.plugin.download.version>
<maven.plugin.silencer.version>1.6.0</maven.plugin.silencer.version>
<maven.plugin.rat.version>0.13</maven.plugin.rat.version>
<!-- Package to use when relocating shaded classes. -->
<kyuubi.shade.packageName>org.apache.kyuubi.shade</kyuubi.shade.packageName>
</properties>
<repositories>
......
Supports Markdown
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment