-
Notifications
You must be signed in to change notification settings - Fork 26.4k
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
Conversation
throw new NullPointerException("Both Runnable and Executor can not be null!"); | ||
} | ||
if (executor == null) { | ||
executor = DEFAULT_EXECUTOR; |
There was a problem hiding this comment.
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!"); |
There was a problem hiding this comment.
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(); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
这个地方要用 logger 输出
已修正 @qinliujie |
Optimize zookeeper block logic on app startup
No description provided.