You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@sqoop.apache.org by "Qian Xu (JIRA)" <ji...@apache.org> on 2015/02/25 06:46:04 UTC

[jira] [Commented] (SQOOP-1976) Sqoop2: Avoid massive in-memory copy of schema column

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

Qian Xu commented on SQOOP-1976:
--------------------------------

Return array means to create a defensive copy. As the method is called extremely frequently, it will have performance impact. If create a copy as array from an arraylist is cheap, I'm okay to close the jira. The comparison of using array or arraylist is not the my concern. [~vybs] I assume you are considering of immutability of data. Alternatively we can use Guava's ImmutableList.

> Sqoop2: Avoid massive in-memory copy of schema column
> -----------------------------------------------------
>
>                 Key: SQOOP-1976
>                 URL: https://issues.apache.org/jira/browse/SQOOP-1976
>             Project: Sqoop
>          Issue Type: Sub-task
>            Reporter: Qian Xu
>            Assignee: Qian Xu
>
> SQOOP-1836 introduced a new method {{getColumnsArray}}. As the class {{Schema}} is used very often, the idea is to provide a constant (better) lookup time for particular column. But I think the implementation will create array from a list for every call, it will be even slower than accessing the original {{getColumnsList}} in some cases. I think we can change the type of columns from {{LinkedList}} to {{ArrayList}}, which is included in SQOOP-1969. The jira proposes to remove {{getColumnsArray}}.



--
This message was sent by Atlassian JIRA
(v6.3.4#6332)