forked from apache/kyuubi
-
Notifications
You must be signed in to change notification settings - Fork 1
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
[KYUUBI apache#2644] Add etcd discovery client for HA
### _Why are the changes needed?_ Add etcd discovery client for HA ### _How was this patch tested?_ - [x] Add some test cases that check the changes thoroughly including negative and positive cases if possible - [ ] Add screenshots for manual tests if appropriate - [x] [Run test](https://kyuubi.apache.org/docs/latest/develop_tools/testing.html#running-tests) locally before make a pull request Closes apache#2767 from hddong/etcd-support. Closes apache#2644 6fa3757 [hongdongdong] Rebase and remove from rat-excludes fc23a2b [hongdongdong] upgrade grpc-1.47.0 61c77d2 [hongdongdong] Fix tests 28abd13 [hongdongdong] fix comments 9e81a6a [hongdongdong] Rename HA_ZK_ENGINE_REF_ID to HA_ENGINE_REF_ID aa2b426 [hongdongdong] [KYUUBI apache#2644][WIP] Add etcd discovery client for HA Authored-by: hongdongdong <hongdongdong@cmss.chinamobile.com> Signed-off-by: Kent Yao <yao@apache.org>
- Loading branch information
Showing
28 changed files
with
1,222 additions
and
271 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
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
20 changes: 20 additions & 0 deletions
20
...kyuubi-spark-sql-engine/src/main/resources/META-INF/services/io.grpc.LoadBalancerProvider
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,20 @@ | ||
# | ||
# 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. | ||
# | ||
|
||
io.grpc.internal.PickFirstLoadBalancerProvider | ||
io.grpc.util.SecretRoundRobinLoadBalancerProvider$Provider | ||
io.grpc.grpclb.GrpclbLoadBalancerProvider |
21 changes: 21 additions & 0 deletions
21
...kyuubi-spark-sql-engine/src/main/resources/META-INF/services/io.grpc.NameResolverProvider
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,21 @@ | ||
# | ||
# 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. | ||
# | ||
|
||
io.etcd.jetcd.resolver.DnsSrvResolverProvider | ||
io.etcd.jetcd.resolver.HttpResolverProvider | ||
io.etcd.jetcd.resolver.HttpsResolverProvider | ||
io.etcd.jetcd.resolver.IPResolverProvider |
43 changes: 43 additions & 0 deletions
43
...engine/src/test/scala/org/apache/kyuubi/engine/spark/EtcdShareLevelSparkEngineSuite.scala
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,43 @@ | ||
/* | ||
* 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. | ||
*/ | ||
|
||
package org.apache.kyuubi.engine.spark | ||
|
||
import org.apache.kyuubi.config.KyuubiConf.ENGINE_CHECK_INTERVAL | ||
import org.apache.kyuubi.config.KyuubiConf.ENGINE_SHARE_LEVEL | ||
import org.apache.kyuubi.config.KyuubiConf.ENGINE_SPARK_MAX_LIFETIME | ||
import org.apache.kyuubi.engine.ShareLevel | ||
import org.apache.kyuubi.engine.ShareLevel.ShareLevel | ||
|
||
trait EtcdShareLevelSparkEngineSuite | ||
extends ShareLevelSparkEngineTests with WithEtcdCluster { | ||
override def withKyuubiConf: Map[String, String] = { | ||
super.withKyuubiConf ++ | ||
etcdConf ++ Map( | ||
ENGINE_SHARE_LEVEL.key -> shareLevel.toString, | ||
ENGINE_SPARK_MAX_LIFETIME.key -> "PT20s", | ||
ENGINE_CHECK_INTERVAL.key -> "PT5s") | ||
} | ||
} | ||
|
||
class EtcdConnectionLevelSparkEngineSuite extends EtcdShareLevelSparkEngineSuite { | ||
override def shareLevel: ShareLevel = ShareLevel.CONNECTION | ||
} | ||
|
||
class EtcdUserLevelSparkEngineSuite extends EtcdShareLevelSparkEngineSuite { | ||
override def shareLevel: ShareLevel = ShareLevel.USER | ||
} |
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
Oops, something went wrong.