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

[INLONG-101] Optimize code & Fix type #700

Closed
dockerzhang opened this issue Jul 28, 2021 · 0 comments
Closed

[INLONG-101] Optimize code & Fix type #700

dockerzhang opened this issue Jul 28, 2021 · 0 comments

Comments

@dockerzhang
Copy link
Contributor

1. Optimize code

if (addrMap4Failover.get(tmpNodeAddrInfo.getHostPortStr()) == null) {
addrMap4Failover.put(tmpNodeAddrInfo.getHostPortStr(), tmpNodeAddrInfo);
}

Change to

addrMap4Failover.putIfAbsent(tmpNodeAddrInfo.getHostPortStr(), tmpNodeAddrInfo);

2. Fix type
getParameteres -> getParameters
datestring -> dateString
setunFlushDataHold -> setUnflushDataHold
getunFlushDataHold -> getUnflushDataHold

Because I do n’t know whether it will affect other components, such as log parsing, etc., I did not change it here

.append(",\"unFlushDataHold\":").append(getUnflushDataHold())
JIRA link - [INLONG-101] created by viviel
@dockerzhang dockerzhang added this to the 0.5.0 milestone Jul 28, 2021
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant