[jira] Commented: (ZOOKEEPER-779) C Client should check the connectivity to the hosts in zookeeper_init
[ https://issues.apache.org/jira/browse/ZOOKEEPER-779?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanelfocusedCommentId=12871018#action_12871018 ] Hadoop QA commented on ZOOKEEPER-779: - -1 overall. Here are the results of testing the latest attachment http://issues.apache.org/jira/secure/attachment/12445423/ZOOKEEPER-779.patch against trunk revision 947063. +1 @author. The patch does not contain any @author tags. -1 tests included. The patch doesn't appear to include any new or modified tests. Please justify why no tests are needed for this patch. +1 javadoc. The javadoc tool did not generate any warning messages. +1 javac. The applied patch does not increase the total number of javac compiler warnings. +1 findbugs. The patch does not introduce any new Findbugs warnings. +1 release audit. The applied patch does not increase the total number of release audit warnings. -1 core tests. The patch failed core unit tests. +1 contrib tests. The patch passed contrib unit tests. Test results: http://hudson.zones.apache.org/hudson/job/Zookeeper-Patch-h1.grid.sp2.yahoo.net/105/testReport/ Findbugs warnings: http://hudson.zones.apache.org/hudson/job/Zookeeper-Patch-h1.grid.sp2.yahoo.net/105/artifact/trunk/build/test/findbugs/newPatchFindbugsWarnings.html Console output: http://hudson.zones.apache.org/hudson/job/Zookeeper-Patch-h1.grid.sp2.yahoo.net/105/console This message is automatically generated. C Client should check the connectivity to the hosts in zookeeper_init - Key: ZOOKEEPER-779 URL: https://issues.apache.org/jira/browse/ZOOKEEPER-779 Project: Zookeeper Issue Type: Improvement Components: c client Affects Versions: 3.3.1 Reporter: Qian Ye Attachments: ZOOKEEPER-779.patch, ZOOKEEPER-779.patch In some scenario, whether the client can connect to zookeeper servers is used as a logic condition. If the client cannot connect to the servers, the program should turn to another fork. However, current zookeeper_init could not tell whether the client can connect to one server or not. It could make some users feel confused. I think we should check the connectivity to the host in zookeeper_init, so we can tell whether the hosts are avaiable at that time or not. -- This message is automatically generated by JIRA. - You can reply to this email to add a comment to the issue online.
[jira] Commented: (ZOOKEEPER-779) C Client should check the connectivity to the hosts in zookeeper_init
[ https://issues.apache.org/jira/browse/ZOOKEEPER-779?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanelfocusedCommentId=12871222#action_12871222 ] Patrick Hunt commented on ZOOKEEPER-779: Qian, hudson has been having problems for the last week or two - I think this is a false positive failure. I've contacted Apache to look into what's wrong on the hudson machines but so far we've not heard back. C Client should check the connectivity to the hosts in zookeeper_init - Key: ZOOKEEPER-779 URL: https://issues.apache.org/jira/browse/ZOOKEEPER-779 Project: Zookeeper Issue Type: Improvement Components: c client Affects Versions: 3.3.1 Reporter: Qian Ye Attachments: ZOOKEEPER-779.patch, ZOOKEEPER-779.patch In some scenario, whether the client can connect to zookeeper servers is used as a logic condition. If the client cannot connect to the servers, the program should turn to another fork. However, current zookeeper_init could not tell whether the client can connect to one server or not. It could make some users feel confused. I think we should check the connectivity to the host in zookeeper_init, so we can tell whether the hosts are avaiable at that time or not. -- This message is automatically generated by JIRA. - You can reply to this email to add a comment to the issue online.
[jira] Commented: (ZOOKEEPER-779) C Client should check the connectivity to the hosts in zookeeper_init
[ https://issues.apache.org/jira/browse/ZOOKEEPER-779?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanelfocusedCommentId=12871232#action_12871232 ] Patrick Hunt commented on ZOOKEEPER-779: I took a look at the patch, I don't see a big problem with this but I'm a little concerned about changing the semantics of zookeeper_init. Really I'd like to see us move to the strategy pattern directly rather than take a smaller step that ppl come to rely on and then we end up having to support (or break) going fwd. Qian I'm assuming this is working ok for you, but would you be interested in fleshing out the design of the strategy pattern and putting together a patch for that? C Client should check the connectivity to the hosts in zookeeper_init - Key: ZOOKEEPER-779 URL: https://issues.apache.org/jira/browse/ZOOKEEPER-779 Project: Zookeeper Issue Type: Improvement Components: c client Affects Versions: 3.3.1 Reporter: Qian Ye Attachments: ZOOKEEPER-779.patch, ZOOKEEPER-779.patch In some scenario, whether the client can connect to zookeeper servers is used as a logic condition. If the client cannot connect to the servers, the program should turn to another fork. However, current zookeeper_init could not tell whether the client can connect to one server or not. It could make some users feel confused. I think we should check the connectivity to the host in zookeeper_init, so we can tell whether the hosts are avaiable at that time or not. -- This message is automatically generated by JIRA. - You can reply to this email to add a comment to the issue online.
[jira] Commented: (ZOOKEEPER-779) C Client should check the connectivity to the hosts in zookeeper_init
[ https://issues.apache.org/jira/browse/ZOOKEEPER-779?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanelfocusedCommentId=12871474#action_12871474 ] Qian Ye commented on ZOOKEEPER-779: --- OK Patrick, however I'm really busy these days, it may take a week or two before I can make it done. C Client should check the connectivity to the hosts in zookeeper_init - Key: ZOOKEEPER-779 URL: https://issues.apache.org/jira/browse/ZOOKEEPER-779 Project: Zookeeper Issue Type: Improvement Components: c client Affects Versions: 3.3.1 Reporter: Qian Ye Attachments: ZOOKEEPER-779.patch, ZOOKEEPER-779.patch In some scenario, whether the client can connect to zookeeper servers is used as a logic condition. If the client cannot connect to the servers, the program should turn to another fork. However, current zookeeper_init could not tell whether the client can connect to one server or not. It could make some users feel confused. I think we should check the connectivity to the host in zookeeper_init, so we can tell whether the hosts are avaiable at that time or not. -- This message is automatically generated by JIRA. - You can reply to this email to add a comment to the issue online.
[jira] Commented: (ZOOKEEPER-779) C Client should check the connectivity to the hosts in zookeeper_init
[ https://issues.apache.org/jira/browse/ZOOKEEPER-779?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanelfocusedCommentId=12870515#action_12870515 ] Patrick Hunt commented on ZOOKEEPER-779: Perhaps you could comment further - if you had such a feature what would do with the information? What do you mean by check connectivity? Is this just for reporting (client log), or something else (ie would you want to run code in these cases)? Recently I've been thinking we should introduce a way for users to easily select how the client connects to a server (the zk ensemble). A 'strategy' pattern might work well here. We already have two strategies - round robin and shuffled round robin. We could allow user implemented strategies - this would allow for the type of feature you are requesting. You could implement your own strategy (or extend the existing ones). For example, there have been requests to have the client connect to the closest or least loaded server. Strategies could be implemented for these fairly easily (measure latency and session load respectively say). Shouldn't be too hard to implement either - some though on the design of the interface, but mainly refactoring what we currently have to make it more modular. C Client should check the connectivity to the hosts in zookeeper_init - Key: ZOOKEEPER-779 URL: https://issues.apache.org/jira/browse/ZOOKEEPER-779 Project: Zookeeper Issue Type: Improvement Components: c client Affects Versions: 3.3.1 Reporter: Qian Ye In some scenario, whether the client can connect to zookeeper servers is used as a logic condition. If the client cannot connect to the servers, the program should turn to another fork. However, current zookeeper_init could not tell whether the client can connect to one server or not. It could make some users feel confused. I think we should check the connectivity to the host in zookeeper_init, so we can tell whether the hosts are avaiable at that time or not. -- This message is automatically generated by JIRA. - You can reply to this email to add a comment to the issue online.
[jira] Commented: (ZOOKEEPER-779) C Client should check the connectivity to the hosts in zookeeper_init
[ https://issues.apache.org/jira/browse/ZOOKEEPER-779?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanelfocusedCommentId=12870545#action_12870545 ] Qian Ye commented on ZOOKEEPER-779: --- By check connectivity, I mean check whether client can connect to a zookeeper server which is listed in the parameters. In my usage, zookeeper is used to store some meta infomation. The logic flow of my app is that if it can connect to the zookeeper, then obtain the meta info from zookeeper, or obtain it from local file. Becuase the connection to the zookeeper server is not initialized when the zookeeper_init return (mt version), I used to make my app sleep a few seconds to make sure the connection is initialized, however, if the hosts list contains some invalid servers address, the sleep time is hard to estimate. I cannot take the initialization method used in load_gen.c, because in some situation, I want my app read meta info from local file by give a wrong host to zookeepr_init. In a word, I just want zookeeper_init to check, whether at least one zookeeper server in the host list is avaiable at the connecting time. I have made a patch for this issue, could you like to check it out? Anyway, a strategy pattern for connection would be great, I think we should to that. C Client should check the connectivity to the hosts in zookeeper_init - Key: ZOOKEEPER-779 URL: https://issues.apache.org/jira/browse/ZOOKEEPER-779 Project: Zookeeper Issue Type: Improvement Components: c client Affects Versions: 3.3.1 Reporter: Qian Ye In some scenario, whether the client can connect to zookeeper servers is used as a logic condition. If the client cannot connect to the servers, the program should turn to another fork. However, current zookeeper_init could not tell whether the client can connect to one server or not. It could make some users feel confused. I think we should check the connectivity to the host in zookeeper_init, so we can tell whether the hosts are avaiable at that time or not. -- This message is automatically generated by JIRA. - You can reply to this email to add a comment to the issue online.
[jira] Commented: (ZOOKEEPER-779) C Client should check the connectivity to the hosts in zookeeper_init
[ https://issues.apache.org/jira/browse/ZOOKEEPER-779?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanelfocusedCommentId=12870714#action_12870714 ] Patrick Hunt commented on ZOOKEEPER-779: Sure, attach a patch if you'd like someone to review. What happens if there is a temporary glitch, immediately after you call init the client can connect to the ensemble, what do you do then? Also, what happens if the local file meta information is out of sync with what's in ZK, it could be the case that a subset of clients (the ones not connected to the ensemble) would be operating differently from the connected clients, no? Btw, I'm asking these questions not to give you a hard time but because I've seen others try to do this before, and it's tricky to get right. :-) C Client should check the connectivity to the hosts in zookeeper_init - Key: ZOOKEEPER-779 URL: https://issues.apache.org/jira/browse/ZOOKEEPER-779 Project: Zookeeper Issue Type: Improvement Components: c client Affects Versions: 3.3.1 Reporter: Qian Ye In some scenario, whether the client can connect to zookeeper servers is used as a logic condition. If the client cannot connect to the servers, the program should turn to another fork. However, current zookeeper_init could not tell whether the client can connect to one server or not. It could make some users feel confused. I think we should check the connectivity to the host in zookeeper_init, so we can tell whether the hosts are avaiable at that time or not. -- This message is automatically generated by JIRA. - You can reply to this email to add a comment to the issue online.
[jira] Commented: (ZOOKEEPER-779) C Client should check the connectivity to the hosts in zookeeper_init
[ https://issues.apache.org/jira/browse/ZOOKEEPER-779?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanelfocusedCommentId=12870946#action_12870946 ] Qian Ye commented on ZOOKEEPER-779: --- Thx Patrick, i see your point. Here is some explanation. The temporary glitch at the starting time will not lead to any harmful result in my system. This kind of glitch will be recorded in the log file, so some monitor process will notice that. Moreover, the absence of local meta file or out of sync will not lead to any harmful result either. In a word, my system should be able to keep running without zookeeper providing the latest meta info. I would attach my patch soon :-) C Client should check the connectivity to the hosts in zookeeper_init - Key: ZOOKEEPER-779 URL: https://issues.apache.org/jira/browse/ZOOKEEPER-779 Project: Zookeeper Issue Type: Improvement Components: c client Affects Versions: 3.3.1 Reporter: Qian Ye In some scenario, whether the client can connect to zookeeper servers is used as a logic condition. If the client cannot connect to the servers, the program should turn to another fork. However, current zookeeper_init could not tell whether the client can connect to one server or not. It could make some users feel confused. I think we should check the connectivity to the host in zookeeper_init, so we can tell whether the hosts are avaiable at that time or not. -- This message is automatically generated by JIRA. - You can reply to this email to add a comment to the issue online.
[jira] Commented: (ZOOKEEPER-779) C Client should check the connectivity to the hosts in zookeeper_init
[ https://issues.apache.org/jira/browse/ZOOKEEPER-779?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanelfocusedCommentId=12870998#action_12870998 ] Hadoop QA commented on ZOOKEEPER-779: - -1 overall. Here are the results of testing the latest attachment http://issues.apache.org/jira/secure/attachment/12445417/ZOOKEEPER-779.patch against trunk revision 947063. +1 @author. The patch does not contain any @author tags. -1 tests included. The patch doesn't appear to include any new or modified tests. Please justify why no tests are needed for this patch. -1 patch. The patch command could not apply the patch. Console output: http://hudson.zones.apache.org/hudson/job/Zookeeper-Patch-h1.grid.sp2.yahoo.net/104/console This message is automatically generated. C Client should check the connectivity to the hosts in zookeeper_init - Key: ZOOKEEPER-779 URL: https://issues.apache.org/jira/browse/ZOOKEEPER-779 Project: Zookeeper Issue Type: Improvement Components: c client Affects Versions: 3.3.1 Reporter: Qian Ye Attachments: ZOOKEEPER-779.patch In some scenario, whether the client can connect to zookeeper servers is used as a logic condition. If the client cannot connect to the servers, the program should turn to another fork. However, current zookeeper_init could not tell whether the client can connect to one server or not. It could make some users feel confused. I think we should check the connectivity to the host in zookeeper_init, so we can tell whether the hosts are avaiable at that time or not. -- This message is automatically generated by JIRA. - You can reply to this email to add a comment to the issue online.