public static File [ ] getHadoopDependencyFilesToLoad ( List < String > hadoopDependencyCoordinates , ExtensionsConfig extensionsConfig ) { final File rootHadoopDependenciesDir = new File ( extensionsConfig . getHadoopDependenciesDir ( ) ) ; if ( rootHadoopDependenciesDir . exists ( ) && ! rootHadoopDependenciesDir . isDirectory ( ) ) { throw new ISE ( "Root Hadoop dependencies directory [%s] is not a directory!?" , rootHadoopDependenciesDir ) ; } final File [ ] hadoopDependenciesToLoad = new File [ hadoopDependencyCoordinates . size ( ) ] ; int i = 0 ; for ( final String coordinate : hadoopDependencyCoordinates ) { final DefaultArtifact artifact = new DefaultArtifact ( coordinate ) ; final File hadoopDependencyDir = new File ( rootHadoopDependenciesDir , artifact . getArtifactId ( ) ) ; final File versionDir = new File ( hadoopDependencyDir , artifact . getVersion ( ) ) ; // find the hadoop dependency with the version specified in coordinate if ( ! hadoopDependencyDir . isDirectory ( ) || ! versionDir . isDirectory ( ) ) { throw new ISE ( "Hadoop dependency [%s] didn't exist!?" , versionDir . getAbsolutePath ( ) ) ; } hadoopDependenciesToLoad [ i ++ ] = versionDir ; } return hadoopDependenciesToLoad ; }
Find all the hadoop dependencies that should be loaded by druid