adoroszlai commented on code in PR #6385:
URL: https://github.com/apache/ozone/pull/6385#discussion_r1590731732
##########
hadoop-ozone/client/src/main/java/org/apache/hadoop/ozone/client/OzoneKey.java:
##########
@@ -74,11 +74,18 @@ public class OzoneKey {
* Constructs OzoneKey from OmKeyInfo.
*
*/
Review Comment:
This comment belongs to the constructor below the new member var.
##########
hadoop-ozone/client/src/main/java/org/apache/hadoop/ozone/client/rpc/RpcClient.java:
##########
@@ -1671,7 +1708,8 @@ public List<OzoneKey> listKeys(String volumeName, String
bucketName,
key.getModificationTime(),
key.getReplicationConfig(),
key.isFile(),
- key.getOwnerName()))
+ key.getOwnerName(),
+ key.getGeneration()))
Review Comment:
I guess `generation` will always be missing here. Any OM new enough to
support atomic overwrite also has the `LIGHTWEIGHT_LIST_KEYS` feature, thus the
first branch will be executed.
If we want to avoid adding generation to the lighter-weight key info used
for listing, I think it's probably enough to return generation only for
`getKeyDetails`, not for `listKeys`.
##########
hadoop-ozone/client/src/main/java/org/apache/hadoop/ozone/client/rpc/RpcClient.java:
##########
@@ -1431,6 +1412,62 @@ public OzoneOutputStream createKey(
return createOutputStream(openKey);
}
+ @Override
+ public OzoneOutputStream rewriteKey(String volumeName, String bucketName,
String keyName,
+ long size, long existingKeyGeneration, ReplicationConfig
replicationConfig,
+ Map<String, String> metadata) throws IOException {
+ if (keyName == null) {
+ throw new IllegalArgumentException("Key cannot be null");
+ }
Review Comment:
This is also checked in `createKeyPreChecks`.
--
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]