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

Do not print stack trace when we can't move generated .java file to CWD

    Details

    • Type: Bug
    • Status: Resolved
    • Priority: Minor
    • Resolution: Fixed
    • Affects Version/s: 1.4.3
    • Fix Version/s: 1.4.5
    • Component/s: connectors
    • Labels:
      None

      Description

      The following error is thrown when a sqoop import script is executed:

      DEBUG orm.CompilationManager: Could not rename /tmp/sqoop-abcd/compile/92fa0dd1a081e3540357533bf46b8eae/QueryResult.java to /opt/abcdefgh/ijkl/./QueryResult.java
      java.io.FileNotFoundException: /opt/abcdefgh/ijkl/./QueryResult.java (Permission denied)
              at java.io.FileOutputStream.open(Native Method)
              at java.io.FileOutputStream.<init>(FileOutputStream.java:194)
              at java.io.FileOutputStream.<init>(FileOutputStream.java:145)
              at org.apache.commons.io.FileUtils.doCopyFile(FileUtils.java:936)
              at org.apache.commons.io.FileUtils.copyFile(FileUtils.java:888)
              at org.apache.commons.io.FileUtils.copyFile(FileUtils.java:835)
              at org.apache.commons.io.FileUtils.moveFile(FileUtils.java:2385)
              at org.apache.sqoop.orm.CompilationManager.compile(CompilationManager.java:229)
              at org.apache.sqoop.tool.CodeGenTool.generateORM(CodeGenTool.java:97)
              at org.apache.sqoop.tool.ImportTool.importTable(ImportTool.java:390)
              at org.apache.sqoop.tool.ImportTool.run(ImportTool.java:476)
              at org.apache.sqoop.Sqoop.run(Sqoop.java:145)
              at org.apache.hadoop.util.ToolRunner.run(ToolRunner.java:70)
              at org.apache.sqoop.Sqoop.runSqoop(Sqoop.java:181)
              at org.apache.sqoop.Sqoop.runTool(Sqoop.java:220)
              at org.apache.sqoop.Sqoop.runTool(Sqoop.java:229)
              at org.apache.sqoop.Sqoop.main(Sqoop.java:238)
      

      Just a warning here should be sufficient. There is no need to thrown an exception since it does not affect the flow of the Sqoop import script.

        Attachments

        1. SQOOP-1365.patch
          0.7 kB
          Sai Karthik Ganguru

          Activity

            People

            • Assignee:
              SaiKarthik Sai Karthik Ganguru
              Reporter:
              SaiKarthik Sai Karthik Ganguru
            • Votes:
              0 Vote for this issue
              Watchers:
              7 Start watching this issue

              Dates

              • Created:
                Updated:
                Resolved: