xichen01 commented on code in PR #6037:
URL: https://github.com/apache/ozone/pull/6037#discussion_r1466521050
##########
hadoop-ozone/tools/src/main/java/org/apache/hadoop/ozone/freon/OmMetadataGenerator.java:
##########
@@ -326,8 +339,18 @@ private void applyOperation(long counter) throws Exception
{
case CREATE_KEY:
keyName = getPath(counter);
getMetrics().timer(operation.name()).time(() -> {
- try (OutputStream stream = bucket.createStreamKey(keyName,
- dataSize.toBytes(), replicationConfig, new HashMap<>())) {
+ try (OutputStream stream = bucket.createKey(keyName,
+ dataSize.toBytes())) {
+ contentGenerator.write(stream);
+ }
+ return null;
+ });
+ break;
+ case CREATE_STREAM_KEY:
+ keyName = getPath(counter);
+ getMetrics().timer(operation.name()).time(() -> {
+ try (OzoneDataStreamOutput stream = bucket.createStreamKey(
+ keyName, dataSize.toBytes(), defaultReplicationConfig,
Collections.emptyMap())) {
Review Comment:
Mainly for explicit control of parameters.
--
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]