You are viewing a plain text version of this content. The canonical link for it is here.
Posted to issues@ozone.apache.org by GitBox <gi...@apache.org> on 2022/04/06 12:40:20 UTC

[GitHub] [ozone] szetszwo commented on a diff in pull request #2574: HDDS-5666. Add option to createKey via streaming api in Freon

szetszwo commented on code in PR #2574:
URL: https://github.com/apache/ozone/pull/2574#discussion_r843900603


##########
hadoop-ozone/tools/src/main/java/org/apache/hadoop/ozone/freon/OzoneClientKeyGenerator.java:
##########
@@ -93,6 +103,9 @@ public Void call() throws Exception {
 
     contentGenerator = new ContentGenerator(keySize, bufferSize);
     metadata = new HashMap<>();
+    replicationConfig = ReplicationConfig

Review Comment:
   @sadanand48 , let's hardcode replicationConfig in createStreamKey(..) for the moment.  We may change it later if there is a need.
   ```
     private void createStreamKey(long counter) throws Exception {
       final ReplicationConfig replicationConfig = ReplicationConfig
           .fromProtoTypeAndFactor(HddsProtos.ReplicationType.RATIS,
               HddsProtos.ReplicationFactor.THREE);
       final String key = generateObjectName(counter);
   
       timer.time(() -> {
         try (OzoneDataStreamOutput stream = bucket
             .createStreamKey(key, keySize, replicationConfig, metadata)) {
           contentGenerator.write(stream);
         }
         return null;
       });
     }
   ```



-- 
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: issues-unsubscribe@ozone.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


---------------------------------------------------------------------
To unsubscribe, e-mail: issues-unsubscribe@ozone.apache.org
For additional commands, e-mail: issues-help@ozone.apache.org