[KYUUBI #506] Shade curator dependencies to avoid impaction by external jars
 [](https://github.com/yaooqinn/kyuubi/pull/506)       [<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: fwang12 <fwang12@ebay.com> Signed-off-by: Cheng Pan <379377944@qq.com>
This commit is contained in:
parent
f2ba4523f8
commit
9a8b2860f6
21
externals/kyuubi-spark-sql-engine/pom.xml
vendored
21
externals/kyuubi-spark-sql-engine/pom.xml
vendored
@ -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 = {
|
||||
|
||||
2
pom.xml
2
pom.xml
@ -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>
|
||||
|
||||
Loading…
Reference in New Issue
Block a user