Details

    • Sub-task
    • Status: Resolved
    • Major
    • Resolution: Fixed
    • None
    • 1.99.5
    • sqoop2-framework
    • None

    Description

      1. update the java docs for IDF apis.

      2. Make the getTextData final and call it getCSV and setCSV, so it is obvious that we want to enforce CSV format

      the following code can move to the base class IntermediateDataFormat and made final, so there is no way to override this and we can enforce all to return String instead of generic T

      // hold the string in IDF base class
      
       private final String text.
       
        public final String getCSVTextData() {
          return text;
        }
      
       
        public final void setCSVTextData(String text) {
          this.text = text;
        }
      

      There is code in CSVIDF implementation that has the rules for CSV parsing that can be pulled out into CSV Utils so that the connectors can use
      The T in CSV happens to String, which is just a coincidence, If I write a new IDF implementation T can be a custom object that could encapsulate the whole row.
      Third, getData and setData can have custom implementation so they can be overriden to return the generic type T

      Correction :

      // hold the string in IDF base class, is !final
      
       private String text.
       
        public final String getCSVTextData() {
          return text;
        }
      
       
        public final void setCSVTextData(String text) {
          this.text = text;
        }
      

      Attachments

        1. SQOOP-1811.patch
          42 kB
          Veena Basavaraj

        Issue Links

          Activity

            People

              vybs Veena Basavaraj
              vybs Veena Basavaraj
              Votes:
              0 Vote for this issue
              Watchers:
              7 Start watching this issue

              Dates

                Created:
                Updated:
                Resolved: