Skip to content

Commit 542cead

Browse files
hddongyaooqinn
authored andcommitted
[KYUUBI #1505] Move ServiceNodeInfo to a separate file
<!-- 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/apache/incubator-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?_ <!-- Please clarify why the changes are needed. For instance, 1. If you add a feature, you can talk about the use case of it. 2. If you fix a bug, you can clarify why it is a bug. --> Decouple zookeeper #1392 ### _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 - [X] [Run test](https://kyuubi.readthedocs.io/en/latest/develop_tools/testing.html#running-tests) locally before make a pull request Closes #1506 from hddong/move-serviceNodeInfo. Closes #1505 7bd7f18 [hongdongdong] [KYUUBI #1505] Move ServiceNodeInfo to a separate file Authored-by: hongdongdong <hongdongdong@cmss.chinamobile.com> Signed-off-by: Kent Yao <yao@apache.org>
1 parent 339fa76 commit 542cead

File tree

2 files changed

+28
-10
lines changed

2 files changed

+28
-10
lines changed

kyuubi-ha/src/main/scala/org/apache/kyuubi/ha/client/ServiceDiscovery.scala

Lines changed: 0 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -153,13 +153,3 @@ object ServiceDiscovery extends Logging {
153153
createServiceNode(conf, zkClient, namespace, instance, version, external).getActualPath
154154
}
155155
}
156-
157-
case class ServiceNodeInfo(
158-
namespace: String,
159-
nodeName: String,
160-
host: String,
161-
port: Int,
162-
version: Option[String],
163-
engineRefId: Option[String]) {
164-
def instance: String = s"$host:$port"
165-
}
Lines changed: 28 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,28 @@
1+
/*
2+
* Licensed to the Apache Software Foundation (ASF) under one or more
3+
* contributor license agreements. See the NOTICE file distributed with
4+
* this work for additional information regarding copyright ownership.
5+
* The ASF licenses this file to You under the Apache License, Version 2.0
6+
* (the "License"); you may not use this file except in compliance with
7+
* the License. You may obtain a copy of the License at
8+
*
9+
* http://www.apache.org/licenses/LICENSE-2.0
10+
*
11+
* Unless required by applicable law or agreed to in writing, software
12+
* distributed under the License is distributed on an "AS IS" BASIS,
13+
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
14+
* See the License for the specific language governing permissions and
15+
* limitations under the License.
16+
*/
17+
18+
package org.apache.kyuubi.ha.client
19+
20+
case class ServiceNodeInfo(
21+
namespace: String,
22+
nodeName: String,
23+
host: String,
24+
port: Int,
25+
version: Option[String],
26+
engineRefId: Option[String]) {
27+
def instance: String = s"$host:$port"
28+
}

0 commit comments

Comments
 (0)