diff --git a/src/main/java/org/rcsb/idmapper/backend/data/repository/GroupRepository.java b/src/main/java/org/rcsb/idmapper/backend/data/repository/GroupRepository.java index 58022b0..a10dfeb 100644 --- a/src/main/java/org/rcsb/idmapper/backend/data/repository/GroupRepository.java +++ b/src/main/java/org/rcsb/idmapper/backend/data/repository/GroupRepository.java @@ -4,10 +4,7 @@ import com.google.common.collect.Multimap; import org.rcsb.idmapper.input.Input; -import java.util.Collection; -import java.util.HashMap; -import java.util.List; -import java.util.Map; +import java.util.*; import java.util.concurrent.atomic.AtomicReference; /** @@ -49,7 +46,7 @@ public Collection getMemberToGroup(Input.AggregationMethod method, Integ if (cutoff != null) return similarity.get(method).get(cutoff).get(mId); else - return identity.get(method).get(mId); + return identity.get(method).asMap().getOrDefault(mId, new ArrayList<>()); } public Long countGroups(Input.AggregationMethod method) { diff --git a/src/main/java/org/rcsb/idmapper/backend/data/task/CollectionTask.java b/src/main/java/org/rcsb/idmapper/backend/data/task/CollectionTask.java index 62933e6..e49cb7f 100644 --- a/src/main/java/org/rcsb/idmapper/backend/data/task/CollectionTask.java +++ b/src/main/java/org/rcsb/idmapper/backend/data/task/CollectionTask.java @@ -50,7 +50,7 @@ public Flux findDocuments(final MongoDatabase db) { return Flux.from(publisher) .doOnSubscribe(s -> logger.info("Subscribed document task to collection [ {} ]", collectionName)) //TODO replace with async debug or remove entirely before prod - //.doOnNext(d -> logger.info("Processing document from [ {} ]", collectionName)) +// .doOnNext(d -> logger.info("Processing document from [ {} ]", collectionName)) .doOnError(t -> logger.error(t.getMessage())) .doOnComplete(() -> logger.info("Processed documents from [ {} ] collection ", collectionName)) .map(this::createDocumentRunnable);