[ 
https://issues.apache.org/jira/browse/PHOENIX-5789?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=17085438#comment-17085438
 ] 

Mingliang Liu commented on PHOENIX-5789:
----------------------------------------

Thanks for updating the patch.

{code}
23          private static ObjectMapper mapper = new ObjectMapper();
24      
25          private JacksonUtil() {
26          }
27      
28          public static ObjectMapper getMapper() {
29              if(mapper == null) {
30                  mapper = new ObjectMapper();
31              }
32      
33              return mapper;
34          }
35      
{code}
Is mapper always be non-null? If this is used, we don't need the lazy 
initialization. Vanilla return mapper is fine. Also the mapper can be final.

Other than that, the patch is good. My +1 is not binding.

> try to standardize on a JSON library
> ------------------------------------
>
>                 Key: PHOENIX-5789
>                 URL: https://issues.apache.org/jira/browse/PHOENIX-5789
>             Project: Phoenix
>          Issue Type: Improvement
>          Components: core
>            Reporter: Istvan Toth
>            Assignee: Richard Antal
>            Priority: Minor
>         Attachments: PHOENIX-5789.4.x.v1.patch, PHOENIX-5789.4.x.v3.patch, 
> PHOENIX-5789.4.x.v4.patch, PHOENIX-5789.4.x.v5.patch, 
> PHOENIX-5789.master.v1.patch, PHOENIX-5789.master.v2.patch, 
> PHOENIX-5789.master.v3.patch, PHOENIX-5789.master.v4.patch
>
>
> Phoenix uses at least the following JSON libraries:
>  * gson
>  * jackson
>  * jettison
> Of these, only the jackson usage is performance critical, as it is used 
> during bulk loading. 
> Try to standardize on a single one to reduce dependency hell.



--
This message was sent by Atlassian Jira
(v8.3.4#803005)

Reply via email to