-
Notifications
You must be signed in to change notification settings - Fork 45
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
DBZ-8363 creation of single test artifact
- Loading branch information
1 parent
b777a76
commit e9f9d9e
Showing
80 changed files
with
918 additions
and
3,125 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
113 changes: 0 additions & 113 deletions
113
...andra-3/src/test/java/io/debezium/connector/cassandra/AbstractCommitLogProcessorTest.java
This file was deleted.
Oops, something went wrong.
97 changes: 0 additions & 97 deletions
97
cassandra-3/src/test/java/io/debezium/connector/cassandra/BatchTest.java
This file was deleted.
Oops, something went wrong.
79 changes: 79 additions & 0 deletions
79
cassandra-3/src/test/java/io/debezium/connector/cassandra/Cassandra3TestProvider.java
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,79 @@ | ||
/* | ||
* Copyright Debezium Authors. | ||
* | ||
* Licensed under the Apache Software License version 2.0, available at http://www.apache.org/licenses/LICENSE-2.0 | ||
*/ | ||
package io.debezium.connector.cassandra; | ||
|
||
import java.io.File; | ||
import java.io.IOException; | ||
|
||
import org.apache.cassandra.db.commitlog.CommitLogReadHandler; | ||
import org.apache.cassandra.db.commitlog.CommitLogReader; | ||
|
||
import io.debezium.config.Configuration; | ||
import io.debezium.connector.cassandra.spi.CassandraTestProvider; | ||
import io.debezium.connector.cassandra.spi.CommitLogProcessing; | ||
import io.debezium.connector.cassandra.transforms.CassandraTypeDeserializer; | ||
|
||
public class Cassandra3TestProvider implements CassandraTestProvider { | ||
@Override | ||
public CommitLogProcessing provideCommitLogProcessing(CassandraConnectorContext context, CommitLogProcessorMetrics metrics) { | ||
return new Cassandra3CommitLogProcessing(context, metrics); | ||
} | ||
|
||
private static class Cassandra3CommitLogProcessing implements CommitLogProcessing { | ||
|
||
private final CommitLogReadHandler commitLogReadHandler; | ||
private final CommitLogSegmentReader commitLogSegmentReader; | ||
private final CassandraConnectorContext context; | ||
|
||
Cassandra3CommitLogProcessing(CassandraConnectorContext context, CommitLogProcessorMetrics metrics) { | ||
commitLogReadHandler = new Cassandra3CommitLogReadHandlerImpl(context, metrics); | ||
commitLogSegmentReader = new Cassandra3CommitLogSegmentReader(context, metrics); | ||
this.context = context; | ||
} | ||
|
||
@Override | ||
public void readAllCommitLogs(File[] commitLogs) throws IOException { | ||
CommitLogReader reader = new CommitLogReader(); | ||
File cdcLoc = new File(context.getCassandraConnectorConfig().getCDCLogLocation()); | ||
for (File commitLog : CommitLogUtil.getCommitLogs(cdcLoc)) { | ||
reader.readCommitLogSegment(commitLogReadHandler, commitLog, true); | ||
} | ||
} | ||
|
||
@Override | ||
public void readCommitLogSegment(File file, long segmentId, int position) throws IOException { | ||
commitLogSegmentReader.readCommitLogSegment(file, segmentId, position); | ||
} | ||
|
||
@Override | ||
public CommitLogSegmentReader getCommitLogSegmentReader() { | ||
return commitLogSegmentReader; | ||
} | ||
} | ||
|
||
@Override | ||
public CassandraConnectorContext provideContext(Configuration configuration) throws Exception { | ||
CassandraConnectorConfig config = new CassandraConnectorConfig(configuration); | ||
Cassandra3TypeProvider provider = new Cassandra3TypeProvider(); | ||
CassandraTypeDeserializer.init(provider.deserializers(), config.getDecimalMode(), config.getVarIntMode(), | ||
provider.baseTypeForReversedType()); | ||
|
||
return new DefaultCassandraConnectorContext(config, | ||
new CassandraConnectorTask.Cassandra3SchemaLoader(), | ||
new CassandraConnectorTask.Cassandra3SchemaChangeListenerProvider(), | ||
new FileOffsetWriter(config)); | ||
} | ||
|
||
@Override | ||
public CassandraConnectorContext provideContextWithoutSchemaManagement(Configuration configuration) { | ||
CassandraConnectorConfig config = new CassandraConnectorConfig(configuration); | ||
Cassandra3TypeProvider provider = new Cassandra3TypeProvider(); | ||
CassandraTypeDeserializer.init(provider.deserializers(), config.getDecimalMode(), config.getVarIntMode(), | ||
provider.baseTypeForReversedType()); | ||
|
||
return new DefaultCassandraConnectorContext(new CassandraConnectorConfig(configuration)); | ||
} | ||
} |
58 changes: 0 additions & 58 deletions
58
...t/java/io/debezium/connector/cassandra/ClusteringPartitionKeyCommitLogProcessingTest.java
This file was deleted.
Oops, something went wrong.
Oops, something went wrong.