errose28 commented on code in PR #3226:
URL: https://github.com/apache/ozone/pull/3226#discussion_r866364391
##########
hadoop-ozone/interface-client/src/main/proto/OmClientProtocol.proto:
##########
@@ -1027,6 +1027,7 @@ message OpenKeyBucket {
message OpenKey {
required string name = 1;
required uint64 clientID = 2;
+ optional uint64 parentID = 3;
Review Comment:
Why are we tracking parent ID here, instead of just putting the open key DB
name as the name field? [This
comment](https://github.com/apache/ozone/pull/3226#discussion_r843435126) made
it sound like we were just tracking the name as it appears in the open key/file
table. Also I think we would need a field to indicate which table (key or file)
this key must be retrieved from.
##########
hadoop-ozone/ozone-manager/src/main/java/org/apache/hadoop/ozone/om/OmMetadataManagerImpl.java:
##########
@@ -585,6 +587,12 @@ public String getOpenKey(String volume, String bucket,
return openKey;
}
+ private static long getClientID(String dbOpenKeyName) {
+ int beginIndex = dbOpenKeyName.lastIndexOf(OM_KEY_PREFIX) + 1;
+ String clientID = dbOpenKeyName.substring(beginIndex);
+ return Long.parseLong(clientID);
Review Comment:
I'm not sure client ID is always a long. I've seen strings used in tests at
least. Can we leave it as a string?
--
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.
To unsubscribe, e-mail: [email protected]
For queries about this service, please contact Infrastructure at:
[email protected]
---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]