[jira] [Assigned] (IGNITE-6013) Web agent: refactor processing response from cluster

2017-08-10 Thread Alexey Kuznetsov (JIRA)

 [ 
https://issues.apache.org/jira/browse/IGNITE-6013?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel
 ]

Alexey Kuznetsov reassigned IGNITE-6013:


Resolution: Fixed
  Assignee: Alexey Kuznetsov  (was: Andrey Novikov)

> Web agent: refactor processing response from cluster
> 
>
> Key: IGNITE-6013
> URL: https://issues.apache.org/jira/browse/IGNITE-6013
> Project: Ignite
>  Issue Type: Improvement
>Reporter: Alexey Kuznetsov
>Assignee: Alexey Kuznetsov
> Fix For: 2.2
>
>
> RestExecutor.sendRequest() contain following code:
> {code}
> 
> try (Response resp = 
> httpClient.newCall(reqBuilder.build()).execute()) {
> String content = resp.body().string();
> if (resp.isSuccessful()) {
> JsonNode node = mapper.readTree(content);
>  
> {code}
> Problems: 
> # String content = resp.body().string(); >> Generate not needed String.
> # JsonNode node = mapper.readTree(content);  >> Generates a big tree of 
> JsonNodes
>  
> Could be fixed like:
> RestResponseHolder res = MAPPER.readValue(resp.body().byteStream(), 
> RestResponseHolder.class); 
> 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
(v6.4.14#64029)


[jira] [Assigned] (IGNITE-6013) Web agent: refactor processing response from cluster

2017-08-10 Thread Alexey Kuznetsov (JIRA)

 [ 
https://issues.apache.org/jira/browse/IGNITE-6013?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel
 ]

Alexey Kuznetsov reassigned IGNITE-6013:


Assignee: Andrey Novikov  (was: Alexey Kuznetsov)

[~anovikov]  please review again, I refactored code to use JsonDeserialize.

> Web agent: refactor processing response from cluster
> 
>
> Key: IGNITE-6013
> URL: https://issues.apache.org/jira/browse/IGNITE-6013
> Project: Ignite
>  Issue Type: Improvement
>Reporter: Alexey Kuznetsov
>Assignee: Andrey Novikov
> Fix For: 2.2
>
>
> RestExecutor.sendRequest() contain following code:
> {code}
> 
> try (Response resp = 
> httpClient.newCall(reqBuilder.build()).execute()) {
> String content = resp.body().string();
> if (resp.isSuccessful()) {
> JsonNode node = mapper.readTree(content);
>  
> {code}
> Problems: 
> # String content = resp.body().string(); >> Generate not needed String.
> # JsonNode node = mapper.readTree(content);  >> Generates a big tree of 
> JsonNodes
>  
> Could be fixed like:
> RestResponseHolder res = MAPPER.readValue(resp.body().byteStream(), 
> RestResponseHolder.class); 
> 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
(v6.4.14#64029)


[jira] [Assigned] (IGNITE-6013) Web agent: refactor processing response from cluster

2017-08-10 Thread Andrey Novikov (JIRA)

 [ 
https://issues.apache.org/jira/browse/IGNITE-6013?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel
 ]

Andrey Novikov reassigned IGNITE-6013:
--

Assignee: Alexey Kuznetsov  (was: Andrey Novikov)

> Web agent: refactor processing response from cluster
> 
>
> Key: IGNITE-6013
> URL: https://issues.apache.org/jira/browse/IGNITE-6013
> Project: Ignite
>  Issue Type: Improvement
>Reporter: Alexey Kuznetsov
>Assignee: Alexey Kuznetsov
> Fix For: 2.2
>
>
> RestExecutor.sendRequest() contain following code:
> {code}
> 
> try (Response resp = 
> httpClient.newCall(reqBuilder.build()).execute()) {
> String content = resp.body().string();
> if (resp.isSuccessful()) {
> JsonNode node = mapper.readTree(content);
>  
> {code}
> Problems: 
> # String content = resp.body().string(); >> Generate not needed String.
> # JsonNode node = mapper.readTree(content);  >> Generates a big tree of 
> JsonNodes
>  
> Could be fixed like:
> RestResponseHolder res = MAPPER.readValue(resp.body().byteStream(), 
> RestResponseHolder.class); 
> 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
(v6.4.14#64029)


[jira] [Assigned] (IGNITE-6013) Web agent: refactor processing response from cluster

2017-08-09 Thread Alexey Kuznetsov (JIRA)

 [ 
https://issues.apache.org/jira/browse/IGNITE-6013?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel
 ]

Alexey Kuznetsov reassigned IGNITE-6013:


Assignee: Andrey Novikov  (was: Alexey Kuznetsov)

Please review.

> Web agent: refactor processing response from cluster
> 
>
> Key: IGNITE-6013
> URL: https://issues.apache.org/jira/browse/IGNITE-6013
> Project: Ignite
>  Issue Type: Improvement
>Reporter: Alexey Kuznetsov
>Assignee: Andrey Novikov
> Fix For: 2.2
>
>
> RestExecutor.sendRequest() contain following code:
> {code}
> 
> try (Response resp = 
> httpClient.newCall(reqBuilder.build()).execute()) {
> String content = resp.body().string();
> if (resp.isSuccessful()) {
> JsonNode node = mapper.readTree(content);
>  
> {code}
> Problems: 
> # String content = resp.body().string(); >> Generate not needed String.
> # JsonNode node = mapper.readTree(content);  >> Generates a big tree of 
> JsonNodes
>  
> Could be fixed like:
> RestResponseHolder res = MAPPER.readValue(resp.body().byteStream(), 
> RestResponseHolder.class); 
> 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
(v6.4.14#64029)