Github user jasobrown commented on a diff in the pull request:
https://github.com/apache/cassandra/pull/255#discussion_r213546773
--- Diff: src/java/org/apache/cassandra/tools/fqltool/commands/Replay.java ---
@@ -0,0 +1,151 @@
+/*
+ * 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.cassandra.tools.fqltool.commands;
+
+
+import java.io.File;
+import java.util.ArrayList;
+import java.util.List;
+import java.util.function.Predicate;
+import java.util.stream.Collectors;
+
+import com.google.common.annotations.VisibleForTesting;
+
+import io.airlift.airline.Arguments;
+import io.airlift.airline.Command;
+import io.airlift.airline.Option;
+import net.openhft.chronicle.core.io.Closeable;
+import net.openhft.chronicle.queue.ChronicleQueue;
+import net.openhft.chronicle.queue.ChronicleQueueBuilder;
+
+import org.apache.cassandra.tools.fqltool.FQLQuery;
+import org.apache.cassandra.tools.fqltool.FQLQueryIterator;
+import org.apache.cassandra.tools.fqltool.QueryReplayer;
+import org.apache.cassandra.utils.AbstractIterator;
+import org.apache.cassandra.utils.MergeIterator;
+
+/**
+ * replay the contents of a list of paths containing full query logs
+ */
+@Command(name = "replay", description = "Replay full query logs")
+public class Replay implements Runnable
+{
+ @Arguments(usage = "<path1> [<path2>...<pathN>]", description =
"Paths containing the full query logs to replay.", required = true)
+ private List<String> arguments = new ArrayList<>();
+
+ @Option(title = "target", name = {"--target"}, description = "Hosts to replay the
logs to, can be repeated to replay to more hosts.")
+ private List<String> targetHosts;
+
+ @Option(title = "results", name = { "--results"}, description = "Where to store the
results of the queries, this should be a directory. Leave this option out to avoid storing
results.")
+ private String resultPath;
+
+ @Option(title = "keyspace", name = { "--keyspace"}, description = "Only replay queries
against this keyspace and queries without keyspace set.")
+ private String keyspace;
+
+ @Option(title = "debug", name = {"--debug"}, description = "Debug mode, print all
queries executed.")
+ private boolean debug;
+
+ @Option(title = "use", name = {"--use"}, description = "Connect to the cluster(s)
using this keyspace.")
--- End diff --
This isn't entirely clear to me. The user can state which keyspace to initially connect
to, but then we'll switch the keyspaces on -demand in `QueryReplayer.replayer()`. What is
the intent with the `use` field?
---
---------------------------------------------------------------------
To unsubscribe, e-mail: pr-unsubscribe@cassandra.apache.org
For additional commands, e-mail: pr-help@cassandra.apache.org
|