static String expandHiveAuxJarsPath ( String original ) throws IOException { if ( original == null || original . contains ( ".jar" ) ) return original ; File [ ] files = new File ( original ) . listFiles ( ) ; if ( files == null || files . length == 0 ) { LOG . info ( "No files in to expand in aux jar path. Returning original parameter" ) ; return original ; } return filesToURIString ( files ) ; }
Normally hive . aux . jars . path is expanded from just being a path to the full list of files in the directory by the hive shell script . Since we normally won t be running from the script it s up to us to do that work here . We use a heuristic that if there is no occurrence of . jar in the original it needs expansion . Otherwise it s already been done for us .