[jira] Updated: (ZOOKEEPER-555) Add stat information to GetChildrenResponse
[ https://issues.apache.org/jira/browse/ZOOKEEPER-555?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ] Mahadev konar updated ZOOKEEPER-555: Resolution: Fixed Hadoop Flags: [Reviewed] Status: Resolved (was: Patch Available) I just commmited this. thanks arni and pat. Add stat information to GetChildrenResponse --- Key: ZOOKEEPER-555 URL: https://issues.apache.org/jira/browse/ZOOKEEPER-555 Project: Zookeeper Issue Type: Improvement Components: c client, contrib-bindings, java client, server Affects Versions: 3.3.0 Reporter: Árni Már Jónsson Assignee: Árni Már Jónsson Priority: Minor Fix For: 3.3.0 Attachments: getchildren_stat.patch, ZOOKEEPER-555.patch, ZOOKEEPER-555.patch, ZOOKEEPER-555.patch GetChildren() is the only non-create/delete API which does not include the node stat information. I propose that the definition of GetChildren() should be: class GetChildrenResponse { vectorustring children; org.apache.zookeeper.data.Stat stat; } There is a trivial fix to the server (FinalRequestProcessor.java): rsp = new GetChildrenResponse(children, stat); And something similar to the client library. -- This message is automatically generated by JIRA. - You can reply to this email to add a comment to the issue online.
[jira] Updated: (ZOOKEEPER-555) Add stat information to GetChildrenResponse
[ https://issues.apache.org/jira/browse/ZOOKEEPER-555?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ] Árni Már Jónsson updated ZOOKEEPER-555: --- Attachment: ZOOKEEPER-555.patch A patch which adds a second getChildren() function, which in addition to children, returns the parent stat. The main additions are these: * There is a new C callback, strings_stat_completion_t * There are 4 new C API calls: zoo_aget_children2(), zoo_awget_children(), zoo_get_children2(), zoo_wget_children2() * The C client now supports the ls2 command * The C test client has a new test, testGetChildren2() * There is a new Java API callback: Children2Callback() * There are 2 new message: GetChildren2Request(), GetChildren2Response() * There is a new struct StringsAndStat, which is the unit of data transfer in the C/Java API. * There are 4 new Java API calls * There are new tests, and test modifications to the Java unit-tests. The modifications are corresponding calls to getChildren2() alongside a getChildren() call, the return values of which are then compared. There is a new class under the AsyncOps tests, which is mostly equivalent to the getChildren()-calling class. And there is a new test GetChildren2Test.java, which is very similar to the exists() test. Add stat information to GetChildrenResponse --- Key: ZOOKEEPER-555 URL: https://issues.apache.org/jira/browse/ZOOKEEPER-555 Project: Zookeeper Issue Type: Improvement Components: c client, contrib-bindings, java client, server Affects Versions: 3.3.0 Reporter: Árni Már Jónsson Assignee: Árni Már Jónsson Priority: Minor Fix For: 3.3.0 Attachments: getchildren_stat.patch, ZOOKEEPER-555.patch GetChildren() is the only non-create/delete API which does not include the node stat information. I propose that the definition of GetChildren() should be: class GetChildrenResponse { vectorustring children; org.apache.zookeeper.data.Stat stat; } There is a trivial fix to the server (FinalRequestProcessor.java): rsp = new GetChildrenResponse(children, stat); And something similar to the client library. -- This message is automatically generated by JIRA. - You can reply to this email to add a comment to the issue online.
[jira] Updated: (ZOOKEEPER-555) Add stat information to GetChildrenResponse
[ https://issues.apache.org/jira/browse/ZOOKEEPER-555?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ] Árni Már Jónsson updated ZOOKEEPER-555: --- Hadoop Flags: (was: [Incompatible change]) Status: Patch Available (was: Open) Add stat information to GetChildrenResponse --- Key: ZOOKEEPER-555 URL: https://issues.apache.org/jira/browse/ZOOKEEPER-555 Project: Zookeeper Issue Type: Improvement Components: c client, contrib-bindings, java client, server Affects Versions: 3.3.0 Reporter: Árni Már Jónsson Assignee: Árni Már Jónsson Priority: Minor Fix For: 3.3.0 Attachments: getchildren_stat.patch, ZOOKEEPER-555.patch GetChildren() is the only non-create/delete API which does not include the node stat information. I propose that the definition of GetChildren() should be: class GetChildrenResponse { vectorustring children; org.apache.zookeeper.data.Stat stat; } There is a trivial fix to the server (FinalRequestProcessor.java): rsp = new GetChildrenResponse(children, stat); And something similar to the client library. -- This message is automatically generated by JIRA. - You can reply to this email to add a comment to the issue online.
[jira] Updated: (ZOOKEEPER-555) Add stat information to GetChildrenResponse
[ https://issues.apache.org/jira/browse/ZOOKEEPER-555?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ] Patrick Hunt updated ZOOKEEPER-555: --- Attachment: ZOOKEEPER-555.patch This is Arni's patch with the following changes: 1) resolved findbugs issues (on my system at least) 2) fixed the ls2 command in the Java CLI 3) minor changes to the c/java api docs 4) changed ZooDefs.OpCode.getChildren1 back to getChildren as this is a public interface (granted it shouldn't be used by outside code but it is public, safer to keep it the same name) 5) I also removed the StringsAndStat jute type. Not that it was bad, but it wasn't used in the c code and it's not consistent with the current Java api (getData for example). As part of this I removed getChildren2 and overloaded getChildren with Stat param. Better? Worse? Comments? ps. I verified that filling in the stat and the child list is done under a node lock (would be good for any other reviewer to also check my check). Add stat information to GetChildrenResponse --- Key: ZOOKEEPER-555 URL: https://issues.apache.org/jira/browse/ZOOKEEPER-555 Project: Zookeeper Issue Type: Improvement Components: c client, contrib-bindings, java client, server Affects Versions: 3.3.0 Reporter: Árni Már Jónsson Assignee: Árni Már Jónsson Priority: Minor Fix For: 3.3.0 Attachments: getchildren_stat.patch, ZOOKEEPER-555.patch, ZOOKEEPER-555.patch GetChildren() is the only non-create/delete API which does not include the node stat information. I propose that the definition of GetChildren() should be: class GetChildrenResponse { vectorustring children; org.apache.zookeeper.data.Stat stat; } There is a trivial fix to the server (FinalRequestProcessor.java): rsp = new GetChildrenResponse(children, stat); And something similar to the client library. -- This message is automatically generated by JIRA. - You can reply to this email to add a comment to the issue online.
[jira] Updated: (ZOOKEEPER-555) Add stat information to GetChildrenResponse
[ https://issues.apache.org/jira/browse/ZOOKEEPER-555?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ] Patrick Hunt updated ZOOKEEPER-555: --- Status: Patch Available (was: Open) Add stat information to GetChildrenResponse --- Key: ZOOKEEPER-555 URL: https://issues.apache.org/jira/browse/ZOOKEEPER-555 Project: Zookeeper Issue Type: Improvement Components: c client, contrib-bindings, java client, server Affects Versions: 3.3.0 Reporter: Árni Már Jónsson Assignee: Árni Már Jónsson Priority: Minor Fix For: 3.3.0 Attachments: getchildren_stat.patch, ZOOKEEPER-555.patch, ZOOKEEPER-555.patch GetChildren() is the only non-create/delete API which does not include the node stat information. I propose that the definition of GetChildren() should be: class GetChildrenResponse { vectorustring children; org.apache.zookeeper.data.Stat stat; } There is a trivial fix to the server (FinalRequestProcessor.java): rsp = new GetChildrenResponse(children, stat); And something similar to the client library. -- This message is automatically generated by JIRA. - You can reply to this email to add a comment to the issue online.
[jira] Updated: (ZOOKEEPER-555) Add stat information to GetChildrenResponse
[ https://issues.apache.org/jira/browse/ZOOKEEPER-555?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ] Patrick Hunt updated ZOOKEEPER-555: --- Attachment: ZOOKEEPER-555.patch Same patch as previous except that I removed an unnecessary stat copy from original getChildren in finalrequestprocessor Add stat information to GetChildrenResponse --- Key: ZOOKEEPER-555 URL: https://issues.apache.org/jira/browse/ZOOKEEPER-555 Project: Zookeeper Issue Type: Improvement Components: c client, contrib-bindings, java client, server Affects Versions: 3.3.0 Reporter: Árni Már Jónsson Assignee: Árni Már Jónsson Priority: Minor Fix For: 3.3.0 Attachments: getchildren_stat.patch, ZOOKEEPER-555.patch, ZOOKEEPER-555.patch, ZOOKEEPER-555.patch GetChildren() is the only non-create/delete API which does not include the node stat information. I propose that the definition of GetChildren() should be: class GetChildrenResponse { vectorustring children; org.apache.zookeeper.data.Stat stat; } There is a trivial fix to the server (FinalRequestProcessor.java): rsp = new GetChildrenResponse(children, stat); And something similar to the client library. -- This message is automatically generated by JIRA. - You can reply to this email to add a comment to the issue online.
[jira] Updated: (ZOOKEEPER-555) Add stat information to GetChildrenResponse
[ https://issues.apache.org/jira/browse/ZOOKEEPER-555?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ] Patrick Hunt updated ZOOKEEPER-555: --- Status: Patch Available (was: Open) Add stat information to GetChildrenResponse --- Key: ZOOKEEPER-555 URL: https://issues.apache.org/jira/browse/ZOOKEEPER-555 Project: Zookeeper Issue Type: Improvement Components: c client, contrib-bindings, java client, server Affects Versions: 3.3.0 Reporter: Árni Már Jónsson Assignee: Árni Már Jónsson Priority: Minor Fix For: 3.3.0 Attachments: getchildren_stat.patch, ZOOKEEPER-555.patch, ZOOKEEPER-555.patch, ZOOKEEPER-555.patch GetChildren() is the only non-create/delete API which does not include the node stat information. I propose that the definition of GetChildren() should be: class GetChildrenResponse { vectorustring children; org.apache.zookeeper.data.Stat stat; } There is a trivial fix to the server (FinalRequestProcessor.java): rsp = new GetChildrenResponse(children, stat); And something similar to the client library. -- This message is automatically generated by JIRA. - You can reply to this email to add a comment to the issue online.
[jira] Updated: (ZOOKEEPER-555) Add stat information to GetChildrenResponse
[ https://issues.apache.org/jira/browse/ZOOKEEPER-555?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ] Patrick Hunt updated ZOOKEEPER-555: --- Status: Patch Available (was: Open) Add stat information to GetChildrenResponse --- Key: ZOOKEEPER-555 URL: https://issues.apache.org/jira/browse/ZOOKEEPER-555 Project: Zookeeper Issue Type: Improvement Components: c client, contrib-bindings, java client, server Affects Versions: 3.3.0 Reporter: Árni Már Jónsson Assignee: Árni Már Jónsson Priority: Minor Fix For: 3.3.0 Attachments: getchildren_stat.patch, ZOOKEEPER-555.patch, ZOOKEEPER-555.patch, ZOOKEEPER-555.patch GetChildren() is the only non-create/delete API which does not include the node stat information. I propose that the definition of GetChildren() should be: class GetChildrenResponse { vectorustring children; org.apache.zookeeper.data.Stat stat; } There is a trivial fix to the server (FinalRequestProcessor.java): rsp = new GetChildrenResponse(children, stat); And something similar to the client library. -- This message is automatically generated by JIRA. - You can reply to this email to add a comment to the issue online.
[jira] Updated: (ZOOKEEPER-555) Add stat information to GetChildrenResponse
[ https://issues.apache.org/jira/browse/ZOOKEEPER-555?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ] Patrick Hunt updated ZOOKEEPER-555: --- Status: Open (was: Patch Available) Add stat information to GetChildrenResponse --- Key: ZOOKEEPER-555 URL: https://issues.apache.org/jira/browse/ZOOKEEPER-555 Project: Zookeeper Issue Type: Improvement Components: c client, contrib-bindings, java client, server Affects Versions: 3.3.0 Reporter: Árni Már Jónsson Assignee: Árni Már Jónsson Priority: Minor Fix For: 3.3.0 Attachments: getchildren_stat.patch, ZOOKEEPER-555.patch, ZOOKEEPER-555.patch, ZOOKEEPER-555.patch GetChildren() is the only non-create/delete API which does not include the node stat information. I propose that the definition of GetChildren() should be: class GetChildrenResponse { vectorustring children; org.apache.zookeeper.data.Stat stat; } There is a trivial fix to the server (FinalRequestProcessor.java): rsp = new GetChildrenResponse(children, stat); And something similar to the client library. -- This message is automatically generated by JIRA. - You can reply to this email to add a comment to the issue online.
[jira] Updated: (ZOOKEEPER-555) Add stat information to GetChildrenResponse
[ https://issues.apache.org/jira/browse/ZOOKEEPER-555?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ] Árni Már Jónsson updated ZOOKEEPER-555: --- Attachment: getchildren_stat.patch getchildren stat patch Add stat information to GetChildrenResponse --- Key: ZOOKEEPER-555 URL: https://issues.apache.org/jira/browse/ZOOKEEPER-555 Project: Zookeeper Issue Type: Improvement Components: c client, contrib-bindings, java client, server Affects Versions: 3.3.0 Reporter: Árni Már Jónsson Priority: Minor Fix For: 3.3.0 Attachments: getchildren_stat.patch GetChildren() is the only non-create/delete API which does not include the node stat information. I propose that the definition of GetChildren() should be: class GetChildrenResponse { vectorustring children; org.apache.zookeeper.data.Stat stat; } There is a trivial fix to the server (FinalRequestProcessor.java): rsp = new GetChildrenResponse(children, stat); And something similar to the client library. -- This message is automatically generated by JIRA. - You can reply to this email to add a comment to the issue online.
[jira] Updated: (ZOOKEEPER-555) Add stat information to GetChildrenResponse
[ https://issues.apache.org/jira/browse/ZOOKEEPER-555?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ] Árni Már Jónsson updated ZOOKEEPER-555: --- Fix Version/s: 3.3.0 Affects Version/s: 3.3.0 Release Note: Changes required to have Stat returned with get_children(). Status: Patch Available (was: Open) Patch for server part (simple), and C client library (complicated). Tested this using the Python bindings (I have a separate patch for those if there is interest). Add stat information to GetChildrenResponse --- Key: ZOOKEEPER-555 URL: https://issues.apache.org/jira/browse/ZOOKEEPER-555 Project: Zookeeper Issue Type: Improvement Components: c client, contrib-bindings, java client, server Affects Versions: 3.3.0 Reporter: Árni Már Jónsson Priority: Minor Fix For: 3.3.0 Attachments: getchildren_stat.patch GetChildren() is the only non-create/delete API which does not include the node stat information. I propose that the definition of GetChildren() should be: class GetChildrenResponse { vectorustring children; org.apache.zookeeper.data.Stat stat; } There is a trivial fix to the server (FinalRequestProcessor.java): rsp = new GetChildrenResponse(children, stat); And something similar to the client library. -- This message is automatically generated by JIRA. - You can reply to this email to add a comment to the issue online.
[jira] Updated: (ZOOKEEPER-555) Add stat information to GetChildrenResponse
[ https://issues.apache.org/jira/browse/ZOOKEEPER-555?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ] Patrick Hunt updated ZOOKEEPER-555: --- Assignee: Árni Már Jónsson Status: Open (was: Patch Available) I think this is a reasonable thing to add. Could you explain the use case where this is necessary? However there are some issues with the patch that need to be addressed: 1) we require all changes in minor/fix releases to be b/w compatible and generally we try to do non-b/w compatible changes very infrequently. When you are running a highly available/reliable service you don't want to have to tell ppl shutdown upgrade all of your servers and clients when you upgrade to this version. The changes as currently implemented change both the API and wire protocol for existing functionality, this is not something we can accept. However, a simple workaround would be to add a new protocol (jute) type, and additional functions/callbacks to support getting children including the stat. Take a look at zoo_set2 in the c source, this is an example where simliar issue has happened before (although in that case jute had the stat, we just weren't providing it to the user as part of the api for zoo_set, so zoo_set2 was added). So *get_children2(... in the C case and probably just overload getChildren in java to have additional Stat param tacked onto the end. 2) there need to be tests included in the patch that verify this functionality 3) no tabs in the source, spaces only for indentation *Note to reviewer*: ensure that the implementation ensures that the version fields in the stat correspond to the child list returned (ie they are the same version, this is important if ppl start using the cversion correlated with the child list itself) Add stat information to GetChildrenResponse --- Key: ZOOKEEPER-555 URL: https://issues.apache.org/jira/browse/ZOOKEEPER-555 Project: Zookeeper Issue Type: Improvement Components: c client, contrib-bindings, java client, server Affects Versions: 3.3.0 Reporter: Árni Már Jónsson Assignee: Árni Már Jónsson Priority: Minor Fix For: 3.3.0 Attachments: getchildren_stat.patch GetChildren() is the only non-create/delete API which does not include the node stat information. I propose that the definition of GetChildren() should be: class GetChildrenResponse { vectorustring children; org.apache.zookeeper.data.Stat stat; } There is a trivial fix to the server (FinalRequestProcessor.java): rsp = new GetChildrenResponse(children, stat); And something similar to the client library. -- This message is automatically generated by JIRA. - You can reply to this email to add a comment to the issue online.