Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

# Zookeeper管理 点刷新提示数值转换出错 java.lang.NumberFormatException: For input … #1062

Open
wants to merge 1 commit into
base: master
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -185,9 +185,11 @@ public void collectorServerStat(String address) {
} else if (line.contains(STRING_LATENCY)) {
List<String> latency = Arrays.asList(StringUtils.trimToEmpty(line.replace(STRING_LATENCY,
StringUtils.EMPTY)).split("/"));
summary.setMinLatency(Long.parseLong(latency.get(0)));
summary.setAvgLatency(Long.parseLong(latency.get(1)));
summary.setMaxLatency(Long.parseLong(latency.get(2)));
//解决java.lang.NumberFormatException: For input string: "4.0"
summary.setMinLatency((long)Double.parseDouble(latency.get(0)));
summary.setAvgLatency((long)Double.parseDouble(latency.get(1)));
summary.setMaxLatency((long)Double.parseDouble(latency.get(2)));

} else if (line.contains(STRING_OUTSTANDING)) {
summary.setQueued(Long.parseLong(StringUtils.trimToEmpty(line.replace(STRING_OUTSTANDING,
StringUtils.EMPTY))));
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -400,11 +400,11 @@ protected void doInTransactionWithoutResult(TransactionStatus status) {
ddlSync &= pipeline.getParameters().getDdlSync();
}

if (ddlSync) {
if (ddlSync) {//Pipeline 只能有一个勾选:支持ddl同步
throw new InvalidConfigureException(INVALID_TYPE.DDL);
}

if (homeSync) {
if (homeSync) {//Pipeline 只能有一个勾选:主站点
throw new InvalidConfigureException(INVALID_TYPE.HOME);
}
}
Expand Down