Search in sources :

Example 16 with GOSSIP

use of org.apache.cassandra.distributed.api.Feature.GOSSIP in project cassandra by apache.

the class PartitionDenylistTest method checkStartupWithoutTriggeringUnavailable.

// Create a four node cluster, populate with some denylist entries, stop all
// the nodes, then bring them up one by one, waiting for each node to complete
// startup before starting the next.
// 
// On startup each node runs a SELECT * query on the partition denylist table
// to populate the cache.  The whole keyspace is unlikely to be available until
// three of the four nodes are started, so the early nodes will go through several
// cycles of failing to retrieve the partition denylist before succeeding.
// 
// with({NETWORK,GOSSIP} is currently required for in-JVM dtests to create
// the distributed system tables.
@Test
public void checkStartupWithoutTriggeringUnavailable() throws IOException, InterruptedException, ExecutionException, TimeoutException {
    int nodeCount = 4;
    // down from 30s default
    System.setProperty("cassandra.ring_delay_ms", "5000");
    System.setProperty("cassandra.consistent.rangemovement", "false");
    System.setProperty("cassandra.consistent.simultaneousmoves.allow", "true");
    try (Cluster cluster = Cluster.build(nodeCount).withConfig(config -> config.with(NETWORK).with(GOSSIP).set("partition_denylist_enabled", true).set("denylist_initial_load_retry", "1s")).createWithoutStarting()) {
        cluster.forEach(i -> {
            i.startup();
            i.runOnInstance(PartitionDenylistTest::waitUntilStarted);
        });
        // Do a cluster-wide no unavailables were recorded while the denylist was loaded.
        cluster.forEach(i -> i.runOnInstance(PartitionDenylistTest::checkNoUnavailables));
    }
}
Also used : Uninterruptibles(com.google.common.util.concurrent.Uninterruptibles) Logger(org.slf4j.Logger) LoggerFactory(org.slf4j.LoggerFactory) Global.currentTimeMillis(org.apache.cassandra.utils.Clock.Global.currentTimeMillis) TimeoutException(java.util.concurrent.TimeoutException) StorageService(org.apache.cassandra.service.StorageService) IOException(java.io.IOException) Test(org.junit.Test) ExecutionException(java.util.concurrent.ExecutionException) TimeUnit(java.util.concurrent.TimeUnit) StorageProxy(org.apache.cassandra.service.StorageProxy) Cluster(org.apache.cassandra.distributed.Cluster) Assert(org.junit.Assert) NETWORK(org.apache.cassandra.distributed.api.Feature.NETWORK) GOSSIP(org.apache.cassandra.distributed.api.Feature.GOSSIP) Cluster(org.apache.cassandra.distributed.Cluster) Test(org.junit.Test)

Example 17 with GOSSIP

use of org.apache.cassandra.distributed.api.Feature.GOSSIP in project cassandra by apache.

the class RepairErrorsTest method testNoSuchRepairSessionAnticompaction.

@Test
public void testNoSuchRepairSessionAnticompaction() throws IOException {
    try (Cluster cluster = init(Cluster.build(2).withConfig(config -> config.with(GOSSIP).with(NETWORK)).withInstanceInitializer(ByteBuddyHelper::installACNoSuchRepairSession).start())) {
        cluster.schemaChange("create table " + KEYSPACE + ".tbl (id int primary key, x int)");
        for (int i = 0; i < 10; i++) cluster.coordinator(1).execute("insert into " + KEYSPACE + ".tbl (id, x) VALUES (?,?)", ConsistencyLevel.ALL, i, i);
        cluster.forEach(i -> i.flush(KEYSPACE));
        long mark = cluster.get(1).logs().mark();
        cluster.forEach(i -> i.nodetoolResult("repair", KEYSPACE).asserts().failure());
        assertTrue(cluster.get(1).logs().grep(mark, "^ERROR").getResult().isEmpty());
    }
}
Also used : CompactionManager(org.apache.cassandra.db.compaction.CompactionManager) MethodDelegation(net.bytebuddy.implementation.MethodDelegation) ElementMatchers.named(net.bytebuddy.matcher.ElementMatchers.named) Collection(java.util.Collection) ByteBuddy(net.bytebuddy.ByteBuddy) Assert.assertTrue(org.junit.Assert.assertTrue) IOException(java.io.IOException) Test(org.junit.Test) UUID(java.util.UUID) ConsistencyLevel(org.apache.cassandra.distributed.api.ConsistencyLevel) ClassLoadingStrategy(net.bytebuddy.dynamic.loading.ClassLoadingStrategy) CompactionInterruptedException(org.apache.cassandra.db.compaction.CompactionInterruptedException) SSTableReader(org.apache.cassandra.io.sstable.format.SSTableReader) RangesAtEndpoint(org.apache.cassandra.locator.RangesAtEndpoint) UnfilteredRowIterator(org.apache.cassandra.db.rows.UnfilteredRowIterator) CompactionIterator(org.apache.cassandra.db.compaction.CompactionIterator) Assertions(org.assertj.core.api.Assertions) Cluster(org.apache.cassandra.distributed.Cluster) NETWORK(org.apache.cassandra.distributed.api.Feature.NETWORK) GOSSIP(org.apache.cassandra.distributed.api.Feature.GOSSIP) Cluster(org.apache.cassandra.distributed.Cluster) RangesAtEndpoint(org.apache.cassandra.locator.RangesAtEndpoint) Test(org.junit.Test)

Example 18 with GOSSIP

use of org.apache.cassandra.distributed.api.Feature.GOSSIP in project cassandra by apache.

the class RepairErrorsTest method testRemoteValidationFailure.

@Test
public void testRemoteValidationFailure() throws IOException {
    Cluster.Builder builder = Cluster.build(2).withConfig(config -> config.with(GOSSIP).with(NETWORK)).withInstanceInitializer(ByteBuddyHelper::install);
    try (Cluster cluster = builder.createWithoutStarting()) {
        cluster.setUncaughtExceptionsFilter((i, throwable) -> {
            if (i == 2)
                return throwable.getMessage() != null && throwable.getMessage().contains("IGNORE");
            return false;
        });
        cluster.startup();
        init(cluster);
        cluster.schemaChange("create table " + KEYSPACE + ".tbl (id int primary key, x int)");
        for (int i = 0; i < 10; i++) cluster.coordinator(1).execute("insert into " + KEYSPACE + ".tbl (id, x) VALUES (?,?)", ConsistencyLevel.ALL, i, i);
        cluster.forEach(i -> i.flush(KEYSPACE));
        long mark = cluster.get(1).logs().mark();
        cluster.forEach(i -> i.nodetoolResult("repair", "--full").asserts().failure());
        Assertions.assertThat(cluster.get(1).logs().grep(mark, "^ERROR").getResult()).isEmpty();
    }
}
Also used : CompactionManager(org.apache.cassandra.db.compaction.CompactionManager) MethodDelegation(net.bytebuddy.implementation.MethodDelegation) ElementMatchers.named(net.bytebuddy.matcher.ElementMatchers.named) Collection(java.util.Collection) ByteBuddy(net.bytebuddy.ByteBuddy) Assert.assertTrue(org.junit.Assert.assertTrue) IOException(java.io.IOException) Test(org.junit.Test) UUID(java.util.UUID) ConsistencyLevel(org.apache.cassandra.distributed.api.ConsistencyLevel) ClassLoadingStrategy(net.bytebuddy.dynamic.loading.ClassLoadingStrategy) CompactionInterruptedException(org.apache.cassandra.db.compaction.CompactionInterruptedException) SSTableReader(org.apache.cassandra.io.sstable.format.SSTableReader) RangesAtEndpoint(org.apache.cassandra.locator.RangesAtEndpoint) UnfilteredRowIterator(org.apache.cassandra.db.rows.UnfilteredRowIterator) CompactionIterator(org.apache.cassandra.db.compaction.CompactionIterator) Assertions(org.assertj.core.api.Assertions) Cluster(org.apache.cassandra.distributed.Cluster) NETWORK(org.apache.cassandra.distributed.api.Feature.NETWORK) GOSSIP(org.apache.cassandra.distributed.api.Feature.GOSSIP) Cluster(org.apache.cassandra.distributed.Cluster) RangesAtEndpoint(org.apache.cassandra.locator.RangesAtEndpoint) Test(org.junit.Test)

Example 19 with GOSSIP

use of org.apache.cassandra.distributed.api.Feature.GOSSIP in project cassandra by apache.

the class ReprepareFuzzTest method fuzzTest.

@Test
public void fuzzTest() throws Throwable {
    try (ICluster<IInvokableInstance> c = builder().withNodes(1).withConfig(config -> config.with(GOSSIP, NETWORK, NATIVE_PROTOCOL)).withInstanceInitializer(PrepareBehaviour::alwaysNewBehaviour).start()) {
        // Long string to make us invalidate caches occasionally
        String veryLongString = "very";
        for (int i = 0; i < 2; i++) veryLongString += veryLongString;
        final String qualified = "SELECT pk as " + veryLongString + "%d, ck as " + veryLongString + "%d FROM ks%d.tbl";
        final String unqualified = "SELECT pk as " + veryLongString + "%d, ck as " + veryLongString + "%d FROM tbl";
        int KEYSPACES = 3;
        final int STATEMENTS_PER_KS = 3;
        for (int i = 0; i < KEYSPACES; i++) {
            c.schemaChange(withKeyspace("CREATE KEYSPACE ks" + i + " WITH replication = {'class': 'SimpleStrategy', 'replication_factor': 1};"));
            c.schemaChange(withKeyspace("CREATE TABLE ks" + i + ".tbl (pk int, ck int, PRIMARY KEY (pk, ck));"));
            for (int j = 0; j < i; j++) c.coordinator(1).execute("INSERT INTO ks" + i + ".tbl (pk, ck) VALUES (?, ?)", ConsistencyLevel.QUORUM, 1, j);
        }
        List<Thread> threads = new ArrayList<>();
        AtomicBoolean interrupt = new AtomicBoolean(false);
        AtomicReference<Throwable> thrown = new AtomicReference<>();
        int INFREQUENT_ACTION_COEF = 10;
        long deadline = System.nanoTime() + TimeUnit.SECONDS.toNanos(60);
        for (int i = 0; i < FBUtilities.getAvailableProcessors() * 2; i++) {
            int seed = i;
            threads.add(new Thread(() -> {
                com.datastax.driver.core.Cluster cluster = null;
                Session session = null;
                try {
                    Random rng = new Random(seed);
                    int usedKsIdx = -1;
                    String usedKs = null;
                    Map<Pair<Integer, Integer>, PreparedStatement> qualifiedStatements = new HashMap<>();
                    Map<Pair<Integer, Integer>, PreparedStatement> unqualifiedStatements = new HashMap<>();
                    cluster = com.datastax.driver.core.Cluster.builder().addContactPoint("127.0.0.1").build();
                    session = cluster.connect();
                    while (!interrupt.get() && (System.nanoTime() < deadline)) {
                        final int ks = rng.nextInt(KEYSPACES);
                        final int statementIdx = rng.nextInt(STATEMENTS_PER_KS);
                        final Pair<Integer, Integer> statementId = Pair.create(ks, statementIdx);
                        int v = rng.nextInt(INFREQUENT_ACTION_COEF + 1);
                        Action[] pool;
                        if (v == INFREQUENT_ACTION_COEF)
                            pool = infrequent;
                        else
                            pool = frequent;
                        Action action = pool[rng.nextInt(pool.length)];
                        switch(action) {
                            case EXECUTE_QUALIFIED:
                                if (!qualifiedStatements.containsKey(statementId))
                                    continue;
                                try {
                                    int counter = 0;
                                    for (Iterator<Object[]> iter = RowUtil.toObjects(session.execute(qualifiedStatements.get(statementId).bind())); iter.hasNext(); ) {
                                        Object[] current = iter.next();
                                        int v0 = (int) current[0];
                                        int v1 = (int) current[1];
                                        Assert.assertEquals(v0, 1);
                                        Assert.assertEquals(v1, counter++);
                                    }
                                    Assert.assertEquals(ks, counter);
                                } catch (Throwable t) {
                                    if (t.getCause() != null && t.getCause().getMessage().contains("Statement was prepared on keyspace"))
                                        continue;
                                    throw t;
                                }
                                break;
                            case EXECUTE_UNQUALIFIED:
                                if (!unqualifiedStatements.containsKey(statementId))
                                    continue;
                                try {
                                    int counter = 0;
                                    for (Iterator<Object[]> iter = RowUtil.toObjects(session.execute(unqualifiedStatements.get(statementId).bind())); iter.hasNext(); ) {
                                        Object[] current = iter.next();
                                        int v0 = (int) current[0];
                                        int v1 = (int) current[1];
                                        Assert.assertEquals(v0, 1);
                                        Assert.assertEquals(v1, counter++);
                                    }
                                    Assert.assertEquals(unqualifiedStatements.get(statementId).getQueryKeyspace() + " " + usedKs + " " + statementId, Integer.parseInt(unqualifiedStatements.get(statementId).getQueryKeyspace().replace("ks", "")), counter);
                                } catch (Throwable t) {
                                    if (t.getCause() != null && t.getCause().getMessage().contains("Statement was prepared on keyspace"))
                                        continue;
                                    throw t;
                                }
                                break;
                            case PREPARE_QUALIFIED:
                                {
                                    String qs = String.format(qualified, statementIdx, statementIdx, ks);
                                    String keyspace = "ks" + ks;
                                    PreparedStatement preparedQualified = session.prepare(qs);
                                    // With prepared qualified, keyspace will be set to the keyspace of the statement when it was first executed
                                    PreparedStatementHelper.assertHashWithoutKeyspace(preparedQualified, qs, keyspace);
                                    qualifiedStatements.put(statementId, preparedQualified);
                                }
                                break;
                            case PREPARE_UNQUALIFIED:
                                try {
                                    String qs = String.format(unqualified, statementIdx, statementIdx, ks);
                                    PreparedStatement preparedUnqalified = session.prepare(qs);
                                    Assert.assertEquals(preparedUnqalified.getQueryKeyspace(), usedKs);
                                    PreparedStatementHelper.assertHashWithKeyspace(preparedUnqalified, qs, usedKs);
                                    unqualifiedStatements.put(Pair.create(usedKsIdx, statementIdx), preparedUnqalified);
                                } catch (InvalidQueryException iqe) {
                                    if (!iqe.getMessage().contains("No keyspace has been"))
                                        throw iqe;
                                } catch (Throwable t) {
                                    if (usedKs == null) {
                                        // ignored
                                        continue;
                                    }
                                    throw t;
                                }
                                break;
                            case CLEAR_CACHES:
                                c.get(1).runOnInstance(() -> {
                                    SystemKeyspace.loadPreparedStatements((id, query, keyspace) -> {
                                        if (rng.nextBoolean())
                                            QueryProcessor.instance.evictPrepared(id);
                                        return true;
                                    });
                                });
                                break;
                            case RELOAD_FROM_TABLES:
                                c.get(1).runOnInstance(QueryProcessor::clearPreparedStatementsCache);
                                c.get(1).runOnInstance(() -> QueryProcessor.instance.preloadPreparedStatements());
                                break;
                            case SWITCH_KEYSPACE:
                                usedKsIdx = ks;
                                usedKs = "ks" + ks;
                                session.execute("USE " + usedKs);
                                break;
                            case FORGET_PREPARED:
                                Map<Pair<Integer, Integer>, PreparedStatement> toCleanup = rng.nextBoolean() ? qualifiedStatements : unqualifiedStatements;
                                Set<Pair<Integer, Integer>> toDrop = new HashSet<>();
                                for (Pair<Integer, Integer> e : toCleanup.keySet()) {
                                    if (rng.nextBoolean())
                                        toDrop.add(e);
                                }
                                for (Pair<Integer, Integer> e : toDrop) toCleanup.remove(e);
                                toDrop.clear();
                                break;
                            case RECONNECT:
                                session.close();
                                cluster.close();
                                cluster = com.datastax.driver.core.Cluster.builder().addContactPoint("127.0.0.1").build();
                                session = cluster.connect();
                                qualifiedStatements.clear();
                                unqualifiedStatements.clear();
                                usedKs = null;
                                usedKsIdx = -1;
                                break;
                        }
                    }
                } catch (Throwable t) {
                    interrupt.set(true);
                    t.printStackTrace();
                    while (true) {
                        Throwable seen = thrown.get();
                        Throwable merged = Throwables.merge(seen, t);
                        if (thrown.compareAndSet(seen, merged))
                            break;
                    }
                    throw t;
                } finally {
                    if (session != null)
                        session.close();
                    if (cluster != null)
                        cluster.close();
                }
            }));
        }
        for (Thread thread : threads) thread.start();
        for (Thread thread : threads) thread.join();
        if (thrown.get() != null)
            throw thrown.get();
    }
}
Also used : DynamicType(net.bytebuddy.dynamic.DynamicType) MethodDelegation(net.bytebuddy.implementation.MethodDelegation) ByteBuddy(net.bytebuddy.ByteBuddy) LoggerFactory(org.slf4j.LoggerFactory) AtomicBoolean(java.util.concurrent.atomic.AtomicBoolean) PreparedStatementHelper(com.datastax.driver.core.PreparedStatementHelper) HashMap(java.util.HashMap) Random(java.util.Random) QueryProcessor(org.apache.cassandra.cql3.QueryProcessor) AtomicReference(java.util.concurrent.atomic.AtomicReference) SystemKeyspace(org.apache.cassandra.db.SystemKeyspace) ArrayList(java.util.ArrayList) NATIVE_PROTOCOL(org.apache.cassandra.distributed.api.Feature.NATIVE_PROTOCOL) HashSet(java.util.HashSet) PreparedStatement(com.datastax.driver.core.PreparedStatement) RowUtil(org.apache.cassandra.distributed.impl.RowUtil) Pair(org.apache.cassandra.utils.Pair) Map(java.util.Map) Session(com.datastax.driver.core.Session) NETWORK(org.apache.cassandra.distributed.api.Feature.NETWORK) Logger(org.slf4j.Logger) FBUtilities(org.apache.cassandra.utils.FBUtilities) Iterator(java.util.Iterator) ElementMatchers.named(net.bytebuddy.matcher.ElementMatchers.named) Set(java.util.Set) ICluster(org.apache.cassandra.distributed.api.ICluster) Test(org.junit.Test) ConsistencyLevel(org.apache.cassandra.distributed.api.ConsistencyLevel) ClassLoadingStrategy(net.bytebuddy.dynamic.loading.ClassLoadingStrategy) TimeUnit(java.util.concurrent.TimeUnit) List(java.util.List) IInvokableInstance(org.apache.cassandra.distributed.api.IInvokableInstance) InvalidQueryException(com.datastax.driver.core.exceptions.InvalidQueryException) Throwables(org.apache.cassandra.utils.Throwables) Assert(org.junit.Assert) GOSSIP(org.apache.cassandra.distributed.api.Feature.GOSSIP) IInvokableInstance(org.apache.cassandra.distributed.api.IInvokableInstance) HashSet(java.util.HashSet) Set(java.util.Set) ArrayList(java.util.ArrayList) Random(java.util.Random) Iterator(java.util.Iterator) Pair(org.apache.cassandra.utils.Pair) ICluster(org.apache.cassandra.distributed.api.ICluster) AtomicReference(java.util.concurrent.atomic.AtomicReference) PreparedStatement(com.datastax.driver.core.PreparedStatement) AtomicBoolean(java.util.concurrent.atomic.AtomicBoolean) HashMap(java.util.HashMap) Map(java.util.Map) InvalidQueryException(com.datastax.driver.core.exceptions.InvalidQueryException) Session(com.datastax.driver.core.Session) Test(org.junit.Test)

Example 20 with GOSSIP

use of org.apache.cassandra.distributed.api.Feature.GOSSIP in project cassandra by apache.

the class PreviewRepairTest method snapshotTest.

@Test
public void snapshotTest() throws IOException, InterruptedException {
    try (Cluster cluster = init(Cluster.build(3).withConfig(config -> config.set("snapshot_on_repaired_data_mismatch", true).with(GOSSIP).with(NETWORK)).start())) {
        cluster.schemaChange("create table " + KEYSPACE + ".tbl (id int primary key, t int)");
        cluster.schemaChange("create table " + KEYSPACE + ".tbl2 (id int primary key, t int)");
        // populate 2 tables
        insert(cluster.coordinator(1), 0, 100, "tbl");
        insert(cluster.coordinator(1), 0, 100, "tbl2");
        cluster.forEach((n) -> n.flush(KEYSPACE));
        // make sure everything is marked repaired
        cluster.get(1).callOnInstance(repair(options(false, false)));
        waitMarkedRepaired(cluster);
        // make node2 mismatch
        unmarkRepaired(cluster.get(2), "tbl");
        verifySnapshots(cluster, "tbl", true);
        verifySnapshots(cluster, "tbl2", true);
        AtomicInteger snapshotMessageCounter = new AtomicInteger();
        cluster.filters().verbs(Verb.SNAPSHOT_REQ.id).messagesMatching((from, to, message) -> {
            snapshotMessageCounter.incrementAndGet();
            return false;
        }).drop();
        cluster.get(1).callOnInstance(repair(options(true, true)));
        verifySnapshots(cluster, "tbl", false);
        // tbl2 should not have a mismatch, so the snapshots should be empty here
        verifySnapshots(cluster, "tbl2", true);
        assertEquals(3, snapshotMessageCounter.get());
        // and make sure that we don't try to snapshot again
        snapshotMessageCounter.set(0);
        cluster.get(3).callOnInstance(repair(options(true, true)));
        assertEquals(0, snapshotMessageCounter.get());
    }
}
Also used : Arrays(java.util.Arrays) TimeoutException(java.util.concurrent.TimeoutException) IMessage(org.apache.cassandra.distributed.api.IMessage) SSTableReader(org.apache.cassandra.io.sstable.format.SSTableReader) Future(java.util.concurrent.Future) AtomicInteger(java.util.concurrent.atomic.AtomicInteger) Map(java.util.Map) Condition.newOneTimeCondition(org.apache.cassandra.utils.concurrent.Condition.newOneTimeCondition) DatabaseDescriptor(org.apache.cassandra.config.DatabaseDescriptor) Keyspace(org.apache.cassandra.db.Keyspace) NodeToolResult(org.apache.cassandra.distributed.api.NodeToolResult) ImmutableList.of(com.google.common.collect.ImmutableList.of) FBUtilities(org.apache.cassandra.utils.FBUtilities) RepairResult(org.apache.cassandra.distributed.shared.RepairResult) ConsistencyLevel(org.apache.cassandra.distributed.api.ConsistencyLevel) Verb(org.apache.cassandra.net.Verb) Executors(java.util.concurrent.Executors) FinalizePropose(org.apache.cassandra.repair.messages.FinalizePropose) List(java.util.List) ColumnFamilyStore(org.apache.cassandra.db.ColumnFamilyStore) Assert.assertFalse(org.junit.Assert.assertFalse) Instance.deserializeMessage(org.apache.cassandra.distributed.impl.Instance.deserializeMessage) CompactionManager(org.apache.cassandra.db.compaction.CompactionManager) RepairOption(org.apache.cassandra.repair.messages.RepairOption) Matcher(org.apache.cassandra.distributed.api.IMessageFilters.Matcher) BeforeClass(org.junit.BeforeClass) AtomicBoolean(java.util.concurrent.atomic.AtomicBoolean) Range(org.apache.cassandra.dht.Range) HashMap(java.util.HashMap) Message(org.apache.cassandra.net.Message) MINUTES(java.util.concurrent.TimeUnit.MINUTES) RepairParallelism(org.apache.cassandra.repair.RepairParallelism) ArrayList(java.util.ArrayList) Token(org.apache.cassandra.dht.Token) ActiveRepairService(org.apache.cassandra.service.ActiveRepairService) DelayFirstRepairTypeMessageFilter.finalizePropose(org.apache.cassandra.distributed.test.PreviewRepairTest.DelayFirstRepairTypeMessageFilter.finalizePropose) ICoordinator(org.apache.cassandra.distributed.api.ICoordinator) IIsolatedExecutor(org.apache.cassandra.distributed.api.IIsolatedExecutor) StorageService.instance(org.apache.cassandra.service.StorageService.instance) ProgressEventType(org.apache.cassandra.utils.progress.ProgressEventType) ExecutorService(java.util.concurrent.ExecutorService) NETWORK(org.apache.cassandra.distributed.api.Feature.NETWORK) Uninterruptibles(com.google.common.util.concurrent.Uninterruptibles) DelayFirstRepairTypeMessageFilter.validationRequest(org.apache.cassandra.distributed.test.PreviewRepairTest.DelayFirstRepairTypeMessageFilter.validationRequest) VALIDATION_REQ(org.apache.cassandra.net.Verb.VALIDATION_REQ) StorageService(org.apache.cassandra.service.StorageService) Assert.assertTrue(org.junit.Assert.assertTrue) IOException(java.io.IOException) Condition(org.apache.cassandra.utils.concurrent.Condition) Test(org.junit.Test) FINALIZE_PROPOSE_MSG(org.apache.cassandra.net.Verb.FINALIZE_PROPOSE_MSG) ExecutionException(java.util.concurrent.ExecutionException) TimeUnit(java.util.concurrent.TimeUnit) RepairMessage(org.apache.cassandra.repair.messages.RepairMessage) PreviewKind(org.apache.cassandra.streaming.PreviewKind) IInvokableInstance(org.apache.cassandra.distributed.api.IInvokableInstance) ValidationRequest(org.apache.cassandra.repair.messages.ValidationRequest) Cluster(org.apache.cassandra.distributed.Cluster) Assert.assertEquals(org.junit.Assert.assertEquals) GOSSIP(org.apache.cassandra.distributed.api.Feature.GOSSIP) AtomicInteger(java.util.concurrent.atomic.AtomicInteger) Cluster(org.apache.cassandra.distributed.Cluster) Test(org.junit.Test)

Aggregations

GOSSIP (org.apache.cassandra.distributed.api.Feature.GOSSIP)34 NETWORK (org.apache.cassandra.distributed.api.Feature.NETWORK)33 Test (org.junit.Test)32 Cluster (org.apache.cassandra.distributed.Cluster)27 Assert (org.junit.Assert)16 IInvokableInstance (org.apache.cassandra.distributed.api.IInvokableInstance)15 ConsistencyLevel (org.apache.cassandra.distributed.api.ConsistencyLevel)14 NATIVE_PROTOCOL (org.apache.cassandra.distributed.api.Feature.NATIVE_PROTOCOL)14 ByteBuddy (net.bytebuddy.ByteBuddy)12 ClassLoadingStrategy (net.bytebuddy.dynamic.loading.ClassLoadingStrategy)12 MethodDelegation (net.bytebuddy.implementation.MethodDelegation)12 ElementMatchers.named (net.bytebuddy.matcher.ElementMatchers.named)12 StorageService (org.apache.cassandra.service.StorageService)12 TimeUnit (java.util.concurrent.TimeUnit)11 List (java.util.List)10 Map (java.util.Map)10 ICluster (org.apache.cassandra.distributed.api.ICluster)10 NetworkTopology (org.apache.cassandra.distributed.shared.NetworkTopology)10 IOException (java.io.IOException)9 TokenSupplier (org.apache.cassandra.distributed.api.TokenSupplier)9