This is an automated email from the ASF dual-hosted git repository.
zhaoqingran pushed a commit to branch master
in repository https://gitbox.apache.org/repos/asf/hertzbeat.git
The following commit(s) were added to refs/heads/master by this push:
new 264d24ebd Remove and translate chinese to english in code (#1816)
264d24ebd is described below
commit 264d24ebdca17f0f45399bac86b07059bc37eb9a
Author: Hyeon Sung <[email protected]>
AuthorDate: Tue Apr 23 15:49:54 2024 +0900
Remove and translate chinese to english in code (#1816)
Signed-off-by: Hyeon Sung <[email protected]>
Co-authored-by: Logic <[email protected]>
---
.../collector/collect/pop3/Pop3CollectImpl.java | 16 ++++++++--------
1 file changed, 8 insertions(+), 8 deletions(-)
diff --git
a/collector/src/main/java/org/apache/hertzbeat/collector/collect/pop3/Pop3CollectImpl.java
b/collector/src/main/java/org/apache/hertzbeat/collector/collect/pop3/Pop3CollectImpl.java
index 1feb155ea..43c67d958 100644
---
a/collector/src/main/java/org/apache/hertzbeat/collector/collect/pop3/Pop3CollectImpl.java
+++
b/collector/src/main/java/org/apache/hertzbeat/collector/collect/pop3/Pop3CollectImpl.java
@@ -107,7 +107,7 @@ public class Pop3CollectImpl extends AbstractCollect {
}
/**
- * 校验参数
+ * validate parameters
* @param metrics metrics
* @throws Exception exception
*/
@@ -119,7 +119,7 @@ public class Pop3CollectImpl extends AbstractCollect {
}
/**
- * 创建POP3连接【支持SSL加密】
+ * create a POP3 connection【 with SSL encryption support 】
* @param pop3Protocol pop3 Protocol
* @param ssl ssl
* @return return
@@ -127,23 +127,23 @@ public class Pop3CollectImpl extends AbstractCollect {
*/
private POP3Client createPOP3Client(Pop3Protocol pop3Protocol, boolean
ssl) throws Exception {
POP3Client pop3Client = null;
- // 判断是否启用 SSL 加密连接
+ // determine whether to use SSL-encrypted connections
if (ssl) {
pop3Client = new POP3SClient(true);
} else {
pop3Client = new POP3Client();
}
- // 设置超时时间
+ // set timeout
int timeout = Integer.parseInt(pop3Protocol.getTimeout());
if (timeout > 0) {
pop3Client.setConnectTimeout(timeout);
}
pop3Client.setCharset(StandardCharsets.UTF_8);
- // 连接到POP3服务器
+ // connect to the POP3 server
String host = pop3Protocol.getHost();
int port = Integer.parseInt(pop3Protocol.getPort());
pop3Client.connect(host, port);
- // 验证凭据
+ // validate credentials
String email = pop3Protocol.getEmail();
String authorize = pop3Protocol.getAuthorize();
boolean isAuthenticated = pop3Client.login(email, authorize);
@@ -154,7 +154,7 @@ public class Pop3CollectImpl extends AbstractCollect {
}
/**
- * 获取Pop3指标信息
+ * retrieve Pop3 metric information
* @param builder builder
* @param pop3Client pop3 client
* @param aliasFields alias Fields
@@ -187,7 +187,7 @@ public class Pop3CollectImpl extends AbstractCollect {
double mailboxSize = 0.0;
if (status != null) {
emailCount = status.number;
- // byte -> kb
+ // bytes to KB
mailboxSize = (double) status.size / 1024.0;
pop3Metrics.put(EMAIL_COUNT, emailCount);
pop3Metrics.put(MAILBOX_SIZE, mailboxSize);
---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]