Uploaded image for project: 'Sqoop'
  1. Sqoop
  2. SQOOP-1969

Support getColumnSize method for Schema class

    XMLWordPrintableJSON

    Details

    • Type: Improvement
    • Status: Resolved
    • Priority: Major
    • Resolution: Fixed
    • Affects Version/s: 2.0.0
    • Fix Version/s: 1.99.5
    • Component/s: connectors/generic
    • Labels:
      None

      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:

      public Column[] getColumnsArray()
      return columns.toArray(new Column[columns.size()]);

      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.

        Attachments

        1. SQOOP-1969.patch
          3 kB
          Qian Xu

          Issue Links

            Activity

              People

              • Assignee:
                stanleyxu2005 Qian Xu
                Reporter:
                jerrychenhf Haifeng Chen
              • Votes:
                0 Vote for this issue
                Watchers:
                5 Start watching this issue

                Dates

                • Created:
                  Updated:
                  Resolved: