Skip to content
Snippets Groups Projects
Commit 003f80db authored by lindongyu1's avatar lindongyu1
Browse files

Modify Chinese comments to English

parent 046699a1
No related branches found
No related tags found
No related merge requests found
Showing
with 30 additions and 30 deletions
...@@ -84,7 +84,7 @@ func (invoker *baseClusterInvoker) checkWhetherDestroyed() error { ...@@ -84,7 +84,7 @@ func (invoker *baseClusterInvoker) checkWhetherDestroyed() error {
} }
func (invoker *baseClusterInvoker) doSelect(lb cluster.LoadBalance, invocation protocol.Invocation, invokers []protocol.Invoker, invoked []protocol.Invoker) protocol.Invoker { func (invoker *baseClusterInvoker) doSelect(lb cluster.LoadBalance, invocation protocol.Invocation, invokers []protocol.Invoker, invoked []protocol.Invoker) protocol.Invoker {
//todo:ticky connect 粘纸连接 //todo:sticky connect
if len(invokers) == 1 { if len(invokers) == 1 {
return invokers[0] return invokers[0]
} }
......
...@@ -196,7 +196,7 @@ func (r *zookeeperDynamicConfiguration) closeConfigs() { ...@@ -196,7 +196,7 @@ func (r *zookeeperDynamicConfiguration) closeConfigs() {
r.cltLock.Lock() r.cltLock.Lock()
defer r.cltLock.Unlock() defer r.cltLock.Unlock()
logger.Infof("begin to close provider zk client") logger.Infof("begin to close provider zk client")
// 先关闭旧client,以关闭tmp node // Close the old client first to close the tmp node
r.client.Close() r.client.Close()
r.client = nil r.client = nil
} }
......
...@@ -27,7 +27,7 @@ import ( ...@@ -27,7 +27,7 @@ import (
) )
import ( import (
"github.com/apache/dubbo-go-hessian2" hessian "github.com/apache/dubbo-go-hessian2"
) )
import ( import (
...@@ -140,7 +140,7 @@ func initSignal() { ...@@ -140,7 +140,7 @@ func initSignal() {
os.Exit(1) os.Exit(1)
}) })
// 要么fastFailTimeout时间内执行完毕下面的逻辑然后程序退出,要么执行上面的超时函数程序强行退出 // The program exits normally or timeout forcibly exits.
fmt.Println("app exit now...") fmt.Println("app exit now...")
return return
} }
......
...@@ -83,7 +83,7 @@ type User struct { ...@@ -83,7 +83,7 @@ type User struct {
Name string Name string
Age int32 Age int32
Time time.Time Time time.Time
Sex Gender // 注意此处,java enum Object <--> go string Sex Gender // notice: java enum Object <--> go string
} }
func (u User) String() string { func (u User) String() string {
......
...@@ -78,7 +78,7 @@ func initSignal() { ...@@ -78,7 +78,7 @@ func initSignal() {
os.Exit(1) os.Exit(1)
}) })
// 要么fastFailTimeout时间内执行完毕下面的逻辑然后程序退出,要么执行上面的超时函数程序强行退出 // The program exits normally or timeout forcibly exits.
fmt.Println("provider app exit now...") fmt.Println("provider app exit now...")
return return
} }
......
...@@ -84,7 +84,7 @@ type ( ...@@ -84,7 +84,7 @@ type (
Name string Name string
Age int32 Age int32
Time time.Time Time time.Time
Sex Gender // 注意此处,java enum Object <--> go string Sex Gender // notice: java enum Object <--> go string
} }
UserProvider struct { UserProvider struct {
......
...@@ -125,7 +125,7 @@ func initSignal() { ...@@ -125,7 +125,7 @@ func initSignal() {
os.Exit(1) os.Exit(1)
}) })
// 要么fastFailTimeout时间内执行完毕下面的逻辑然后程序退出,要么执行上面的超时函数程序强行退出 // The program exits normally or timeout forcibly exits.
fmt.Println("app exit now...") fmt.Println("app exit now...")
return return
} }
......
...@@ -67,7 +67,7 @@ func initSignal() { ...@@ -67,7 +67,7 @@ func initSignal() {
os.Exit(1) os.Exit(1)
}) })
// 要么fastFailTimeout时间内执行完毕下面的逻辑然后程序退出,要么执行上面的超时函数程序强行退出 // The program exits normally or timeout forcibly exits.
fmt.Println("provider app exit now...") fmt.Println("provider app exit now...")
return return
} }
......
...@@ -86,7 +86,7 @@ func initSignal() { ...@@ -86,7 +86,7 @@ func initSignal() {
os.Exit(1) os.Exit(1)
}) })
// 要么fastFailTimeout时间内执行完毕下面的逻辑然后程序退出,要么执行上面的超时函数程序强行退出 // The program exits normally or timeout forcibly exits.
fmt.Println("app exit now...") fmt.Println("app exit now...")
return return
} }
......
...@@ -89,7 +89,7 @@ type User struct { ...@@ -89,7 +89,7 @@ type User struct {
Name string Name string
Age int32 Age int32
Time time.Time Time time.Time
Sex Gender // 注意此处,java enum Object <--> go string Sex Gender // notice: java enum Object <--> go string
} }
func (u User) String() string { func (u User) String() string {
......
...@@ -79,7 +79,7 @@ func initSignal() { ...@@ -79,7 +79,7 @@ func initSignal() {
os.Exit(1) os.Exit(1)
}) })
// 要么fastFailTimeout时间内执行完毕下面的逻辑然后程序退出,要么执行上面的超时函数程序强行退出 // The program exits normally or timeout forcibly exits.
fmt.Println("provider app exit now...") fmt.Println("provider app exit now...")
return return
} }
......
...@@ -24,7 +24,7 @@ import ( ...@@ -24,7 +24,7 @@ import (
) )
import ( import (
"github.com/apache/dubbo-go-hessian2" hessian "github.com/apache/dubbo-go-hessian2"
) )
type Gender hessian.JavaEnum type Gender hessian.JavaEnum
...@@ -73,7 +73,7 @@ type ( ...@@ -73,7 +73,7 @@ type (
Name string Name string
Age int32 Age int32
Time time.Time Time time.Time
Sex Gender // 注意此处,java enum Object <--> go string Sex Gender // notice: java enum Object <--> go string
} }
) )
......
...@@ -17,12 +17,12 @@ import com.alibaba.dubbo.rpc.service.EchoService; ...@@ -17,12 +17,12 @@ import com.alibaba.dubbo.rpc.service.EchoService;
import java.util.List; import java.util.List;
public class Consumer { public class Consumer {
//定义一个私有变量 (Spring中要求) // Define a private variable (Required in Spring)
private UserProvider userProvider; private UserProvider userProvider;
private UserProvider userProvider1; private UserProvider userProvider1;
private UserProvider userProvider2; private UserProvider userProvider2;
//Spring注入(Spring中要求) // Spring DI (Required in Spring)
public void setUserProvider(UserProvider u) { public void setUserProvider(UserProvider u) {
this.userProvider = u; this.userProvider = u;
} }
...@@ -33,7 +33,7 @@ public class Consumer { ...@@ -33,7 +33,7 @@ public class Consumer {
this.userProvider2 = u; this.userProvider2 = u;
} }
//启动consumer的入口函数(在配置文件中指定) // Start the entry function for consumer (Specified in the configuration file)
public void start() throws Exception { public void start() throws Exception {
System.out.println("\n\ntest"); System.out.println("\n\ntest");
testGetUser(); testGetUser();
......
...@@ -9,8 +9,8 @@ import org.slf4j.LoggerFactory; ...@@ -9,8 +9,8 @@ import org.slf4j.LoggerFactory;
import java.util.*; import java.util.*;
public class UserProviderAnotherImpl implements UserProvider { public class UserProviderAnotherImpl implements UserProvider {
// private static final Logger logger = LoggerFactory.getLogger(getClass()); // 只输出到dubbolog(logs/server.log) // private static final Logger logger = LoggerFactory.getLogger(getClass()); // Only output to dubbo's log(logs/server.log)
private static final Logger logger = LoggerFactory.getLogger("userLogger"); // 输出到user-server.log private static final Logger logger = LoggerFactory.getLogger("userLogger"); // Output to user-server.log
private Map<String, User> userMap = new HashMap<String, User>(); private Map<String, User> userMap = new HashMap<String, User>();
......
...@@ -14,8 +14,8 @@ import org.slf4j.Logger; ...@@ -14,8 +14,8 @@ import org.slf4j.Logger;
import org.slf4j.LoggerFactory; import org.slf4j.LoggerFactory;
public class UserProviderImpl implements UserProvider { public class UserProviderImpl implements UserProvider {
// private static final Logger logger = LoggerFactory.getLogger(getClass()); // 只输出到dubbolog(logs/server.log) // private static final Logger logger = LoggerFactory.getLogger(getClass()); // Only output to dubbo's log(logs/server.log)
private static final Logger LOG = LoggerFactory.getLogger("UserLogger"); // 输出到user-server.log private static final Logger LOG = LoggerFactory.getLogger("UserLogger"); // Output to user-server.log
Map<String, User> userMap = new HashMap<String, User>(); Map<String, User> userMap = new HashMap<String, User>();
public UserProviderImpl() { public UserProviderImpl() {
......
...@@ -78,7 +78,7 @@ func initSignal() { ...@@ -78,7 +78,7 @@ func initSignal() {
os.Exit(1) os.Exit(1)
}) })
// 要么fastFailTimeout时间内执行完毕下面的逻辑然后程序退出,要么执行上面的超时函数程序强行退出 // The program exits normally or timeout forcibly exits.
fmt.Println("app exit now...") fmt.Println("app exit now...")
return return
} }
......
...@@ -69,7 +69,7 @@ func initSignal() { ...@@ -69,7 +69,7 @@ func initSignal() {
os.Exit(1) os.Exit(1)
}) })
// 要么fastFailTimeout时间内执行完毕下面的逻辑然后程序退出,要么执行上面的超时函数程序强行退出 // The program exits normally or timeout forcibly exits.
fmt.Println("provider app exit now...") fmt.Println("provider app exit now...")
return return
} }
......
...@@ -17,12 +17,12 @@ import com.alibaba.dubbo.rpc.service.EchoService; ...@@ -17,12 +17,12 @@ import com.alibaba.dubbo.rpc.service.EchoService;
import java.util.List; import java.util.List;
public class Consumer { public class Consumer {
//定义一个私有变量 (Spring中要求) // Define a private variable (Required in Spring)
private UserProvider userProvider; private UserProvider userProvider;
private UserProvider userProvider1; private UserProvider userProvider1;
private UserProvider userProvider2; private UserProvider userProvider2;
//Spring注入(Spring中要求) // Spring DI (Required in Spring)
public void setUserProvider(UserProvider u) { public void setUserProvider(UserProvider u) {
this.userProvider = u; this.userProvider = u;
} }
...@@ -33,7 +33,7 @@ public class Consumer { ...@@ -33,7 +33,7 @@ public class Consumer {
this.userProvider2 = u; this.userProvider2 = u;
} }
//启动consumer的入口函数(在配置文件中指定) // Start the entry function for consumer (Specified in the configuration file)
public void start() throws Exception { public void start() throws Exception {
System.out.println("\n\ntest"); System.out.println("\n\ntest");
testGetUser(); testGetUser();
......
...@@ -9,8 +9,8 @@ import org.slf4j.LoggerFactory; ...@@ -9,8 +9,8 @@ import org.slf4j.LoggerFactory;
import java.util.*; import java.util.*;
public class UserProviderAnotherImpl implements UserProvider { public class UserProviderAnotherImpl implements UserProvider {
// private static final Logger logger = LoggerFactory.getLogger(getClass()); // 只输出到dubbolog(logs/server.log) // private static final Logger logger = LoggerFactory.getLogger(getClass()); // Only output to dubbo's log(logs/server.log)
private static final Logger logger = LoggerFactory.getLogger("userLogger"); // 输出到user-server.log private static final Logger logger = LoggerFactory.getLogger("userLogger"); // Output to user-server.log
private Map<String, User> userMap = new HashMap<String, User>(); private Map<String, User> userMap = new HashMap<String, User>();
......
...@@ -14,8 +14,8 @@ import org.slf4j.Logger; ...@@ -14,8 +14,8 @@ import org.slf4j.Logger;
import org.slf4j.LoggerFactory; import org.slf4j.LoggerFactory;
public class UserProviderImpl implements UserProvider { public class UserProviderImpl implements UserProvider {
// private static final Logger logger = LoggerFactory.getLogger(getClass()); // 只输出到dubbolog(logs/server.log) // private static final Logger logger = LoggerFactory.getLogger(getClass()); // Only output to dubbo's log(logs/server.log)
private static final Logger LOG = LoggerFactory.getLogger("UserLogger"); // 输出到user-server.log private static final Logger LOG = LoggerFactory.getLogger("UserLogger"); // Output to user-server.log
Map<String, User> userMap = new HashMap<String, User>(); Map<String, User> userMap = new HashMap<String, User>();
public UserProviderImpl() { public UserProviderImpl() {
......
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