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

sqoop start script looks for jars in wrong order

    XMLWordPrintableJSON

    Details

    • Type: Bug
    • Status: Open
    • Priority: Major
    • Resolution: Unresolved
    • Affects Version/s: 1.4.5
    • Fix Version/s: None
    • Component/s: tools
    • Labels:
      None
    • Environment:

      Linux

      Description

      The sqoop start script allows the user to include custom jar's by placing them into the folder "/var/lib/sqoop". In addition to that location, the script also looks into the folder "/usr/share/java". Technically this is performed by the line

      SQOOP_JARS=`ls /var/lib/sqoop/.jar /usr/share/java/.jar 2>/dev/null`

      in the ssqoop start script. This seems to allow to store sqoop-specific versions of jar files in "/var/lib/sqoop" which would override versions of similar jars in "/usr/share/java". For example (this was our use case), this allows to store a more up-to-date version of the java-mysql-connector in /var/lib/sqoop while the system provided version still remains in /usr/share/java.

      Unfortunetaly this doesn't work as expected, because the "ls" command will sort its result by name. So all files in "/usr/share/java" are sorted in front of the files in "/var/lib/sqoop". An easy fix for the situation is to turn off the sorting by adding the option "-U" to ls:

      SQOOP_JARS=`ls -U /var/lib/sqoop/.jar /usr/share/java/.jar 2>/dev/null`

      I guess the behaviour with this modification reflects the original idea behind that line.

        Attachments

          Activity

            People

            • Assignee:
              Unassigned
              Reporter:
              kupferk Kaya Kupferschmidt
            • Votes:
              2 Vote for this issue
              Watchers:
              5 Start watching this issue

              Dates

              • Created:
                Updated: