Skip to content

Commit

Permalink
Edit
Browse files Browse the repository at this point in the history
  • Loading branch information
FilahAnas committed Mar 29, 2024
1 parent d87518d commit 169168d
Show file tree
Hide file tree
Showing 5 changed files with 4 additions and 157 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -51,7 +51,7 @@ dependencies {
dataGeneratorImplementation ('com.github.javafaker:javafaker:1.0.2') { exclude module: 'snakeyaml' }
dataGeneratorImplementation 'io.github.oshai:kotlin-logging-jvm:5.1.0'
dataGeneratorImplementation 'org.jetbrains.kotlinx:kotlinx-cli-jvm:0.3.5'
dataGeneratorImplementation 'org.mongodb:mongodb-driver-sync:3.12.10'
dataGeneratorImplementation 'org.mongodb:mongodb-driver-sync:4.10.2'

debeziumTestImplementation 'io.debezium:debezium-embedded:2.4.0.Final'
debeziumTestImplementation 'io.debezium:debezium-connector-mongodb:2.4.0.Final'
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,7 @@
package io.airbyte.integrations.source.mongodb;

import com.mongodb.client.MongoCollection;
import com.mongodb.client.MongoDatabase;
import com.mongodb.client.model.*;
import io.airbyte.cdk.integrations.source.relationaldb.state.SourceStateIterator;
import io.airbyte.cdk.integrations.source.relationaldb.state.StateEmitFrequency;
Expand Down

This file was deleted.

Original file line number Diff line number Diff line change
Expand Up @@ -17,6 +17,7 @@
import com.mongodb.client.MongoClient;
import com.mongodb.client.MongoCollection;
import com.mongodb.client.MongoCursor;
import com.mongodb.client.MongoDatabase;
import com.mongodb.client.MongoIterable;
import com.mongodb.client.model.Aggregates;
import com.mongodb.client.model.Projections;
Expand Down Expand Up @@ -176,7 +177,7 @@ public static int getDebeziumEventQueueSize(final MongoDbSourceConfig config) {
public static Optional<CollectionStatistics> getCollectionStatistics(final MongoClient mongoClient, final ConfiguredAirbyteStream stream) {
try {
final Map<String, Object> collStats = Map.of(MongoConstants.STORAGE_STATS_KEY, Map.of(), MongoConstants.COUNT_KEY, Map.of());
final MongoDatabase mongoDatabase = (MongoDatabase) mongoClient.getDatabase(stream.getStream().getNamespace());
final MongoDatabase mongoDatabase = mongoClient.getDatabase(stream.getStream().getNamespace());
final MongoCollection<Document> collection = mongoDatabase.getCollection(stream.getStream().getName());
final AggregateIterable<Document> output = collection.aggregate(List.of(new Document("$collStats", collStats)));

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,6 @@
import com.fasterxml.jackson.databind.JsonNode;
import com.mongodb.MongoCredential;
import com.mongodb.MongoSecurityException;

import com.mongodb.client.*;
import com.mongodb.connection.ClusterDescription;
import com.mongodb.connection.ClusterType;
Expand Down

0 comments on commit 169168d

Please sign in to comment.