diff --git a/render-app/src/main/java/org/janelia/alignment/multisem/UnconnectedMFOVPairsForStack.java b/render-app/src/main/java/org/janelia/alignment/multisem/UnconnectedMFOVPairsForStack.java index 1ad088fed..0eb254fec 100644 --- a/render-app/src/main/java/org/janelia/alignment/multisem/UnconnectedMFOVPairsForStack.java +++ b/render-app/src/main/java/org/janelia/alignment/multisem/UnconnectedMFOVPairsForStack.java @@ -89,6 +89,15 @@ public void addUnconnectedPair(final OrderedMFOVPair unconnectedPair) { unconnectedMFOVPairs.add(unconnectedPair); } + @Override + public String toString() { + return "{'renderStackId': '" + renderStackId.toDevString() + + "', 'mFOVMontageStackName': '" + mFOVMontageStackName + + "', 'matchCollectionId': '" + matchCollectionId.toDevString() + + "', 'unconnectedMFOVPairs': [" + unconnectedMFOVPairs + + "]}"; + } + public static List load(final String dataFile) throws IOException, IllegalArgumentException { diff --git a/render-ws-java-client/src/main/java/org/janelia/render/client/multisem/UnconnectedCrossMFOVClient.java b/render-ws-java-client/src/main/java/org/janelia/render/client/multisem/UnconnectedCrossMFOVClient.java index 73efee95d..6652818de 100644 --- a/render-ws-java-client/src/main/java/org/janelia/render/client/multisem/UnconnectedCrossMFOVClient.java +++ b/render-ws-java-client/src/main/java/org/janelia/render/client/multisem/UnconnectedCrossMFOVClient.java @@ -1,7 +1,6 @@ package org.janelia.render.client.multisem; import com.beust.jcommander.ParametersDelegate; -import com.fasterxml.jackson.core.JsonProcessingException; import java.io.IOException; import java.nio.file.Path; @@ -14,7 +13,6 @@ import java.util.Set; import java.util.stream.Collectors; -import org.janelia.alignment.json.JsonUtils; import org.janelia.alignment.match.CanvasMatches; import org.janelia.alignment.match.MatchCollectionId; import org.janelia.alignment.multisem.LayerMFOV; @@ -146,10 +144,10 @@ public void logOrStoreUnconnectedMFOVPairs(final List unconnectedMFOVsForAllStacks) - throws JsonProcessingException { - LOG.info("findUnconnectedMFOVs: unconnected MFOV pairs for all stacks are: \n{}", - JsonUtils.FAST_MAPPER.writeValueAsString(unconnectedMFOVsForAllStacks)); + public static void logUnconnectedMFOVPairs(final List unconnectedMFOVsForAllStacks) { + for (final UnconnectedMFOVPairsForStack unconnectedMFOVPairs : unconnectedMFOVsForAllStacks) { + LOG.info("found unconnected MFOV pairs {}", unconnectedMFOVPairs); + } } public static void storeUnconnectedMFOVPairs(final List unconnectedMFOVsForAllStacks, diff --git a/render-ws-spark-client/src/main/java/org/janelia/render/client/spark/multisem/UnconnectedCrossMFOVClient.java b/render-ws-spark-client/src/main/java/org/janelia/render/client/spark/multisem/UnconnectedCrossMFOVClient.java index c486f16c0..b7e619936 100644 --- a/render-ws-spark-client/src/main/java/org/janelia/render/client/spark/multisem/UnconnectedCrossMFOVClient.java +++ b/render-ws-spark-client/src/main/java/org/janelia/render/client/spark/multisem/UnconnectedCrossMFOVClient.java @@ -26,6 +26,8 @@ import org.slf4j.Logger; import org.slf4j.LoggerFactory; +import static org.janelia.render.client.multisem.UnconnectedCrossMFOVClient.logUnconnectedMFOVPairs; + /** * Spark client for patching matches missing from adjacent SFOV tile pairs within the same MFOV and z layer. * Core logic is implemented in {@link org.janelia.render.client.multisem.MFOVMontageMatchPatchClient}. @@ -103,9 +105,9 @@ public void runPipelineStep(final JavaSparkContext sparkContext, findUnconnectedMFOVs(sparkContext, clientParameters); if (! unconnectedMFOVsForAllStacks.isEmpty()) { - final String errorMessage = - "found " + unconnectedMFOVsForAllStacks.size() + " stacks with unconnected MFOVs"; - LOG.error("runPipelineStep: {}: {}", errorMessage, unconnectedMFOVsForAllStacks); + final String errorMessage = "found " + unconnectedMFOVsForAllStacks.size() + " stacks with unconnected MFOVs"; + LOG.error("runPipelineStep: {}", errorMessage); + logUnconnectedMFOVPairs(unconnectedMFOVsForAllStacks); throw new IOException(errorMessage); } else { LOG.info("runPipelineStep: all MFOVs in all stacks are connected");