Alexey Kuznetsov created IGNITE-6013:

             Summary: Web agent: refactor processing response from cluster
                 Key: IGNITE-6013
             Project: Ignite
          Issue Type: Improvement
            Reporter: Alexey Kuznetsov
            Assignee: Alexey Kuznetsov

RestExecutor.sendRequest() contain following code:
        try (Response resp = httpClient.newCall( {
            String content = resp.body().string();

            if (resp.isSuccessful()) {
                JsonNode node = mapper.readTree(content);

# String content = resp.body().string(); >> Generate not needed String.
# JsonNode node = mapper.readTree(content);  >> Generates a big tree of 
Could be fixed like:
RestResponseHolder res = MAPPER.readValue(resp.body().byteStream(), 

Where for RestResponseHolder should also created optimized 
RestResponseHolderDeserializer that will extract response as String without 
building tree of JsonNodes.

This message was sent by Atlassian JIRA

Reply via email to