Sqoop
  1. Sqoop
  2. SQOOP-1227

Sqoop fails to compile against commons-io higher then 1.4

    Details

    • Type: Bug Bug
    • Status: Resolved
    • Priority: Major Major
    • Resolution: Fixed
    • Affects Version/s: 1.4.4
    • Fix Version/s: 1.4.5
    • Component/s: None
    • Labels:
      None

      Description

      The problem is in DataDrivenImportJob.writeAvroSchema where we have following code fragment:

          FileUtils.writeStringToFile(schemaFile, schema.toString(true), null);
      

      The last parameter to the function call is null without any type. This works fine in commons-io 1.4 as the method writeStringToFile have only two different definitions:

      writeStringToFile(File file, String data) 
      writeStringToFile(File file, String data, String encoding) 
      

      However later versions has added a lot of other definitions, such as:

      writeStringToFile(File file, String data, Charset encoding)
      

      And thus the compilation fails on ambiguity problem:

          [javac] /home/jarcec/apache/repos/sqoop/src/java/org/apache/sqoop/mapreduce/DataDrivenImportJob.java:109: error: reference to writeStringToFile is ambiguous, both method writeStringToFile(File,String,Charset) in FileUtils and method writeStringToFile(File,String,String) in FileUtils match
          [javac]     FileUtils.writeStringToFile(schemaFile, schema.toString(true), null);
          [javac]              ^
      
      1. SQOOP-1227.patch
        0.8 kB
        Jarek Jarcec Cecho

        Issue Links

          Activity

          Hide
          Hari Shreedharan added a comment -

          +1.

          Show
          Hari Shreedharan added a comment - +1.
          Hide
          ASF subversion and git services added a comment -

          Commit bbc2c17a77cb17b195f465d9ab15d45f2b39c6b1 in branch refs/heads/trunk from Hari Shreedharan
          [ https://git-wip-us.apache.org/repos/asf?p=sqoop.git;h=bbc2c17 ]

          SQOOP-1227. Sqoop fails to compile against commons-io higher then 1.4

          (Jarek Jarcec Cecho via Hari Shreedharan)

          Show
          ASF subversion and git services added a comment - Commit bbc2c17a77cb17b195f465d9ab15d45f2b39c6b1 in branch refs/heads/trunk from Hari Shreedharan [ https://git-wip-us.apache.org/repos/asf?p=sqoop.git;h=bbc2c17 ] SQOOP-1227 . Sqoop fails to compile against commons-io higher then 1.4 (Jarek Jarcec Cecho via Hari Shreedharan)
          Hide
          Hari Shreedharan added a comment -

          Committed. Thanks Jarcec!

          Show
          Hari Shreedharan added a comment - Committed. Thanks Jarcec!
          Hide
          Hudson added a comment -

          FAILURE: Integrated in Sqoop-ant-jdk-1.6-hadoop100 #825 (See https://builds.apache.org/job/Sqoop-ant-jdk-1.6-hadoop100/825/)
          SQOOP-1227. Sqoop fails to compile against commons-io higher then 1.4 (hshreedharan: https://git-wip-us.apache.org/repos/asf?p=sqoop.git&a=commit&h=bbc2c17a77cb17b195f465d9ab15d45f2b39c6b1)

          • src/java/org/apache/sqoop/mapreduce/DataDrivenImportJob.java
          Show
          Hudson added a comment - FAILURE: Integrated in Sqoop-ant-jdk-1.6-hadoop100 #825 (See https://builds.apache.org/job/Sqoop-ant-jdk-1.6-hadoop100/825/ ) SQOOP-1227 . Sqoop fails to compile against commons-io higher then 1.4 (hshreedharan: https://git-wip-us.apache.org/repos/asf?p=sqoop.git&a=commit&h=bbc2c17a77cb17b195f465d9ab15d45f2b39c6b1 ) src/java/org/apache/sqoop/mapreduce/DataDrivenImportJob.java
          Hide
          Jarek Jarcec Cecho added a comment -

          The failure in profile 100 is valid, it seems that SQOOP-1223 introduced dependency on API that is not available in Hadoop 1.0.

          Show
          Jarek Jarcec Cecho added a comment - The failure in profile 100 is valid, it seems that SQOOP-1223 introduced dependency on API that is not available in Hadoop 1.0.
          Hide
          Hudson added a comment -

          SUCCESS: Integrated in Sqoop-ant-jdk-1.6-hadoop200 #866 (See https://builds.apache.org/job/Sqoop-ant-jdk-1.6-hadoop200/866/)
          SQOOP-1227. Sqoop fails to compile against commons-io higher then 1.4 (hshreedharan: https://git-wip-us.apache.org/repos/asf?p=sqoop.git&a=commit&h=bbc2c17a77cb17b195f465d9ab15d45f2b39c6b1)

          • src/java/org/apache/sqoop/mapreduce/DataDrivenImportJob.java
          Show
          Hudson added a comment - SUCCESS: Integrated in Sqoop-ant-jdk-1.6-hadoop200 #866 (See https://builds.apache.org/job/Sqoop-ant-jdk-1.6-hadoop200/866/ ) SQOOP-1227 . Sqoop fails to compile against commons-io higher then 1.4 (hshreedharan: https://git-wip-us.apache.org/repos/asf?p=sqoop.git&a=commit&h=bbc2c17a77cb17b195f465d9ab15d45f2b39c6b1 ) src/java/org/apache/sqoop/mapreduce/DataDrivenImportJob.java
          Hide
          Hudson added a comment -

          SUCCESS: Integrated in Sqoop-ant-jdk-1.6-hadoop23 #1062 (See https://builds.apache.org/job/Sqoop-ant-jdk-1.6-hadoop23/1062/)
          SQOOP-1227. Sqoop fails to compile against commons-io higher then 1.4 (hshreedharan: https://git-wip-us.apache.org/repos/asf?p=sqoop.git&a=commit&h=bbc2c17a77cb17b195f465d9ab15d45f2b39c6b1)

          • src/java/org/apache/sqoop/mapreduce/DataDrivenImportJob.java
          Show
          Hudson added a comment - SUCCESS: Integrated in Sqoop-ant-jdk-1.6-hadoop23 #1062 (See https://builds.apache.org/job/Sqoop-ant-jdk-1.6-hadoop23/1062/ ) SQOOP-1227 . Sqoop fails to compile against commons-io higher then 1.4 (hshreedharan: https://git-wip-us.apache.org/repos/asf?p=sqoop.git&a=commit&h=bbc2c17a77cb17b195f465d9ab15d45f2b39c6b1 ) src/java/org/apache/sqoop/mapreduce/DataDrivenImportJob.java
          Hide
          Hudson added a comment -

          FAILURE: Integrated in Sqoop-ant-jdk-1.6-hadoop20 #860 (See https://builds.apache.org/job/Sqoop-ant-jdk-1.6-hadoop20/860/)
          SQOOP-1227. Sqoop fails to compile against commons-io higher then 1.4 (hshreedharan: https://git-wip-us.apache.org/repos/asf?p=sqoop.git&a=commit&h=bbc2c17a77cb17b195f465d9ab15d45f2b39c6b1)

          • src/java/org/apache/sqoop/mapreduce/DataDrivenImportJob.java
          Show
          Hudson added a comment - FAILURE: Integrated in Sqoop-ant-jdk-1.6-hadoop20 #860 (See https://builds.apache.org/job/Sqoop-ant-jdk-1.6-hadoop20/860/ ) SQOOP-1227 . Sqoop fails to compile against commons-io higher then 1.4 (hshreedharan: https://git-wip-us.apache.org/repos/asf?p=sqoop.git&a=commit&h=bbc2c17a77cb17b195f465d9ab15d45f2b39c6b1 ) src/java/org/apache/sqoop/mapreduce/DataDrivenImportJob.java

            People

            • Assignee:
              Jarek Jarcec Cecho
              Reporter:
              Jarek Jarcec Cecho
            • Votes:
              0 Vote for this issue
              Watchers:
              4 Start watching this issue

              Dates

              • Created:
                Updated:
                Resolved:

                Development