diff --git a/stroom-state/stroom-planb-impl/src/main/java/stroom/planb/impl/db/ShardWriters.java b/stroom-state/stroom-planb-impl/src/main/java/stroom/planb/impl/db/ShardWriters.java index a7255a3759..0f4bdb4b1d 100644 --- a/stroom-state/stroom-planb-impl/src/main/java/stroom/planb/impl/db/ShardWriters.java +++ b/stroom-state/stroom-planb-impl/src/main/java/stroom/planb/impl/db/ShardWriters.java @@ -83,7 +83,7 @@ public ShardWriter(final PlanBDocCache planBDocCache, public Optional getDoc(final String mapName, final Consumer errorConsumer) { if (NullSafe.isBlankString(mapName)) { - errorConsumer.accept("Null map key"); + errorConsumer.accept("Null map name"); return Optional.empty(); } @@ -91,12 +91,12 @@ public Optional getDoc(final String mapName, final Consumer er PlanBDoc doc = null; if (!PlanBNameValidator.isValidName(k)) { - errorConsumer.accept("Bad map key: " + k); + errorConsumer.accept("Bad map name: " + k); } else { try { doc = planBDocCache.get(k); if (doc == null) { - errorConsumer.accept("Unable to find state doc for map key: " + k); + errorConsumer.accept("Unable to find state doc for map name: " + k); } } catch (final RuntimeException e) { errorConsumer.accept(e.getMessage()); diff --git a/stroom-state/stroom-planb-impl/src/main/java/stroom/planb/impl/pipeline/PlanBFilter.java b/stroom-state/stroom-planb-impl/src/main/java/stroom/planb/impl/pipeline/PlanBFilter.java index a163a446c9..8d351efe35 100644 --- a/stroom-state/stroom-planb-impl/src/main/java/stroom/planb/impl/pipeline/PlanBFilter.java +++ b/stroom-state/stroom-planb-impl/src/main/java/stroom/planb/impl/pipeline/PlanBFilter.java @@ -422,29 +422,9 @@ public void endElement(final String uri, final String localName, final String qN fastInfosetEndElement(localName, newUri, newQName); } else { if (MAP_ELEMENT.equalsIgnoreCase(localName)) { - // capture the key of the map that the subsequent values will belong to. A ref + // capture the name of the map that the subsequent values will belong to. A ref // stream can contain data for multiple maps mapName = contentBuffer.toString().toLowerCase(Locale.ROOT); -// if (!NullSafe.isBlankString(mapName)) { -// stateDoc = stateDocMap.computeIfAbsent(mapName, k -> { -// PlanBDoc doc = null; -// -// if (!PlanBNameValidator.isValidName(k)) { -// error("Bad map key: " + k); -// } else { -// try { -// doc = stateDocCache.get(k); -// if (doc == null) { -// error("Unable to find state doc for map key: " + k); -// } -// } catch (final RuntimeException e) { -// error(e); -// } -// } -// -// return Optional.ofNullable(doc); -// }).orElse(null); -// } } else if (KEY_ELEMENT.equalsIgnoreCase(localName)) { // the key for the KV pair