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/07/31 23:16:30 UTC

[GitHub] [ozone] neils-dev commented on a diff in pull request #3629: HDDS-5779. Create s3g bucket creation performance test

neils-dev commented on code in PR #3629:
URL: https://github.com/apache/ozone/pull/3629#discussion_r934053009


##########
hadoop-ozone/tools/src/main/java/org/apache/hadoop/ozone/freon/S3BucketGenerator.java:
##########
@@ -0,0 +1,73 @@
+/**
+ * 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
+ * <p>
+ * http://www.apache.org/licenses/LICENSE-2.0
+ * <p>
+ * 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.codahale.metrics.Timer;
+import org.apache.hadoop.hdds.cli.HddsVersionProvider;
+import org.slf4j.Logger;
+import org.slf4j.LoggerFactory;
+import picocli.CommandLine.Command;
+
+import java.util.concurrent.Callable;
+
+import static com.amazonaws.services.s3.internal.SkipMd5CheckStrategy.DISABLE_PUT_OBJECT_MD5_VALIDATION_PROPERTY;
+
+/**
+ * Generate buckets via the s3 interface.
+ *
+ * For a secure cluster,
+ * $> init user keytab
+ * $> kinit -kt /etc/security/keytabs/testuser.keytab testuser/scm@EXAMPLE.COM
+ * $> eval $(ozone s3 getsecret -e)
+ * for getting and exporting access_key_id and secret_access_key
+ * to freon shell test environment
+ * secret access key.
+ */
+@Command(name = "s3bg",
+    aliases = "s3-bucket-generator",
+    description = "Create buckets via the s3 interface.",
+    versionProvider = HddsVersionProvider.class,
+    mixinStandardHelpOptions = true,
+    showDefaultValues = true)
+public class S3BucketGenerator extends S3EntityGenerator
+    implements Callable<Void> {
+
+  private static final Logger LOG =
+      LoggerFactory.getLogger(S3BucketGenerator.class);
+
+  private Timer timer;
+
+  @Override
+  public Void call() throws Exception {
+    s3ClientInit();
+
+    timer = getMetrics().timer("bucket-create");
+
+    System.setProperty(DISABLE_PUT_OBJECT_MD5_VALIDATION_PROPERTY, "true");

Review Comment:
   The `DISABLE_PUT_OBJECT_MD5_VALIDATION_PROPERTY` shouldn't be needed to be set for the bucket creation test.  I believe this is an artifact left from creating this test based upon the `s3kg` test.  
   You can check if the test runs as expected without setting this property and remove.  If the case, then the property can remain set only in the `s3kg` test, https://github.com/apache/ozone/blob/0d5e65656304b0f50e2b47629eba58d3ff7345e5/hadoop-ozone/tools/src/main/java/org/apache/hadoop/ozone/freon/S3KeyGenerator.java#L101.



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