[
https://issues.apache.org/jira/browse/SQOOP-1969?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel
]
Jerry Chen updated SQOOP-1969:
------------------------------
Description:
Currently, Schema class don't have getColumnSize method. There are a lot of
places in Matcher implementations getMatchingData calling
getColumnsArray().length to purely get the column size. While getColumnsArray a
method not efficient as it looks like:
{quote}
public Column[] getColumnsArray()
return columns.toArray(new Column[columns.size()]);
{quote}
It is suggested to add getColumnSize method in schema and the caller can use
this method to return the column length.
This problem gets serious because getMatchingData is called repeatedly with
each record in Mapper.
was:
Currently, Schema class don't have getColumnSize method. There are a lot of
places in Matcher implementations getMatchingData calling
getColumnsArray().length to purely get the column size. While getColumnsArray a
method not efficient as it looks like:
{quote}
public Column[] getColumnsArray() {
return columns.toArray(new Column[columns.size()]);
}
{quote}
It is suggested to add getColumnSize method in schema and the caller can use
this method to return the column length.
This problem gets serious because getMatchingData is called repeatedly with
each record in Mapper.
> Support getColumnSize method for Schema class
> ---------------------------------------------
>
> Key: SQOOP-1969
> URL: https://issues.apache.org/jira/browse/SQOOP-1969
> Project: Sqoop
> Issue Type: Improvement
> Components: connectors/generic
> Affects Versions: 2.0.0
> Reporter: Jerry Chen
>
> Currently, Schema class don't have getColumnSize method. There are a lot of
> places in Matcher implementations getMatchingData calling
> getColumnsArray().length to purely get the column size. While getColumnsArray
> a method not efficient as it looks like:
> {quote}
> public Column[] getColumnsArray()
> return columns.toArray(new Column[columns.size()]);
> {quote}
> It is suggested to add getColumnSize method in schema and the caller can use
> this method to return the column length.
> This problem gets serious because getMatchingData is called repeatedly with
> each record in Mapper.
--
This message was sent by Atlassian JIRA
(v6.3.4#6332)