[jira] [Assigned] (IGNITE-6012) Improve GridJettyRestHandler.processRequest()

2017-08-10 Thread Andrey Novikov (JIRA)

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

Andrey Novikov reassigned IGNITE-6012:
--

Assignee: Alexey Kuznetsov  (was: Andrey Novikov)

> Improve GridJettyRestHandler.processRequest()
> -
>
> Key: IGNITE-6012
> URL: https://issues.apache.org/jira/browse/IGNITE-6012
> Project: Ignite
>  Issue Type: Improvement
>  Components: rest
>Affects Versions: 2.1
>Reporter: Alexey Kuznetsov
>Assignee: Alexey Kuznetsov
> Fix For: 2.2
>
>
> In case of large result  
> {code}
> private void processRequest(String act, HttpServletRequest req, 
> HttpServletResponse res) {
> ...
> json = jsonMapper.writeValueAsString(cmdRes)
> 
> {code}
> Will fail with OOME, beacuse jsonMapper.writeValueAsString(cmdRes) internally 
> will create a StringBuilder and will try to allocate large amount of memory.
> This could be easily fixed by writing object directly to response output 
> stream via. 
> {code}
> jsonMapper.writeValue(out, cmdRes);
> {code}



--
This message was sent by Atlassian JIRA
(v6.4.14#64029)


[jira] [Assigned] (IGNITE-6012) Improve GridJettyRestHandler.processRequest()

2017-08-09 Thread Alexey Kuznetsov (JIRA)

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

Alexey Kuznetsov reassigned IGNITE-6012:


Assignee: Andrey Novikov  (was: Alexey Kuznetsov)

Please review my changes.

> Improve GridJettyRestHandler.processRequest()
> -
>
> Key: IGNITE-6012
> URL: https://issues.apache.org/jira/browse/IGNITE-6012
> Project: Ignite
>  Issue Type: Improvement
>  Components: rest
>Affects Versions: 2.1
>Reporter: Alexey Kuznetsov
>Assignee: Andrey Novikov
> Fix For: 2.2
>
>
> In case of large result  
> {code}
> private void processRequest(String act, HttpServletRequest req, 
> HttpServletResponse res) {
> ...
> json = jsonMapper.writeValueAsString(cmdRes)
> 
> {code}
> Will fail with OOME, beacuse jsonMapper.writeValueAsString(cmdRes) internally 
> will create a StringBuilder and will try to allocate large amount of memory.
> This could be easily fixed by writing object directly to response output 
> stream via. 
> {code}
> jsonMapper.writeValue(out, cmdRes);
> {code}



--
This message was sent by Atlassian JIRA
(v6.4.14#64029)