esevastyanov commented on a change in pull request #8157: Enum of
ResponseContext keys
URL: https://github.com/apache/incubator-druid/pull/8157#discussion_r310223882
##########
File path:
processing/src/main/java/org/apache/druid/query/context/ResponseContext.java
##########
@@ -374,6 +376,30 @@ public SerializationResult serializeWith(ObjectMapper
objectMapper, int maxChars
}
}
+ /**
+ * Removes {@code node}'s elements which total lenght of serialized values
is greater or equal to the passed limit.
+ * If it is impossible to satisfy the limit the method removes all {@code
node}'s elements.
+ * On every iteration it removes exactly half of the remained elements to
reduce the overall complexity.
+ * @param node {@link ArrayNode} which elements are being removed.
+ * @param needToRemoveCharsNumber the number of chars need to be removed.
+ * @return the number of removed chars.
+ */
+ private int removeNodeElementsToSatisfyCharsLimit(ArrayNode node, int
needToRemoveCharsNumber)
Review comment:
updated
----------------------------------------------------------------
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
For queries about this service, please contact Infrastructure at:
[email protected]
With regards,
Apache Git Services
---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]