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

Optimize zookeeper block logic on app startup #790

Merged
merged 5 commits into from
Oct 31, 2017
Merged

Optimize zookeeper block logic on app startup #790

merged 5 commits into from
Oct 31, 2017

Conversation

chickenlj
Copy link
Contributor

No description provided.

throw new NullPointerException("Both Runnable and Executor can not be null!");
}
if (executor == null) {
executor = DEFAULT_EXECUTOR;
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

这个地方与之前的行为不一致,建议是传参数的时候,显示的传递 DEFAULT_EXECUTOR

}
started = true;
} else {
throw new IllegalStateException("Zkclient has already been started!");
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

重复初始化直接跳过应该会比较好一些

client = listenableFutureTask.get();
client.subscribeStateChanges(listener);
} catch (InterruptedException e) {
e.printStackTrace();
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

这个地方要用 logger 输出

@chickenlj
Copy link
Contributor Author

已修正 @qinliujie

@chickenlj chickenlj merged commit 74ff1b6 into apache:master Oct 31, 2017
rolandhe pushed a commit to rolandhe/dubbo that referenced this pull request Sep 9, 2019
Optimize zookeeper block logic on app startup
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

Successfully merging this pull request may close these issues.

2 participants