Package io.debezium.connector.cassandra
Class TestUtils
java.lang.Object
io.debezium.connector.cassandra.TestUtils
-
Field Summary
Fields -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionstatic voidclearCommitLogFromDirectory(File directory, boolean recursive) Delete all commit log files in directorystatic voidstatic voidcreateTestKeyspace(String keyspace) static voidstatic voiddeleteTestKeyspaceTables(String keyspaceName) static voiddeleteTestOffsets(io.debezium.connector.cassandra.CassandraConnectorContext context) Delete all files in offset backing store directoryprotected static Propertiesstatic StringkeyspaceTable(String tableName) Return the full name of the test table in the form of. static voidpopulateFakeCommitLogsForDirectory(int numOfFiles, File directory) Generate commit log files in directorystatic voidrunCql(com.datastax.oss.driver.api.core.cql.SimpleStatement statement) static voidstatic voidstatic voidtruncateTestKeyspaceTableData(String keyspace)
-
Field Details
-
TEST_CONNECTOR_NAME
- See Also:
-
TEST_CASSANDRA_YAML_CONFIG
- See Also:
-
TEST_CASSANDRA_HOSTS
- See Also:
-
TEST_CASSANDRA_PORT
public static final int TEST_CASSANDRA_PORT- See Also:
-
TEST_KAFKA_SERVERS
- See Also:
-
TEST_SCHEMA_REGISTRY_URL
- See Also:
-
TEST_KAFKA_TOPIC_PREFIX
- See Also:
-
TEST_KEYSPACE_NAME
- See Also:
-
TEST_KEYSPACE_NAME_2
- See Also:
-
TEST_TABLE_NAME
-
TEST_TABLE_NAME_2
-
-
Constructor Details
-
TestUtils
public TestUtils()
-
-
Method Details
-
generateDefaultConfigMap
- Throws:
IOException
-
propertiesForContext
- Throws:
IOException
-
createTestKeyspace
- Throws:
Exception
-
createTestKeyspace
- Throws:
Exception
-
getTables
-
truncateTestKeyspaceTableData
public static void truncateTestKeyspaceTableData() -
truncateTestKeyspaceTableData
-
deleteTestKeyspaceTables
- Throws:
Exception
-
deleteTestKeyspaceTables
- Throws:
Exception
-
runCql
-
runCql
public static void runCql(com.datastax.oss.driver.api.core.cql.SimpleStatement statement) -
deleteTestOffsets
public static void deleteTestOffsets(io.debezium.connector.cassandra.CassandraConnectorContext context) throws IOException Delete all files in offset backing store directory- Throws:
IOException
-
keyspaceTable
Return the full name of the test table in the form of. populateFakeCommitLogsForDirectory
public static void populateFakeCommitLogsForDirectory(int numOfFiles, File directory) throws IOException Generate commit log files in directory- Throws:
IOException
clearCommitLogFromDirectory
public static void clearCommitLogFromDirectory(File directory, boolean recursive) throws IOException Delete all commit log files in directory- Throws:
IOException
-