narendly commented on a change in pull request #534: Draft proposal of method
signature for ZK custom serializer
URL: https://github.com/apache/helix/pull/534#discussion_r341783440
##########
File path:
helix-core/src/main/java/org/apache/helix/manager/zk/ZkBaseDataAccessor.java
##########
@@ -101,6 +104,54 @@ public boolean create(String path, T record, int options)
{
return result._retCode == RetCode.OK;
}
+ public AccessResult retryUntilCreated(String path, Object record, int
options, final ZkSerializer zkSerializer) {
+ AccessResult result = new AccessResult();
+ CreateMode mode = AccessOption.getMode(options);
+ if (mode == null) {
+ LOG.error("Invalid create mode. options: " + options);
+ result._retCode = RetCode.ERROR;
+ return result;
+ }
+
+ boolean retry;
+ do {
+ retry = false;
+ try {
+ _zkClient.create(path, record, ZooDefs.Ids.OPEN_ACL_UNSAFE, mode,
zkSerializer);
Review comment:
This is different from what we discussed.
What we agreed on was to have another HelixZkClient that uses a "dummy"
serializer, correct? And we add the serialization logic in `create(String path,
T record, int options, ZkSerializer zkSerializer)`?
----------------------------------------------------------------
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
For queries about this service, please contact Infrastructure at:
[email protected]
With regards,
Apache Git Services
---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]