Class StreamIntrospectionD2Converter
java.lang.Object
org.nuxeo.ecm.core.bulk.introspection.StreamIntrospectionBaseConverter
org.nuxeo.ecm.core.bulk.introspection.StreamIntrospectionD2Converter
Converts stream introspection JSON data to D2 diagram format (https://d2lang.com/)
- Since:
- 2025.10
-
Field Summary
FieldsFields inherited from class org.nuxeo.ecm.core.bulk.introspection.StreamIntrospectionBaseConverter
json, OBJECT_MAPPER, root -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionprotected voiddumpComputationInGroup(String host, StringBuilder ret, com.fasterxml.jackson.databind.JsonNode item, Map<String, String> metrics, String created) protected voiddumpStream(StringBuilder ret, com.fasterxml.jackson.databind.JsonNode item, Map<String, String> metrics) protected StringgetBatchInfo(com.fasterxml.jackson.databind.JsonNode item) protected StringgetComputationMetrics(String host, String name, com.fasterxml.jackson.databind.JsonNode item, Map<String, String> metrics) getD2()Gets the D2 diagram format with filtering options.protected StringgetD2Identifier(String name) protected StringgetD2IdentifierForConnection(String host, String id) protected Stringprotected booleanChecks if a computation should be excluded based on inactivity filter.protected booleanshouldExcludeByPattern(String name) Checks if a name (stream or computation) should be excluded based on patterns.protected booleanshouldExcludeStreamByInactivity(String streamName, Map<String, String> metrics) Checks if a stream should be excluded based on inactivity filter.Methods inherited from class org.nuxeo.ecm.core.bulk.introspection.StreamIntrospectionBaseConverter
getNiceDouble, getNiceDouble3, getStreamEnd, parseMetrics
-
Field Details
-
D2_HEADER_TEMPLATE
- See Also:
-
excludePatterns
-
excludeInactive
protected boolean excludeInactive
-
-
Constructor Details
-
StreamIntrospectionD2Converter
-
-
Method Details
-
getD2
-
getD2
Gets the D2 diagram format with filtering options.- Parameters:
excludePatterns- list of patterns to exclude (e.g., Arrays.asList("work/", "bulk/"))excludeInactive- whether to exclude inactive computations (computation-idle class) and empty streams (stream-empty class)- Returns:
- the D2 diagram as a string
-
shouldExcludeByPattern
Checks if a name (stream or computation) should be excluded based on patterns. -
shouldExcludeByInactivity
Checks if a computation should be excluded based on inactivity filter. -
shouldExcludeStreamByInactivity
Checks if a stream should be excluded based on inactivity filter. -
dumpStream
protected void dumpStream(StringBuilder ret, com.fasterxml.jackson.databind.JsonNode item, Map<String, String> metrics) -
getComputationMetrics
-
getTimerAsJson
-
getBatchInfo
- Overrides:
getBatchInfoin classStreamIntrospectionBaseConverter
-
getD2Identifier
-
collectComputationNames
-
dumpComputationInGroup
-
getD2IdentifierForConnection
-