You are viewing a plain text version of this content. The canonical link for it is here.
Posted to issues@phoenix.apache.org by "Lars Hofhansl (JIRA)" <ji...@apache.org> on 2019/08/05 08:19:00 UTC

[jira] [Comment Edited] (PHOENIX-5410) Phoenix spark to hbase connector takes long time persist data

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

Lars Hofhansl edited comment on PHOENIX-5410 at 8/5/19 8:18 AM:
----------------------------------------------------------------

What about the 4x branches, should we have that there too? Edit: *NM, this is in the connectors...*
Also, please put the fix version in the jira, so that we can generate correct release notes?
(I did it for this jira :) )


was (Author: lhofhansl):
What about the 4x branches, should we have that there too?
Also, please put the fix version in the jira, so that we can generate correct release notes?
(I did it for this jira :) )

> Phoenix spark to hbase connector takes long time persist data
> -------------------------------------------------------------
>
>                 Key: PHOENIX-5410
>                 URL: https://issues.apache.org/jira/browse/PHOENIX-5410
>             Project: Phoenix
>          Issue Type: Bug
>    Affects Versions: connectors-1.0.0
>            Reporter: Manohar Chamaraju
>            Priority: Major
>             Fix For: connectors-1.0.0
>
>         Attachments: PHOENIX-5410.patch
>
>
> While using the phoenix spark connector 1.0.0-SNAPSHOT ([https://github.com/apache/phoenix-connectors/tree/master/phoenix-spark])  for hbase found that write was taking really long time.
> On profiling the connector found that 90% of cpu time is consumed in method SparkJdbcUtil.toRow() method. 
> !https://files.slack.com/files-pri/T037D1PV9-FKYGD504A/image.png!
> If i look into code SparkJdbcUtil.toRow() method gets called for every field of a row and RowEncoder(schema).resolveAndBind() object gets created for every iteration because of this lots of encoder objects get created and collected by GC eventually causing CPU cycles and causing performance degradation.
> Moreover SparkJdbcUtil.toRow() is called by PhoenixDataWriter.write() where schema for writer object is same for all rows hence we can optimize the code there by avoiding creating unnecessary objects and gaining good % of performance improvement.
>  
> By using changes in patch time required for write reduced from 30 minutes to less than 40 seconds in our test environment.



--
This message was sent by Atlassian JIRA
(v7.6.14#76016)