Details
-
Bug
-
Status: Open
-
Major
-
Resolution: Unresolved
-
1.4.5
-
None
-
None
-
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.