sijie commented on a change in pull request #1094: BP-27: New BookKeeper CLI 
URL: https://github.com/apache/bookkeeper/pull/1094#discussion_r167880214
 
 

 ##########
 File path: 
bookkeeper-server/src/main/java/org/apache/bookkeeper/tools/cli/commands/client/SimpleTestCommand.java
 ##########
 @@ -0,0 +1,80 @@
+/*
+ * 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.bookkeeper.tools.cli.commands.client;
+
+import static org.apache.bookkeeper.common.concurrent.FutureUtils.result;
+
+import com.beust.jcommander.Parameter;
+import com.beust.jcommander.Parameters;
+import java.util.concurrent.TimeUnit;
+import lombok.Setter;
+import lombok.experimental.Accessors;
+import org.apache.bookkeeper.client.api.BookKeeper;
+import org.apache.bookkeeper.client.api.DigestType;
+import org.apache.bookkeeper.client.api.WriteHandle;
+import org.apache.bookkeeper.tools.cli.helpers.ClientCommand;
+
+/**
+ * A client command that simply tests if a cluster is healthy.
+ */
+@Accessors(fluent = true)
+@Setter
+@Parameters(commandDescription = "Simple test to create a ledger and write 
entries to it.")
+public class SimpleTestCommand extends ClientCommand {
+
+    @Parameter(names = { "-e", "--ensemble-size" }, description = "Ensemble 
size (default 3)")
+    private int ensembleSize = 3;
+    @Parameter(names = { "-w", "--write-quorum-size" }, description = "Write 
quorum size (default 2)")
+    private int writeQuorumSize = 2;
+    @Parameter(names = { "-a", "--ack-quorum-size" }, description = "Ack 
quorum size (default 2)")
+    private int ackQuorumSize = 2;
+    @Parameter(names = { "-n", "--num-entries" }, description = "Entries to 
write (default 100)")
+    private int numEntries = 100;
 
 Review comment:
   yes. I do this intentionally, because for a simple test command it is okay 
to just test with 100 entries, 1000 seems to too many for me.
   
   but I didn't change the original behavior for old bookie shell, this 
behavior is only changed for new bookie shell. so it doesn't break any BC here.

----------------------------------------------------------------
This is an automated message from the Apache Git Service.
To respond to the message, please log on GitHub and use the
URL above to go to the specific comment.
 
For queries about this service, please contact Infrastructure at:
us...@infra.apache.org


With regards,
Apache Git Services

Reply via email to