Skip to content

Commit

Permalink
update version
Browse files Browse the repository at this point in the history
  • Loading branch information
heliang666s committed Dec 3, 2024
1 parent 5e6c85a commit 44474a5
Show file tree
Hide file tree
Showing 4 changed files with 19 additions and 12 deletions.
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
/*
package org.apache.dubbo.samples.spi.registry;/*
*
* Licensed to the Apache Software Foundation (ASF) under one or more
* contributor license agreements. See the NOTICE file distributed with
Expand All @@ -17,12 +17,12 @@
*
*/

package org.apache.dubbo.samples.spi.registry;


import io.etcd.jetcd.ByteSequence;
import io.etcd.jetcd.Client;
import io.etcd.jetcd.launcher.Etcd;
import io.etcd.jetcd.launcher.EtcdCluster;
import io.etcd.jetcd.launcher.EtcdClusterFactory;
import org.slf4j.Logger;
import org.slf4j.LoggerFactory;

Expand All @@ -41,12 +41,15 @@ public class EtcdUtil {

public static void start() {
try {
etcdCluster = EtcdClusterFactory.buildCluster(EtcdUtil.class.getSimpleName(), 1, false);
etcdCluster = Etcd.builder()
.withClusterName(EtcdUtil.class.getSimpleName())
.withNodes(3)
.build();

etcdCluster.start();
client = Client.builder().endpoints(etcdCluster.getClientEndpoints()).build();
client = Client.builder().endpoints(etcdCluster.clientEndpoints()).build();

List<URI> clientEndPoints = etcdCluster.getClientEndpoints();
List<URI> clientEndPoints = etcdCluster.clientEndpoints();

String ipAddress = clientEndPoints.get(0).getHost() + ":" + clientEndPoints.get(0).getPort(); //"127.0.0.1:2379";

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -21,8 +21,8 @@

import io.etcd.jetcd.ByteSequence;
import io.etcd.jetcd.Client;
import io.etcd.jetcd.launcher.Etcd;
import io.etcd.jetcd.launcher.EtcdCluster;
import io.etcd.jetcd.launcher.EtcdClusterFactory;
import org.slf4j.Logger;
import org.slf4j.LoggerFactory;

Expand All @@ -41,12 +41,15 @@ public class EtcdUtil {

public static void start() {
try {
etcdCluster = EtcdClusterFactory.buildCluster(EtcdUtil.class.getSimpleName(), 3, false);
etcdCluster = Etcd.builder()
.withClusterName(EtcdUtil.class.getSimpleName())
.withNodes(3)
.build();

etcdCluster.start();
client = Client.builder().endpoints(etcdCluster.getClientEndpoints()).build();
client = Client.builder().endpoints(etcdCluster.clientEndpoints()).build();

List<URI> clientEndPoints = etcdCluster.getClientEndpoints();
List<URI> clientEndPoints = etcdCluster.clientEndpoints();

String ipAddress = clientEndPoints.get(0).getHost() + ":" + clientEndPoints.get(0).getPort(); //"127.0.0.1:2379";

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -99,7 +99,8 @@
<dependency>
<groupId>org.apache.dubbo.extensions</groupId>
<artifactId>dubbo-serialization-native-hession</artifactId>
<version>${spi.version}</version>
<!-- 3.3.0 not support -->
<version>3.2.0</version>
</dependency>

<dependency>
Expand Down
2 changes: 1 addition & 1 deletion pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -31,7 +31,7 @@
<maven.compiler.target>1.8</maven.compiler.target>
<project.build.sourceEncoding>UTF-8</project.build.sourceEncoding>

<spi.version>3.2.0</spi.version>
<spi.version>3.3.0</spi.version>
<dubbo.version>3.3.2</dubbo.version>
<spring.version>4.3.30.RELEASE</spring.version>
<log4j2.version>2.17.1</log4j2.version>
Expand Down

0 comments on commit 44474a5

Please sign in to comment.