In ZooKeeper, Could I use async getData() on a non-exist znode?
Even I called exists() method, I should check Code.NoNode too.
Thus could I use getData() method directly?
I notice the sync getData() will throw exception if node does not exist. Thus will I got any penalty on performance or other aspect if I called an async getData on a n开发者_如何学Goon-exist znode?
Thank you!
If you want to get the content of the znode you should use getData instead of using exists and then getData.
Because anyway you should check for Code.NoNode after getting response from getData. So why don't call it directly?
精彩评论