Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
38 changes: 28 additions & 10 deletions src/server/pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -64,7 +64,7 @@
<groupId>com.google.guava</groupId>
<artifactId>guava</artifactId>
<version>24.1.1-jre</version>
</dependency>
</dependency>
<dependency>
<groupId>ch.qos.logback</groupId>
<artifactId>logback-core</artifactId>
Expand Down Expand Up @@ -130,7 +130,7 @@
<dependency>
<groupId>org.apache.cassandra</groupId>
<artifactId>cassandra-all</artifactId>
<version>2.2.12</version>
<version>3.11.17</version>
<exclusions>
<exclusion>
<groupId>org.slf4j</groupId>
Expand All @@ -143,11 +143,7 @@
<exclusion>
<groupId>com.google.guava</groupId>
<artifactId>guava</artifactId>
</exclusion>
<exclusion>
<groupId>io.netty</groupId>
<artifactId>netty-all</artifactId>
</exclusion>
</exclusion>
<exclusion>
<groupId>org.hibernate</groupId>
<artifactId>hibernate-validator</artifactId>
Expand All @@ -171,6 +167,26 @@
<artifactId>netty-handler</artifactId>
<version>4.1.94.Final</version>
</dependency>
<dependency>
<groupId>com.boundary</groupId>
<artifactId>high-scale-lib</artifactId>
<version>1.0.6</version>
</dependency>
<dependency>
<groupId>com.github.jbellis</groupId>
<artifactId>jamm</artifactId>
<version>0.3.0</version>
</dependency>
<dependency>
<groupId>io.netty</groupId>
<artifactId>netty-all</artifactId>
<version>4.1.116.Final</version>
</dependency>
<dependency>
<groupId>com.fasterxml.jackson.datatype</groupId>
<artifactId>jackson-datatype-joda</artifactId>
<version>2.15.2</version>
</dependency>
<dependency>
<groupId>com.datastax.cassandra</groupId>
<artifactId>cassandra-driver-core</artifactId>
Expand Down Expand Up @@ -265,8 +281,6 @@
<artifactId>jersey-guava</artifactId>
<version>2.26-b03</version>
</dependency>
<!-- https://mvnrepository.com/artifact/org.glassfish.main.external/jmxremote_optional-repackaged -->
<!-- Used to connect to Cassandra through JMXMP protocol-->
<dependency>
<groupId>org.glassfish.main.external</groupId>
<artifactId>jmxremote_optional-repackaged</artifactId>
Expand All @@ -277,13 +291,17 @@
<artifactId>datastax-mgmtapi-client-openapi</artifactId>
<version>${management.api.version}</version>
</dependency>
<dependency>
<groupId>com.squareup.okio</groupId>
<artifactId>okio-jvm</artifactId>
<version>3.4.0</version>
</dependency>
<dependency>
<groupId>org.eclipse.store</groupId>
<artifactId>storage-embedded</artifactId>
<version>${eclipsestore.version}</version>
</dependency>


<!--test scope -->

<dependency>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -933,8 +933,11 @@ public void takeSnapshot(String var1, String... var2) throws IOException {
this.getStorageServiceMBean().takeSnapshot(var1, var2);
}

public void takeColumnFamilySnapshot(String var1, String var2, String var3) throws IOException {
this.getStorageServiceMBean().takeColumnFamilySnapshot(var1, var2, var3);
public void takeColumnFamilySnapshot(String keySpaceName, String columnFamilyName, String tag) throws IOException {
Map<String, String> options = new HashMap<>();
String target = (columnFamilyName == null || columnFamilyName.trim().isEmpty()) ? keySpaceName
: keySpaceName + "." + columnFamilyName;
this.getStorageServiceMBean().takeSnapshot(tag, options, target);
}

public Map<String, String> getTokenToEndpointMap() {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -19,23 +19,43 @@

import io.cassandrareaper.core.Stream;

import java.io.File;
import java.net.InetAddress;
import java.net.UnknownHostException;
import java.util.List;
import java.util.UUID;

import com.google.common.collect.ImmutableSet;
import org.apache.cassandra.config.DatabaseDescriptor;
import org.apache.cassandra.streaming.ProgressInfo;
import org.apache.cassandra.streaming.SessionInfo;
import org.apache.cassandra.streaming.StreamSession;
import org.apache.cassandra.streaming.StreamState;
import org.apache.cassandra.streaming.StreamSummary;
import org.junit.BeforeClass;
import org.junit.Test;

import static org.junit.Assert.assertEquals;


public final class StreamFactoryTest {
private static final String STREAM_FACTORY_TEST_CASSANDRA_FILE = "stream-factory-test-cassandra.yaml";

@BeforeClass
public static void setupClass() {
String configPath = Thread.currentThread().getContextClassLoader()
.getResource(STREAM_FACTORY_TEST_CASSANDRA_FILE).toString();
if (configPath == null) {
throw new IllegalStateException("Cassandra configuration file not found in resources!");
}
System.setProperty("cassandra.config", configPath);
new File("/tmp/cassandra/data").mkdirs();
new File("/tmp/cassandra/commitlog").mkdirs();
new File("/tmp/cassandra/saved_caches").mkdirs();
new File("/tmp/cassandra/hints").mkdirs();
new File("/tmp/cassandra/cdc_raw").mkdirs();
DatabaseDescriptor.daemonInitialization();
}

@Test
public void testCountProgressPerTableWithTable() throws UnknownHostException {
Expand Down
14 changes: 14 additions & 0 deletions src/server/src/test/resources/stream-factory-test-cassandra.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,14 @@
commitlog_sync: periodic
commitlog_sync_period_in_ms: 10000
partitioner: org.apache.cassandra.dht.Murmur3Partitioner
data_file_directories:
- /tmp/cassandra/data
commitlog_directory: /tmp/cassandra/commitlog
saved_caches_directory: /tmp/cassandra/saved_caches
hints_directory: /tmp/cassandra/hints
cdc_raw_directory: /tmp/cassandra/cdc_raw
endpoint_snitch: org.apache.cassandra.locator.SimpleSnitch
seed_provider:
- class_name: org.apache.cassandra.locator.SimpleSeedProvider
parameters:
- seeds: "127.0.0.1"
Loading