Uploaded image for project: 'Hadoop Map/Reduce'
  1. Hadoop Map/Reduce
  2. MAPREDUCE-6187

DBInputFormat can't pick driver class from *-job.jar/lib

    XMLWordPrintableJSON

Details

    • Bug
    • Status: Open
    • Major
    • Resolution: Unresolved
    • None
    • None
    • None
    • None

    Description

      Assume package structure:

      myprocess-job.jar
       /mypackage/MyProcess.class
       /lib/ojdbc.jar
      

      Where:
      MyProcess.class sets up DbInputFormat.

      If I call:

      hadoop jar myprocess-job.jar mypackage.MyProcess.class 
      

      I will get ClassNotFoundException when DBConfiguration does

      Class.forName(conf.get(DBConfiguration.DRIVER_CLASS_PROPERTY))
      

      The fix may be:

      conf.getClassByName(conf.get(DBConfiguration.DRIVER_CLASS_PROPERTY));
      

      As suggested by Shixiong Zhu: http://mail-archives.apache.org/mod_mbox/sqoop-user/201304.mbox/%3CCADHSSLM-aE0JsAwJPmwmuEUTWL98_iYsqrYxZn+ft-8X_pNakA@mail.gmail.com%3E

      Attachments

        Activity

          People

            Unassigned Unassigned
            SunSeaAndPalms Dzianis Sokal
            Votes:
            0 Vote for this issue
            Watchers:
            2 Start watching this issue

            Dates

              Created:
              Updated: