narendly commented on a change in pull request #1089:
URL: https://github.com/apache/helix/pull/1089#discussion_r439657386
##########
File path: helix-core/src/main/java/org/apache/helix/manager/zk/ZKUtil.java
##########
@@ -632,4 +634,39 @@ private static RealmAwareZkClient getHelixZkClient(String
zkAddr) {
return DedicatedZkClientFactory.getInstance()
.buildZkClient(new HelixZkClient.ZkConnectionConfig(zkAddr),
clientConfig);
}
+
+ /**
+ * Convert Stat fields into a Map.
+ * private long czxid;
+ * private long mzxid;
+ * private long ctime;
+ * private long mtime;
+ * private int version;
+ * private int cversion;
+ * private int aversion;
+ * private long ephemeralOwner;
+ * private int dataLength;
+ * private int numChildren;
+ * private long pzxid;
+ * @param stat
+ * @return
+ */
+ public static Map<String, String> fromStatToMap(Stat stat) {
Review comment:
@jiajunwang I already did consider this option, but
OutputArchive/serialize is used for different purposes (for real serialization
to an output buffer of sort). This requires more code and adds
complexity/dependency on apache.jute which we don't simply need.
At the end of the day, the Stat function is also hardcoding it, and I'm not
worried about Stat arbitrarily changing internal fields moving forward.
----------------------------------------------------------------
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]
---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]