lxwcodemonkey commented on code in PR #91:
URL:
https://github.com/apache/doris-spark-connector/pull/91#discussion_r1159521321
##########
spark-doris-connector/src/main/java/org/apache/doris/spark/util/ListUtils.java:
##########
@@ -43,10 +43,11 @@ public static List<String>
getSerializedList(List<Map<Object, Object>> batch) th
* @throws JsonProcessingException
*/
public static void divideAndSerialize(List<Map<Object, Object>> batch,
List<String> result) throws JsonProcessingException {
- String serializedResult = (new
ObjectMapper()).writeValueAsString(batch);
+
// if an error occurred in the batch call to getBytes ,average divide
the batch
try {
//the "Requested array size exceeds VM limit" exception occurs
when the collection is large
+ String serializedResult = (new
ObjectMapper()).writeValueAsString(batch);
Review Comment:
I have improved it by singleton pattern,would you like to take a look again?
Thank you! @JNSimba
--
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.
To unsubscribe, e-mail: [email protected]
For queries about this service, please contact Infrastructure at:
[email protected]
---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]