Skip to content
Snippets Groups Projects
Commit 828dce73 authored by amudong's avatar amudong
Browse files

Mod: translate 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 {
}
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 {
return invokers[0]
}
......
......@@ -196,7 +196,7 @@ func (r *zookeeperDynamicConfiguration) closeConfigs() {
r.cltLock.Lock()
defer r.cltLock.Unlock()
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 = nil
}
......
......@@ -27,7 +27,7 @@ import (
)
import (
"github.com/apache/dubbo-go-hessian2"
hessian "github.com/apache/dubbo-go-hessian2"
)
import (
......@@ -140,7 +140,7 @@ func initSignal() {
os.Exit(1)
})
// 要么fastFailTimeout时间内执行完毕下面的逻辑然后程序退出,要么执行上面的超时函数程序强行退出
// The program exits normally or timeout forcibly exits.//
fmt.Println("app exit now...")
return
}
......
......@@ -83,7 +83,7 @@ type User struct {
Name string
Age int32
Time time.Time
Sex Gender // 注意此处,java enum Object <--> go string
Sex Gender // notice: java enum Object <--> go string
}
func (u User) String() string {
......
......@@ -78,7 +78,7 @@ func initSignal() {
os.Exit(1)
})
// 要么fastFailTimeout时间内执行完毕下面的逻辑然后程序退出,要么执行上面的超时函数程序强行退出
// The program exits normally or timeout forcibly exits.
fmt.Println("provider app exit now...")
return
}
......
......@@ -84,7 +84,7 @@ type (
Name string
Age int32
Time time.Time
Sex Gender // 注意此处,java enum Object <--> go string
Sex Gender // notice: java enum Object <--> go string
}
UserProvider struct {
......
......@@ -125,7 +125,7 @@ func initSignal() {
os.Exit(1)
})
// 要么fastFailTimeout时间内执行完毕下面的逻辑然后程序退出,要么执行上面的超时函数程序强行退出
// The program exits normally or timeout forcibly exits.
fmt.Println("app exit now...")
return
}
......
......@@ -67,7 +67,7 @@ func initSignal() {
os.Exit(1)
})
// 要么fastFailTimeout时间内执行完毕下面的逻辑然后程序退出,要么执行上面的超时函数程序强行退出
// The program exits normally or timeout forcibly exits.
fmt.Println("provider app exit now...")
return
}
......
......@@ -86,7 +86,7 @@ func initSignal() {
os.Exit(1)
})
// 要么fastFailTimeout时间内执行完毕下面的逻辑然后程序退出,要么执行上面的超时函数程序强行退出
// The program exits normally or timeout forcibly exits.
fmt.Println("app exit now...")
return
}
......
......@@ -89,7 +89,7 @@ type User struct {
Name string
Age int32
Time time.Time
Sex Gender // 注意此处,java enum Object <--> go string
Sex Gender // notice: java enum Object <--> go string
}
func (u User) String() string {
......
......@@ -79,7 +79,7 @@ func initSignal() {
os.Exit(1)
})
// 要么fastFailTimeout时间内执行完毕下面的逻辑然后程序退出,要么执行上面的超时函数程序强行退出
// The program exits normally or timeout forcibly exits.
fmt.Println("provider app exit now...")
return
}
......
......@@ -24,7 +24,7 @@ import (
)
import (
"github.com/apache/dubbo-go-hessian2"
hessian "github.com/apache/dubbo-go-hessian2"
)
type Gender hessian.JavaEnum
......@@ -73,7 +73,7 @@ type (
Name string
Age int32
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;
import java.util.List;
public class Consumer {
//定义一个私有变量 (Spring中要求)
// Define a private variable (Required in Spring)
private UserProvider userProvider;
private UserProvider userProvider1;
private UserProvider userProvider2;
//Spring注入(Spring中要求)
// Spring DI (Required in Spring)
public void setUserProvider(UserProvider u) {
this.userProvider = u;
}
......@@ -33,7 +33,7 @@ public class Consumer {
this.userProvider2 = u;
}
//启动consumer的入口函数(在配置文件中指定)
// Start the entry function for consumer (Specified in the configuration file)
public void start() throws Exception {
System.out.println("\n\ntest");
testGetUser();
......
......@@ -9,8 +9,8 @@ import org.slf4j.LoggerFactory;
import java.util.*;
public class UserProviderAnotherImpl implements UserProvider {
// private static final Logger logger = LoggerFactory.getLogger(getClass()); // 只输出到dubbolog(logs/server.log)
private static final Logger logger = LoggerFactory.getLogger("userLogger"); // 输出到user-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"); // Output to user-server.log
private Map<String, User> userMap = new HashMap<String, User>();
......
......@@ -14,8 +14,8 @@ import org.slf4j.Logger;
import org.slf4j.LoggerFactory;
public class UserProviderImpl implements UserProvider {
// private static final Logger logger = LoggerFactory.getLogger(getClass()); // 只输出到dubbolog(logs/server.log)
private static final Logger LOG = LoggerFactory.getLogger("UserLogger"); // 输出到user-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"); // Output to user-server.log
Map<String, User> userMap = new HashMap<String, User>();
public UserProviderImpl() {
......
......@@ -78,7 +78,7 @@ func initSignal() {
os.Exit(1)
})
// 要么fastFailTimeout时间内执行完毕下面的逻辑然后程序退出,要么执行上面的超时函数程序强行退出
// The program exits normally or timeout forcibly exits.
fmt.Println("app exit now...")
return
}
......
......@@ -69,7 +69,7 @@ func initSignal() {
os.Exit(1)
})
// 要么fastFailTimeout时间内执行完毕下面的逻辑然后程序退出,要么执行上面的超时函数程序强行退出
// The program exits normally or timeout forcibly exits.
fmt.Println("provider app exit now...")
return
}
......
......@@ -17,12 +17,12 @@ import com.alibaba.dubbo.rpc.service.EchoService;
import java.util.List;
public class Consumer {
//定义一个私有变量 (Spring中要求)
// Define a private variable (Required in Spring)
private UserProvider userProvider;
private UserProvider userProvider1;
private UserProvider userProvider2;
//Spring注入(Spring中要求)
// Spring DI (Required in Spring)
public void setUserProvider(UserProvider u) {
this.userProvider = u;
}
......@@ -33,7 +33,7 @@ public class Consumer {
this.userProvider2 = u;
}
//启动consumer的入口函数(在配置文件中指定)
// Start the entry function for consumer (Specified in the configuration file)
public void start() throws Exception {
System.out.println("\n\ntest");
testGetUser();
......
......@@ -9,8 +9,8 @@ import org.slf4j.LoggerFactory;
import java.util.*;
public class UserProviderAnotherImpl implements UserProvider {
// private static final Logger logger = LoggerFactory.getLogger(getClass()); // 只输出到dubbolog(logs/server.log)
private static final Logger logger = LoggerFactory.getLogger("userLogger"); // 输出到user-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"); // Output to user-server.log
private Map<String, User> userMap = new HashMap<String, User>();
......
......@@ -14,8 +14,8 @@ import org.slf4j.Logger;
import org.slf4j.LoggerFactory;
public class UserProviderImpl implements UserProvider {
// private static final Logger logger = LoggerFactory.getLogger(getClass()); // 只输出到dubbolog(logs/server.log)
private static final Logger LOG = LoggerFactory.getLogger("UserLogger"); // 输出到user-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"); // Output to user-server.log
Map<String, User> userMap = new HashMap<String, User>();
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