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

Support getColumnSize method for Schema class

    XMLWordPrintableJSON

Details

    • Improvement
    • Status: Resolved
    • Major
    • Resolution: Fixed
    • 2.0.0
    • 1.99.5
    • connectors/generic
    • 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

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

              Dates

                Created:
                Updated:
                Resolved: