You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@cassandra.apache.org by if...@apache.org on 2021/07/15 07:27:48 UTC
[cassandra-harry] 04/04: Move classes to appropriate packages
This is an automated email from the ASF dual-hosted git repository.
ifesdjeen pushed a commit to branch CASSANDRA-16262-2
in repository https://gitbox.apache.org/repos/asf/cassandra-harry.git
commit af4bb1488f4c748a4e430ec3f105feb26820fd26
Author: Alex Petrov <ol...@gmail.com>
AuthorDate: Thu Jul 15 08:29:57 2021 +0200
Move classes to appropriate packages
---
harry-core/src/harry/core/Configuration.java | 20 ++++----
harry-core/src/harry/core/Run.java | 2 +-
.../src/harry/corruptor/AddExtraRowCorruptor.java | 2 +-
.../harry/corruptor/QueryResponseCorruptor.java | 3 +-
harry-core/src/harry/model/Model.java | 3 +-
harry-core/src/harry/model/NoOpChecker.java | 2 +-
harry-core/src/harry/model/QuiescentChecker.java | 4 +-
harry-core/src/harry/model/SelectHelper.java | 2 +-
.../src/harry/{runner => operations}/Query.java | 5 +-
.../{runner => operations}/QueryGenerator.java | 4 +-
harry-core/src/harry/reconciler/Reconciler.java | 8 ++--
harry-core/src/harry/runner/Runner.java | 2 +-
.../AbstractPartitionVisitor.java | 7 ++-
.../AllPartitionsValidator.java | 3 +-
.../CorruptingPartitionVisitor.java | 4 +-
.../LoggingPartitionVisitor.java | 2 +-
.../MutatingPartitionVisitor.java | 4 +-
.../{runner => visitors}/MutatingRowVisitor.java | 4 +-
.../src/harry/{runner => visitors}/Operation.java | 2 +-
.../ParallelRecentPartitionValidator.java | 4 +-
.../{runner => visitors}/ParallelValidator.java | 2 +-
.../{runner => visitors}/PartitionVisitor.java | 2 +-
.../RecentPartitionValidator.java | 6 +--
.../src/harry/{runner => visitors}/Sampler.java | 2 +-
.../SinglePartitionValidator.java | 5 +-
harry-core/test/harry/model/OpSelectorsTest.java | 6 +--
harry-core/test/harry/operations/RelationTest.java | 2 -
.../dependency-reduced-pom.xml | 54 ++++++++++++++++++++++
.../runner/FaultInjectingPartitionVisitor.java | 3 ++
.../src/harry/runner/QueryingNoOpChecker.java | 1 +
.../harry/runner/RepairingLocalStateValidator.java | 3 ++
harry-integration/src/harry/runner/Reproduce.java | 1 +
.../src/harry/runner/TrivialShrinker.java | 53 ++-------------------
.../harry/visitors/SkippingPartitionVisitor.java | 53 +++++++++++++++++++++
.../test/harry/ddl/SchemaGenTest.java | 2 +-
.../generators/DataGeneratorsIntegrationTest.java | 8 ++--
.../test/harry/model/ModelTestBase.java | 8 ++--
.../harry/model/QuerySelectorNegativeTest.java | 10 ++--
.../test/harry/model/QuerySelectorTest.java | 10 ++--
.../model/QuiescentCheckerIntegrationTest.java | 6 +--
.../test/harry/model/TestEveryClustering.java | 24 ++++------
.../test/harry/op/RowVisitorTest.java | 2 +-
42 files changed, 208 insertions(+), 142 deletions(-)
diff --git a/harry-core/src/harry/core/Configuration.java b/harry-core/src/harry/core/Configuration.java
index 4a2a1e6..0e065d5 100644
--- a/harry-core/src/harry/core/Configuration.java
+++ b/harry-core/src/harry/core/Configuration.java
@@ -46,19 +46,19 @@ import harry.model.clock.ApproximateMonotonicClock;
import harry.model.clock.OffsetClock;
import harry.model.sut.PrintlnSut;
import harry.model.sut.SystemUnderTest;
-import harry.runner.AllPartitionsValidator;
-import harry.runner.CorruptingPartitionVisitor;
+import harry.visitors.AllPartitionsValidator;
+import harry.visitors.CorruptingPartitionVisitor;
import harry.runner.DataTracker;
import harry.runner.DefaultDataTracker;
-import harry.runner.LoggingPartitionVisitor;
-import harry.runner.MutatingPartitionVisitor;
-import harry.runner.MutatingRowVisitor;
-import harry.runner.Operation;
-import harry.runner.ParallelRecentPartitionValidator;
-import harry.runner.PartitionVisitor;
-import harry.runner.RecentPartitionValidator;
+import harry.visitors.LoggingPartitionVisitor;
+import harry.visitors.MutatingPartitionVisitor;
+import harry.visitors.MutatingRowVisitor;
+import harry.visitors.Operation;
+import harry.visitors.ParallelRecentPartitionValidator;
+import harry.visitors.PartitionVisitor;
+import harry.visitors.RecentPartitionValidator;
import harry.runner.Runner;
-import harry.runner.Sampler;
+import harry.visitors.Sampler;
import harry.util.BitSet;
public class Configuration
diff --git a/harry-core/src/harry/core/Run.java b/harry-core/src/harry/core/Run.java
index d31e7ad..b0c8afc 100644
--- a/harry-core/src/harry/core/Run.java
+++ b/harry-core/src/harry/core/Run.java
@@ -22,7 +22,7 @@ import harry.ddl.SchemaSpec;
import harry.model.OpSelectors;
import harry.model.sut.SystemUnderTest;
import harry.runner.DataTracker;
-import harry.runner.QueryGenerator;
+import harry.operations.QueryGenerator;
public class Run
{
diff --git a/harry-core/src/harry/corruptor/AddExtraRowCorruptor.java b/harry-core/src/harry/corruptor/AddExtraRowCorruptor.java
index 65f4a0d..e05dffd 100644
--- a/harry-core/src/harry/corruptor/AddExtraRowCorruptor.java
+++ b/harry-core/src/harry/corruptor/AddExtraRowCorruptor.java
@@ -30,7 +30,7 @@ import harry.model.OpSelectors;
import harry.model.SelectHelper;
import harry.model.sut.SystemUnderTest;
import harry.operations.WriteHelper;
-import harry.runner.Query;
+import harry.operations.Query;
public class AddExtraRowCorruptor implements QueryResponseCorruptor
{
diff --git a/harry-core/src/harry/corruptor/QueryResponseCorruptor.java b/harry-core/src/harry/corruptor/QueryResponseCorruptor.java
index f4a3778..62bf589 100644
--- a/harry-core/src/harry/corruptor/QueryResponseCorruptor.java
+++ b/harry-core/src/harry/corruptor/QueryResponseCorruptor.java
@@ -31,8 +31,7 @@ import harry.model.OpSelectors;
import harry.model.SelectHelper;
import harry.model.sut.SystemUnderTest;
import harry.operations.CompiledStatement;
-import harry.runner.HarryRunner;
-import harry.runner.Query;
+import harry.operations.Query;
public interface QueryResponseCorruptor
{
diff --git a/harry-core/src/harry/model/Model.java b/harry-core/src/harry/model/Model.java
index d6ab865..1521d0f 100644
--- a/harry-core/src/harry/model/Model.java
+++ b/harry-core/src/harry/model/Model.java
@@ -19,8 +19,7 @@
package harry.model;
import harry.core.Run;
-import harry.reconciler.Reconciler;
-import harry.runner.Query;
+import harry.operations.Query;
public interface Model
{
diff --git a/harry-core/src/harry/model/NoOpChecker.java b/harry-core/src/harry/model/NoOpChecker.java
index a13b6ec..10f0a4a 100644
--- a/harry-core/src/harry/model/NoOpChecker.java
+++ b/harry-core/src/harry/model/NoOpChecker.java
@@ -20,7 +20,7 @@ package harry.model;
import harry.core.Run;
import harry.model.sut.SystemUnderTest;
-import harry.runner.Query;
+import harry.operations.Query;
public class NoOpChecker implements Model
{
diff --git a/harry-core/src/harry/model/QuiescentChecker.java b/harry-core/src/harry/model/QuiescentChecker.java
index a48ccce..d17d6f4 100644
--- a/harry-core/src/harry/model/QuiescentChecker.java
+++ b/harry-core/src/harry/model/QuiescentChecker.java
@@ -24,15 +24,13 @@ import java.util.Iterator;
import java.util.List;
import java.util.function.Supplier;
-import harry.core.Configuration;
import harry.core.Run;
import harry.data.ResultSetRow;
import harry.ddl.SchemaSpec;
import harry.model.sut.SystemUnderTest;
import harry.reconciler.Reconciler;
import harry.runner.DataTracker;
-import harry.runner.Query;
-import harry.runner.QueryGenerator;
+import harry.operations.Query;
import static harry.generators.DataGenerators.NIL_DESCR;
diff --git a/harry-core/src/harry/model/SelectHelper.java b/harry-core/src/harry/model/SelectHelper.java
index fc8f6f7..c0813ba 100644
--- a/harry-core/src/harry/model/SelectHelper.java
+++ b/harry-core/src/harry/model/SelectHelper.java
@@ -28,7 +28,7 @@ import harry.ddl.SchemaSpec;
import harry.model.sut.SystemUnderTest;
import harry.operations.CompiledStatement;
import harry.operations.Relation;
-import harry.runner.Query;
+import harry.operations.Query;
public class SelectHelper
{
diff --git a/harry-core/src/harry/runner/Query.java b/harry-core/src/harry/operations/Query.java
similarity index 98%
rename from harry-core/src/harry/runner/Query.java
rename to harry-core/src/harry/operations/Query.java
index 1eef505..d7e75c3 100644
--- a/harry-core/src/harry/runner/Query.java
+++ b/harry-core/src/harry/operations/Query.java
@@ -16,7 +16,7 @@
* limitations under the License.
*/
-package harry.runner;
+package harry.operations;
import java.util.ArrayList;
import java.util.Arrays;
@@ -30,9 +30,6 @@ import org.slf4j.LoggerFactory;
import harry.ddl.SchemaSpec;
import harry.model.SelectHelper;
-import harry.operations.CompiledStatement;
-import harry.operations.DeleteHelper;
-import harry.operations.Relation;
import harry.util.Ranges;
import static harry.operations.Relation.FORWARD_COMPARATOR;
diff --git a/harry-core/src/harry/runner/QueryGenerator.java b/harry-core/src/harry/operations/QueryGenerator.java
similarity index 99%
rename from harry-core/src/harry/runner/QueryGenerator.java
rename to harry-core/src/harry/operations/QueryGenerator.java
index 829cf8b..6c815b5 100644
--- a/harry-core/src/harry/runner/QueryGenerator.java
+++ b/harry-core/src/harry/operations/QueryGenerator.java
@@ -16,10 +16,9 @@
* limitations under the License.
*/
-package harry.runner;
+package harry.operations;
import java.util.ArrayList;
-import java.util.Arrays;
import java.util.Collections;
import java.util.List;
import java.util.function.LongSupplier;
@@ -34,7 +33,6 @@ import harry.generators.DataGenerators;
import harry.generators.RngUtils;
import harry.generators.Surjections;
import harry.model.OpSelectors;
-import harry.operations.Relation;
// TODO: there's a lot of potential to reduce an amount of garbage here.
// TODO: refactor. Currently, this class is a base for both SELECT and DELETE statements. In retrospect,
diff --git a/harry-core/src/harry/reconciler/Reconciler.java b/harry-core/src/harry/reconciler/Reconciler.java
index a9709b3..da2daa7 100644
--- a/harry-core/src/harry/reconciler/Reconciler.java
+++ b/harry-core/src/harry/reconciler/Reconciler.java
@@ -34,10 +34,10 @@ import harry.core.Run;
import harry.ddl.ColumnSpec;
import harry.ddl.SchemaSpec;
import harry.model.OpSelectors;
-import harry.runner.AbstractPartitionVisitor;
-import harry.runner.PartitionVisitor;
-import harry.runner.Query;
-import harry.runner.QueryGenerator;
+import harry.visitors.AbstractPartitionVisitor;
+import harry.visitors.PartitionVisitor;
+import harry.operations.Query;
+import harry.operations.QueryGenerator;
import harry.util.BitSet;
import harry.util.Ranges;
diff --git a/harry-core/src/harry/runner/Runner.java b/harry-core/src/harry/runner/Runner.java
index 06bc481..b172723 100644
--- a/harry-core/src/harry/runner/Runner.java
+++ b/harry-core/src/harry/runner/Runner.java
@@ -28,7 +28,6 @@ import java.util.List;
import java.util.concurrent.CompletableFuture;
import java.util.concurrent.CopyOnWriteArrayList;
import java.util.concurrent.Executors;
-import java.util.concurrent.Future;
import java.util.concurrent.ScheduledExecutorService;
import java.util.concurrent.TimeUnit;
import java.util.concurrent.atomic.AtomicBoolean;
@@ -40,6 +39,7 @@ import org.slf4j.LoggerFactory;
import harry.core.Configuration;
import harry.core.Run;
import harry.model.OpSelectors;
+import harry.visitors.PartitionVisitor;
public abstract class Runner
diff --git a/harry-core/src/harry/runner/AbstractPartitionVisitor.java b/harry-core/src/harry/visitors/AbstractPartitionVisitor.java
similarity index 93%
rename from harry-core/src/harry/runner/AbstractPartitionVisitor.java
rename to harry-core/src/harry/visitors/AbstractPartitionVisitor.java
index 0455cbe..3f58e3a 100644
--- a/harry-core/src/harry/runner/AbstractPartitionVisitor.java
+++ b/harry-core/src/harry/visitors/AbstractPartitionVisitor.java
@@ -16,7 +16,7 @@
* limitations under the License.
*/
-package harry.runner;
+package harry.visitors;
import harry.ddl.SchemaSpec;
import harry.model.OpSelectors;
@@ -27,6 +27,11 @@ public abstract class AbstractPartitionVisitor implements PartitionVisitor
protected final OpSelectors.DescriptorSelector descriptorSelector;
protected final SchemaSpec schema;
+ public AbstractPartitionVisitor(AbstractPartitionVisitor visitor)
+ {
+ this(visitor.pdSelector, visitor.descriptorSelector, visitor.schema);
+ }
+
public AbstractPartitionVisitor(OpSelectors.PdSelector pdSelector,
OpSelectors.DescriptorSelector descriptorSelector,
SchemaSpec schema)
diff --git a/harry-core/src/harry/runner/AllPartitionsValidator.java b/harry-core/src/harry/visitors/AllPartitionsValidator.java
similarity index 98%
rename from harry-core/src/harry/runner/AllPartitionsValidator.java
rename to harry-core/src/harry/visitors/AllPartitionsValidator.java
index f42ab65..5a5a1c7 100644
--- a/harry-core/src/harry/runner/AllPartitionsValidator.java
+++ b/harry-core/src/harry/visitors/AllPartitionsValidator.java
@@ -16,7 +16,7 @@
* limitations under the License.
*/
-package harry.runner;
+package harry.visitors;
import java.util.concurrent.CompletableFuture;
import java.util.concurrent.ExecutorService;
@@ -34,6 +34,7 @@ import harry.ddl.SchemaSpec;
import harry.model.Model;
import harry.model.OpSelectors;
import harry.model.sut.SystemUnderTest;
+import harry.operations.Query;
// This might be something that potentially grows into the validator described in the design doc;
// right now it's just a helper/container class
diff --git a/harry-core/src/harry/runner/CorruptingPartitionVisitor.java b/harry-core/src/harry/visitors/CorruptingPartitionVisitor.java
similarity index 97%
rename from harry-core/src/harry/runner/CorruptingPartitionVisitor.java
rename to harry-core/src/harry/visitors/CorruptingPartitionVisitor.java
index d079cf3..71c425b 100644
--- a/harry-core/src/harry/runner/CorruptingPartitionVisitor.java
+++ b/harry-core/src/harry/visitors/CorruptingPartitionVisitor.java
@@ -15,7 +15,7 @@
* See the License for the specific language governing permissions and
* limitations under the License.
*/
-package harry.runner;
+package harry.visitors;
import java.util.Random;
import java.util.concurrent.atomic.AtomicLong;
@@ -29,6 +29,8 @@ import harry.corruptor.ChangeValueCorruptor;
import harry.corruptor.HideRowCorruptor;
import harry.corruptor.HideValueCorruptor;
import harry.corruptor.QueryResponseCorruptor;
+import harry.runner.HarryRunner;
+import harry.operations.Query;
public class CorruptingPartitionVisitor implements PartitionVisitor
{
diff --git a/harry-core/src/harry/runner/LoggingPartitionVisitor.java b/harry-core/src/harry/visitors/LoggingPartitionVisitor.java
similarity index 99%
rename from harry-core/src/harry/runner/LoggingPartitionVisitor.java
rename to harry-core/src/harry/visitors/LoggingPartitionVisitor.java
index 9cb827d..3e97ba3 100644
--- a/harry-core/src/harry/runner/LoggingPartitionVisitor.java
+++ b/harry-core/src/harry/visitors/LoggingPartitionVisitor.java
@@ -16,7 +16,7 @@
* limitations under the License.
*/
-package harry.runner;
+package harry.visitors;
import java.io.BufferedWriter;
import java.io.File;
diff --git a/harry-core/src/harry/runner/MutatingPartitionVisitor.java b/harry-core/src/harry/visitors/MutatingPartitionVisitor.java
similarity index 98%
rename from harry-core/src/harry/runner/MutatingPartitionVisitor.java
rename to harry-core/src/harry/visitors/MutatingPartitionVisitor.java
index 4df793e..88456fe 100644
--- a/harry-core/src/harry/runner/MutatingPartitionVisitor.java
+++ b/harry-core/src/harry/visitors/MutatingPartitionVisitor.java
@@ -16,7 +16,7 @@
* limitations under the License.
*/
-package harry.runner;
+package harry.visitors;
import java.util.ArrayList;
import java.util.List;
@@ -29,10 +29,10 @@ import org.slf4j.Logger;
import org.slf4j.LoggerFactory;
import harry.core.Run;
-import harry.model.Model;
import harry.model.OpSelectors;
import harry.model.sut.SystemUnderTest;
import harry.operations.CompiledStatement;
+import harry.runner.DataTracker;
public class MutatingPartitionVisitor extends AbstractPartitionVisitor
{
diff --git a/harry-core/src/harry/runner/MutatingRowVisitor.java b/harry-core/src/harry/visitors/MutatingRowVisitor.java
similarity index 98%
rename from harry-core/src/harry/runner/MutatingRowVisitor.java
rename to harry-core/src/harry/visitors/MutatingRowVisitor.java
index a14fc96..0c5db9a 100644
--- a/harry-core/src/harry/runner/MutatingRowVisitor.java
+++ b/harry-core/src/harry/visitors/MutatingRowVisitor.java
@@ -16,7 +16,7 @@
* limitations under the License.
*/
-package harry.runner;
+package harry.visitors;
import harry.core.MetricReporter;
import harry.core.Run;
@@ -26,6 +26,8 @@ import harry.model.OpSelectors;
import harry.operations.CompiledStatement;
import harry.operations.DeleteHelper;
import harry.operations.WriteHelper;
+import harry.operations.Query;
+import harry.operations.QueryGenerator;
import harry.util.BitSet;
public class MutatingRowVisitor implements Operation
diff --git a/harry-core/src/harry/runner/Operation.java b/harry-core/src/harry/visitors/Operation.java
similarity index 99%
rename from harry-core/src/harry/runner/Operation.java
rename to harry-core/src/harry/visitors/Operation.java
index f44f3bd..1af21fc 100644
--- a/harry-core/src/harry/runner/Operation.java
+++ b/harry-core/src/harry/visitors/Operation.java
@@ -16,7 +16,7 @@
* limitations under the License.
*/
-package harry.runner;
+package harry.visitors;
import harry.core.Run;
import harry.model.OpSelectors;
diff --git a/harry-core/src/harry/runner/ParallelRecentPartitionValidator.java b/harry-core/src/harry/visitors/ParallelRecentPartitionValidator.java
similarity index 98%
rename from harry-core/src/harry/runner/ParallelRecentPartitionValidator.java
rename to harry-core/src/harry/visitors/ParallelRecentPartitionValidator.java
index b363baf..a1688cd 100644
--- a/harry-core/src/harry/runner/ParallelRecentPartitionValidator.java
+++ b/harry-core/src/harry/visitors/ParallelRecentPartitionValidator.java
@@ -16,7 +16,7 @@
* limitations under the License.
*/
-package harry.runner;
+package harry.visitors;
import java.io.BufferedWriter;
import java.io.File;
@@ -38,6 +38,8 @@ import harry.core.Configuration;
import harry.core.Run;
import harry.generators.Surjections;
import harry.model.Model;
+import harry.operations.Query;
+import harry.operations.QueryGenerator;
public class ParallelRecentPartitionValidator extends ParallelValidator<ParallelRecentPartitionValidator.State>
{
diff --git a/harry-core/src/harry/runner/ParallelValidator.java b/harry-core/src/harry/visitors/ParallelValidator.java
similarity index 99%
rename from harry-core/src/harry/runner/ParallelValidator.java
rename to harry-core/src/harry/visitors/ParallelValidator.java
index 742a7cc..2964eb7 100644
--- a/harry-core/src/harry/runner/ParallelValidator.java
+++ b/harry-core/src/harry/visitors/ParallelValidator.java
@@ -16,7 +16,7 @@
* limitations under the License.
*/
-package harry.runner;
+package harry.visitors;
import java.util.concurrent.CompletableFuture;
import java.util.concurrent.ExecutorService;
diff --git a/harry-core/src/harry/runner/PartitionVisitor.java b/harry-core/src/harry/visitors/PartitionVisitor.java
similarity index 97%
rename from harry-core/src/harry/runner/PartitionVisitor.java
rename to harry-core/src/harry/visitors/PartitionVisitor.java
index 85e3b26..77de711 100644
--- a/harry-core/src/harry/runner/PartitionVisitor.java
+++ b/harry-core/src/harry/visitors/PartitionVisitor.java
@@ -16,7 +16,7 @@
* limitations under the License.
*/
-package harry.runner;
+package harry.visitors;
import harry.core.Run;
diff --git a/harry-core/src/harry/runner/RecentPartitionValidator.java b/harry-core/src/harry/visitors/RecentPartitionValidator.java
similarity index 97%
rename from harry-core/src/harry/runner/RecentPartitionValidator.java
rename to harry-core/src/harry/visitors/RecentPartitionValidator.java
index 69388dd..4bb1e61 100644
--- a/harry-core/src/harry/runner/RecentPartitionValidator.java
+++ b/harry-core/src/harry/visitors/RecentPartitionValidator.java
@@ -16,7 +16,7 @@
* limitations under the License.
*/
-package harry.runner;
+package harry.visitors;
import java.io.BufferedWriter;
import java.io.File;
@@ -24,7 +24,6 @@ import java.io.FileNotFoundException;
import java.io.FileOutputStream;
import java.io.IOException;
import java.io.OutputStreamWriter;
-import java.util.Arrays;
import java.util.concurrent.atomic.AtomicLong;
import org.slf4j.Logger;
@@ -35,7 +34,8 @@ import harry.core.Run;
import harry.generators.Surjections;
import harry.model.Model;
import harry.model.OpSelectors;
-import harry.operations.CompiledStatement;
+import harry.operations.Query;
+import harry.operations.QueryGenerator;
public class RecentPartitionValidator implements PartitionVisitor
{
diff --git a/harry-core/src/harry/runner/Sampler.java b/harry-core/src/harry/visitors/Sampler.java
similarity index 99%
rename from harry-core/src/harry/runner/Sampler.java
rename to harry-core/src/harry/visitors/Sampler.java
index c362bd9..e4088d9 100644
--- a/harry-core/src/harry/runner/Sampler.java
+++ b/harry-core/src/harry/visitors/Sampler.java
@@ -16,7 +16,7 @@
* limitations under the License.
*/
-package harry.runner;
+package harry.visitors;
import java.util.concurrent.atomic.AtomicLong;
diff --git a/harry-core/src/harry/runner/SinglePartitionValidator.java b/harry-core/src/harry/visitors/SinglePartitionValidator.java
similarity index 94%
rename from harry-core/src/harry/runner/SinglePartitionValidator.java
rename to harry-core/src/harry/visitors/SinglePartitionValidator.java
index febfc6a..313cff9 100644
--- a/harry-core/src/harry/runner/SinglePartitionValidator.java
+++ b/harry-core/src/harry/visitors/SinglePartitionValidator.java
@@ -16,10 +16,13 @@
* limitations under the License.
*/
-package harry.runner;
+package harry.visitors;
import harry.core.Run;
import harry.model.Model;
+import harry.operations.Query;
+import harry.operations.QueryGenerator;
+import harry.visitors.PartitionVisitor;
public class SinglePartitionValidator implements PartitionVisitor
{
diff --git a/harry-core/test/harry/model/OpSelectorsTest.java b/harry-core/test/harry/model/OpSelectorsTest.java
index 266aeb9..709ba81 100644
--- a/harry-core/test/harry/model/OpSelectorsTest.java
+++ b/harry-core/test/harry/model/OpSelectorsTest.java
@@ -44,9 +44,9 @@ import harry.model.clock.OffsetClock;
import harry.model.sut.SystemUnderTest;
import harry.operations.CompiledStatement;
import harry.runner.DataTracker;
-import harry.runner.MutatingPartitionVisitor;
-import harry.runner.PartitionVisitor;
-import harry.runner.Operation;
+import harry.visitors.MutatingPartitionVisitor;
+import harry.visitors.PartitionVisitor;
+import harry.visitors.Operation;
import harry.util.BitSet;
public class OpSelectorsTest
diff --git a/harry-core/test/harry/operations/RelationTest.java b/harry-core/test/harry/operations/RelationTest.java
index 122b224..e0c6e73 100644
--- a/harry-core/test/harry/operations/RelationTest.java
+++ b/harry-core/test/harry/operations/RelationTest.java
@@ -31,8 +31,6 @@ import harry.ddl.ColumnSpec;
import harry.ddl.SchemaSpec;
import harry.generators.DataGeneratorsTest;
import harry.model.OpSelectors;
-import harry.runner.Query;
-import harry.runner.QueryGenerator;
import harry.util.BitSet;
public class RelationTest
diff --git a/harry-integration-external/dependency-reduced-pom.xml b/harry-integration-external/dependency-reduced-pom.xml
new file mode 100644
index 0000000..e2e00a5
--- /dev/null
+++ b/harry-integration-external/dependency-reduced-pom.xml
@@ -0,0 +1,54 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<project xmlns="http://maven.apache.org/POM/4.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/maven-v4_0_0.xsd">
+ <parent>
+ <artifactId>harry-parent</artifactId>
+ <groupId>org.apache.cassandra</groupId>
+ <version>0.0.1-SNAPSHOT</version>
+ </parent>
+ <modelVersion>4.0.0</modelVersion>
+ <artifactId>harry-integration-external</artifactId>
+ <name>Harry Integration - External</name>
+ <build>
+ <plugins>
+ <plugin>
+ <artifactId>maven-shade-plugin</artifactId>
+ <version>3.2.4</version>
+ <executions>
+ <execution>
+ <phase>package</phase>
+ <goals>
+ <goal>shade</goal>
+ </goals>
+ <configuration>
+ <transformers>
+ <transformer>
+ <mainClass>harry.runner.external.HarryRunnerExternal</mainClass>
+ </transformer>
+ </transformers>
+ </configuration>
+ </execution>
+ </executions>
+ </plugin>
+ </plugins>
+ </build>
+ <dependencies>
+ <dependency>
+ <groupId>junit</groupId>
+ <artifactId>junit</artifactId>
+ <version>4.12</version>
+ <scope>test</scope>
+ <exclusions>
+ <exclusion>
+ <artifactId>hamcrest-core</artifactId>
+ <groupId>org.hamcrest</groupId>
+ </exclusion>
+ </exclusions>
+ </dependency>
+ <dependency>
+ <groupId>org.quicktheories</groupId>
+ <artifactId>quicktheories</artifactId>
+ <version>0.25</version>
+ <scope>test</scope>
+ </dependency>
+ </dependencies>
+</project>
diff --git a/harry-integration/src/harry/runner/FaultInjectingPartitionVisitor.java b/harry-integration/src/harry/runner/FaultInjectingPartitionVisitor.java
index a6483bc..0fba873 100644
--- a/harry-integration/src/harry/runner/FaultInjectingPartitionVisitor.java
+++ b/harry-integration/src/harry/runner/FaultInjectingPartitionVisitor.java
@@ -31,6 +31,9 @@ import harry.model.sut.InJvmSut;
import harry.model.sut.MixedVersionInJvmSut;
import harry.model.sut.SystemUnderTest;
import harry.operations.CompiledStatement;
+import harry.visitors.LoggingPartitionVisitor;
+import harry.visitors.Operation;
+import harry.visitors.PartitionVisitor;
public class FaultInjectingPartitionVisitor extends LoggingPartitionVisitor
{
diff --git a/harry-integration/src/harry/runner/QueryingNoOpChecker.java b/harry-integration/src/harry/runner/QueryingNoOpChecker.java
index 08b8e6b..0e7d4fb 100644
--- a/harry-integration/src/harry/runner/QueryingNoOpChecker.java
+++ b/harry-integration/src/harry/runner/QueryingNoOpChecker.java
@@ -25,6 +25,7 @@ import harry.core.Run;
import harry.model.Model;
import harry.model.sut.SystemUnderTest;
import harry.operations.CompiledStatement;
+import harry.operations.Query;
public class QueryingNoOpChecker implements Model
{
diff --git a/harry-integration/src/harry/runner/RepairingLocalStateValidator.java b/harry-integration/src/harry/runner/RepairingLocalStateValidator.java
index 98beb93..41926f0 100644
--- a/harry-integration/src/harry/runner/RepairingLocalStateValidator.java
+++ b/harry-integration/src/harry/runner/RepairingLocalStateValidator.java
@@ -32,6 +32,9 @@ import harry.model.QuiescentChecker;
import harry.model.sut.InJvmSut;
import harry.model.sut.SystemUnderTest;
import harry.operations.CompiledStatement;
+import harry.operations.Query;
+import harry.visitors.AllPartitionsValidator;
+import harry.visitors.PartitionVisitor;
import static harry.model.SelectHelper.resultSetToRow;
diff --git a/harry-integration/src/harry/runner/Reproduce.java b/harry-integration/src/harry/runner/Reproduce.java
index f3ae9cb..5d34ecd 100644
--- a/harry-integration/src/harry/runner/Reproduce.java
+++ b/harry-integration/src/harry/runner/Reproduce.java
@@ -23,6 +23,7 @@ import java.io.File;
import harry.core.Configuration;
import harry.core.Run;
import harry.model.sut.PrintlnSut;
+import harry.operations.Query;
import harry.reconciler.Reconciler;
public class Reproduce
diff --git a/harry-integration/src/harry/runner/TrivialShrinker.java b/harry-integration/src/harry/runner/TrivialShrinker.java
index 82e0572..23bdbcc 100644
--- a/harry-integration/src/harry/runner/TrivialShrinker.java
+++ b/harry-integration/src/harry/runner/TrivialShrinker.java
@@ -28,6 +28,9 @@ import java.util.function.Predicate;
import harry.core.Configuration;
import harry.core.Run;
+import harry.visitors.AbstractPartitionVisitor;
+import harry.visitors.PartitionVisitor;
+import harry.visitors.SkippingPartitionVisitor;
/**
* A most trivial imaginable shrinker: attempts to skip partitions and/or logical timestamps to see if the
@@ -167,56 +170,6 @@ public class TrivialShrinker
}
}
- public static class SkippingPartitionVisitor extends AbstractPartitionVisitor
- {
- private final AbstractPartitionVisitor delegate;
- private final Set<Long> ltsToSkip;
- private final Set<Long> pdsToSkip;
-
- public SkippingPartitionVisitor(AbstractPartitionVisitor delegate,
- Set<Long> ltsToSkip,
- Set<Long> pdsToSkip)
- {
- super(delegate.pdSelector, delegate.descriptorSelector, delegate.schema);
- this.delegate = delegate;
- this.ltsToSkip = ltsToSkip;
- this.pdsToSkip = pdsToSkip;
- }
-
- protected void beforeLts(long lts, long pd)
- {
- delegate.beforeLts(lts, pd);
- }
-
- protected void afterLts(long lts, long pd)
- {
- delegate.afterLts(lts, pd);
- }
-
- protected void beforeBatch(long lts, long pd, long m)
- {
- delegate.beforeBatch(lts, pd, m);
- }
-
- protected void operation(long lts, long pd, long cd, long m, long opId)
- {
- if (pdsToSkip.contains(pd) || ltsToSkip.contains(lts))
- return;
-
- delegate.operation(lts, pd, cd, m, opId);
- }
-
- protected void afterBatch(long lts, long pd, long m)
- {
- delegate.afterBatch(lts, pd, m);
- }
-
- public void shutdown() throws InterruptedException
- {
- delegate.shutdown();
- }
- }
-
public static String toString(Set<Long> longs)
{
if (longs.isEmpty())
diff --git a/harry-integration/src/harry/visitors/SkippingPartitionVisitor.java b/harry-integration/src/harry/visitors/SkippingPartitionVisitor.java
new file mode 100644
index 0000000..fa910cb
--- /dev/null
+++ b/harry-integration/src/harry/visitors/SkippingPartitionVisitor.java
@@ -0,0 +1,53 @@
+package harry.visitors;
+
+import java.util.Set;
+
+public class SkippingPartitionVisitor extends AbstractPartitionVisitor
+{
+ private final AbstractPartitionVisitor delegate;
+ private final Set<Long> ltsToSkip;
+ private final Set<Long> pdsToSkip;
+
+ public SkippingPartitionVisitor(AbstractPartitionVisitor delegate,
+ Set<Long> ltsToSkip,
+ Set<Long> pdsToSkip)
+ {
+ super(delegate);
+ this.delegate = delegate;
+ this.ltsToSkip = ltsToSkip;
+ this.pdsToSkip = pdsToSkip;
+ }
+
+ protected void beforeLts(long lts, long pd)
+ {
+ delegate.beforeLts(lts, pd);
+ }
+
+ protected void afterLts(long lts, long pd)
+ {
+ delegate.afterLts(lts, pd);
+ }
+
+ protected void beforeBatch(long lts, long pd, long m)
+ {
+ delegate.beforeBatch(lts, pd, m);
+ }
+
+ protected void operation(long lts, long pd, long cd, long m, long opId)
+ {
+ if (pdsToSkip.contains(pd) || ltsToSkip.contains(lts))
+ return;
+
+ delegate.operation(lts, pd, cd, m, opId);
+ }
+
+ protected void afterBatch(long lts, long pd, long m)
+ {
+ delegate.afterBatch(lts, pd, m);
+ }
+
+ public void shutdown() throws InterruptedException
+ {
+ delegate.shutdown();
+ }
+}
diff --git a/harry-integration/test/harry/ddl/SchemaGenTest.java b/harry-integration/test/harry/ddl/SchemaGenTest.java
index 2f7e898..c6204cd 100644
--- a/harry-integration/test/harry/ddl/SchemaGenTest.java
+++ b/harry-integration/test/harry/ddl/SchemaGenTest.java
@@ -32,7 +32,7 @@ import harry.QuickTheoriesAdapter;
import harry.generators.Generator;
import harry.operations.CompiledStatement;
-import harry.runner.Query;
+import harry.operations.Query;
import harry.util.TestRunner;
import org.apache.cassandra.cql3.CQLTester;
import org.apache.cassandra.db.Keyspace;
diff --git a/harry-integration/test/harry/generators/DataGeneratorsIntegrationTest.java b/harry-integration/test/harry/generators/DataGeneratorsIntegrationTest.java
index cadee0c..b819eb5 100644
--- a/harry-integration/test/harry/generators/DataGeneratorsIntegrationTest.java
+++ b/harry-integration/test/harry/generators/DataGeneratorsIntegrationTest.java
@@ -32,10 +32,10 @@ import harry.generators.distribution.Distribution;
import harry.model.NoOpChecker;
import harry.model.OpSelectors;
import harry.model.sut.SystemUnderTest;
-import harry.runner.MutatingPartitionVisitor;
-import harry.runner.MutatingRowVisitor;
-import harry.runner.PartitionVisitor;
-import harry.runner.SinglePartitionValidator;
+import harry.visitors.MutatingPartitionVisitor;
+import harry.visitors.MutatingRowVisitor;
+import harry.visitors.PartitionVisitor;
+import harry.visitors.SinglePartitionValidator;
import harry.util.TestRunner;
import org.apache.cassandra.cql3.CQLTester;
import org.apache.cassandra.cql3.UntypedResultSet;
diff --git a/harry-integration/test/harry/model/ModelTestBase.java b/harry-integration/test/harry/model/ModelTestBase.java
index 5d1659d..70b9fb3 100644
--- a/harry-integration/test/harry/model/ModelTestBase.java
+++ b/harry-integration/test/harry/model/ModelTestBase.java
@@ -28,11 +28,11 @@ import harry.core.Configuration;
import harry.core.Run;
import harry.ddl.SchemaGenerators;
import harry.ddl.SchemaSpec;
-import harry.runner.LoggingPartitionVisitor;
-import harry.runner.MutatingRowVisitor;
-import harry.runner.PartitionVisitor;
+import harry.visitors.LoggingPartitionVisitor;
+import harry.visitors.MutatingRowVisitor;
+import harry.visitors.PartitionVisitor;
import harry.runner.Runner;
-import harry.runner.SinglePartitionValidator;
+import harry.visitors.SinglePartitionValidator;
public abstract class ModelTestBase extends IntegrationTestBase
{
diff --git a/harry-integration/test/harry/model/QuerySelectorNegativeTest.java b/harry-integration/test/harry/model/QuerySelectorNegativeTest.java
index 8c635c8..928e4e9 100644
--- a/harry-integration/test/harry/model/QuerySelectorNegativeTest.java
+++ b/harry-integration/test/harry/model/QuerySelectorNegativeTest.java
@@ -25,6 +25,7 @@ import java.util.Map;
import java.util.Random;
import java.util.function.Supplier;
+import harry.operations.Query;
import org.junit.Assert;
import org.junit.Test;
import org.junit.runner.RunWith;
@@ -39,11 +40,10 @@ import harry.corruptor.HideValueCorruptor;
import harry.corruptor.QueryResponseCorruptor;
import harry.corruptor.ShowValueCorruptor;
import harry.ddl.SchemaGenerators;
-import harry.runner.MutatingPartitionVisitor;
-import harry.runner.MutatingRowVisitor;
-import harry.runner.PartitionVisitor;
-import harry.runner.Query;
-import harry.runner.QueryGenerator;
+import harry.visitors.MutatingPartitionVisitor;
+import harry.visitors.MutatingRowVisitor;
+import harry.visitors.PartitionVisitor;
+import harry.operations.QueryGenerator;
import static harry.corruptor.QueryResponseCorruptor.SimpleQueryResponseCorruptor;
diff --git a/harry-integration/test/harry/model/QuerySelectorTest.java b/harry-integration/test/harry/model/QuerySelectorTest.java
index 484d14a..3436809 100644
--- a/harry-integration/test/harry/model/QuerySelectorTest.java
+++ b/harry-integration/test/harry/model/QuerySelectorTest.java
@@ -31,11 +31,11 @@ import harry.ddl.SchemaGenerators;
import harry.ddl.SchemaSpec;
import harry.model.sut.SystemUnderTest;
import harry.operations.CompiledStatement;
-import harry.runner.MutatingPartitionVisitor;
-import harry.runner.MutatingRowVisitor;
-import harry.runner.PartitionVisitor;
-import harry.runner.Query;
-import harry.runner.QueryGenerator;
+import harry.visitors.MutatingPartitionVisitor;
+import harry.visitors.MutatingRowVisitor;
+import harry.visitors.PartitionVisitor;
+import harry.operations.Query;
+import harry.operations.QueryGenerator;
import static harry.generators.DataGenerators.NIL_DESCR;
diff --git a/harry-integration/test/harry/model/QuiescentCheckerIntegrationTest.java b/harry-integration/test/harry/model/QuiescentCheckerIntegrationTest.java
index 7d5956f..55fb00b 100644
--- a/harry-integration/test/harry/model/QuiescentCheckerIntegrationTest.java
+++ b/harry-integration/test/harry/model/QuiescentCheckerIntegrationTest.java
@@ -29,9 +29,9 @@ import harry.corruptor.HideValueCorruptor;
import harry.corruptor.QueryResponseCorruptor;
import harry.corruptor.QueryResponseCorruptor.SimpleQueryResponseCorruptor;
import harry.ddl.SchemaSpec;
-import harry.runner.PartitionVisitor;
-import harry.runner.Query;
-import harry.runner.SinglePartitionValidator;
+import harry.visitors.PartitionVisitor;
+import harry.operations.Query;
+import harry.visitors.SinglePartitionValidator;
public class QuiescentCheckerIntegrationTest extends ModelTestBase
{
diff --git a/harry-integration/test/harry/model/TestEveryClustering.java b/harry-integration/test/harry/model/TestEveryClustering.java
index f844b41..f3a2ba8 100644
--- a/harry-integration/test/harry/model/TestEveryClustering.java
+++ b/harry-integration/test/harry/model/TestEveryClustering.java
@@ -1,28 +1,22 @@
package harry.model;
-import java.util.HashSet;
-import java.util.Set;
-import java.util.function.Supplier;
-
-import org.junit.Assert;
-import org.junit.Test;
-
import harry.core.Configuration;
import harry.core.Run;
import harry.ddl.SchemaGenerators;
import harry.ddl.SchemaSpec;
import harry.generators.distribution.Distribution;
-import harry.model.sut.SystemUnderTest;
import harry.operations.CompiledStatement;
+import harry.operations.Query;
import harry.operations.Relation;
-import harry.runner.FaultInjectingPartitionVisitor;
-import harry.runner.LoggingPartitionVisitor;
-import harry.runner.MutatingPartitionVisitor;
-import harry.runner.MutatingRowVisitor;
-import harry.runner.PartitionVisitor;
-import harry.runner.Query;
-import harry.runner.QueryGenerator;
+import harry.visitors.LoggingPartitionVisitor;
+import harry.visitors.MutatingRowVisitor;
+import harry.visitors.PartitionVisitor;
import org.apache.cassandra.distributed.api.IInvokableInstance;
+import org.junit.Test;
+
+import java.util.HashSet;
+import java.util.Set;
+import java.util.function.Supplier;
public class TestEveryClustering extends IntegrationTestBase
{
diff --git a/harry-integration/test/harry/op/RowVisitorTest.java b/harry-integration/test/harry/op/RowVisitorTest.java
index ae51115..a644afa 100644
--- a/harry-integration/test/harry/op/RowVisitorTest.java
+++ b/harry-integration/test/harry/op/RowVisitorTest.java
@@ -35,7 +35,7 @@ import harry.model.clock.OffsetClock;
import harry.model.sut.SystemUnderTest;
import harry.operations.CompiledStatement;
import harry.runner.DataTracker;
-import harry.runner.MutatingRowVisitor;
+import harry.visitors.MutatingRowVisitor;
import org.apache.cassandra.cql3.CQLTester;
import static harry.model.OpSelectors.DefaultDescriptorSelector.DEFAULT_OP_SELECTOR;
---------------------------------------------------------------------
To unsubscribe, e-mail: commits-unsubscribe@cassandra.apache.org
For additional commands, e-mail: commits-help@cassandra.apache.org