SaketaChalamchala commented on code in PR #8483:
URL: https://github.com/apache/ozone/pull/8483#discussion_r2130044507


##########
hadoop-ozone/freon/src/main/java/org/apache/hadoop/ozone/freon/SnapshotGenerator.java:
##########
@@ -0,0 +1,108 @@
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one or more
+ * contributor license agreements. See the NOTICE file distributed with
+ * this work for additional information regarding copyright ownership.
+ * The ASF licenses this file to You under the Apache License, Version 2.0
+ * (the "License"); you may not use this file except in compliance with
+ * the License. You may obtain a copy of the License at
+ *
+ *      http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+
+package org.apache.hadoop.ozone.freon;
+
+import com.google.common.annotations.VisibleForTesting;
+import java.util.concurrent.Callable;
+import org.apache.hadoop.hdds.conf.OzoneConfiguration;
+import org.apache.hadoop.ozone.client.ObjectStore;
+import org.apache.hadoop.ozone.client.OzoneBucket;
+import org.apache.hadoop.ozone.client.OzoneClient;
+import org.apache.hadoop.ozone.client.OzoneVolume;
+import picocli.CommandLine;
+import picocli.CommandLine.Command;
+import picocli.CommandLine.Option;
+
+
+/**
+ * A Freon test that creates a specified number of snapshots for a given 
bucket.
+ * After each snapshot is created, it creates a specific number of empty files 
and directories.
+ */
+@Command(name = "snapshot-generator", mixinStandardHelpOptions = true,
+    description = "Generate snapshots and then create files and directories in 
the specified bucket")
+public class SnapshotGenerator extends BaseFreonGenerator implements 
Callable<Void> {
+  @CommandLine.ParentCommand
+  private Freon freon;
+
+  @Option(names = {"--volume"}, description = "Volume name", defaultValue = 
"vol1")
+  private String volumeName;
+
+  @Option(names = {"--bucket"}, description = "Bucket name", defaultValue = 
"buck1")
+  private String bucketName;
+
+  @Option(names = {"--snapshots"},
+      description = "Number of snapshots to generate", defaultValue = "5")
+  private int numSnapshots;
+
+  @Option(names = {"--files"},
+      description = "Number of files to create after each snapshot", 
defaultValue = "10")
+  private int numFiles;
+
+  @Option(names = {"--dirs"},
+      description = "Number of directories to create after each snapshot", 
defaultValue = "5")
+  private int numDirs;
+

Review Comment:
   In that case should we use `--files` option to create keys in Object Store 
bucket that way we also generate entries in the `keyTable`



-- 
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]

Reply via email to