public class DependencyUtils
extends Object
Constructor and Description |
---|
DependencyUtils() |
Modifier and Type | Method and Description |
---|---|
static void |
addJarsToClassPath(String jars,
MutableURLClassLoader loader) |
static void |
addJarToClasspath(String localJar,
MutableURLClassLoader loader) |
static String |
downloadFile(String path,
java.io.File targetDir,
SparkConf sparkConf,
org.apache.hadoop.conf.Configuration hadoopConf)
Download a file from the remote to a local temporary directory.
|
static String |
downloadFileList(String fileList,
java.io.File targetDir,
SparkConf sparkConf,
org.apache.hadoop.conf.Configuration hadoopConf)
Download a list of remote files to temp local files.
|
static org.apache.spark.util.IvyProperties |
getIvyProperties() |
static String |
mergeFileLists(scala.collection.Seq<String> lists)
Merge a sequence of comma-separated file lists, some of which may be null to indicate
no files, into a single comma-separated string.
|
static void |
org$apache$spark$internal$Logging$$log__$eq(org.slf4j.Logger x$1) |
static org.slf4j.Logger |
org$apache$spark$internal$Logging$$log_() |
static String |
resolveAndDownloadJars(String jars,
String userJar,
SparkConf sparkConf,
org.apache.hadoop.conf.Configuration hadoopConf) |
static String |
resolveGlobPaths(String paths,
org.apache.hadoop.conf.Configuration hadoopConf) |
static scala.collection.Seq<String> |
resolveMavenDependencies(boolean packagesTransitive,
String packagesExclusions,
String packages,
String repositories,
String ivyRepoPath,
scala.Option<String> ivySettingsPath) |
static scala.collection.Seq<String> |
resolveMavenDependencies(java.net.URI uri)
Download Ivy URI's dependency jars.
|
public static org.apache.spark.util.IvyProperties getIvyProperties()
public static scala.collection.Seq<String> resolveMavenDependencies(java.net.URI uri)
uri
- Ivy URI need to be downloaded. The URI format should be:
ivy://group:module:version[?query]
Ivy URI query part format should be:
parameter=value¶meter=value...
Note that currently Ivy URI query part support two parameters:
1. transitive: whether to download dependent jars related to your Ivy URI.
transitive=false or transitive=true
, if not set, the default value is true.
2. exclude: exclusion list when download Ivy URI jar and dependency jars.
The exclude
parameter content is a ',' separated group:module
pair string :
exclude=group:module,group:module...
public static scala.collection.Seq<String> resolveMavenDependencies(boolean packagesTransitive, String packagesExclusions, String packages, String repositories, String ivyRepoPath, scala.Option<String> ivySettingsPath)
public static String resolveAndDownloadJars(String jars, String userJar, SparkConf sparkConf, org.apache.hadoop.conf.Configuration hadoopConf)
public static void addJarsToClassPath(String jars, MutableURLClassLoader loader)
public static String downloadFileList(String fileList, java.io.File targetDir, SparkConf sparkConf, org.apache.hadoop.conf.Configuration hadoopConf)
fileList
- A comma separated file list.targetDir
- A temporary directory for which downloaded files.sparkConf
- Spark configuration.hadoopConf
- Hadoop configuration.public static String downloadFile(String path, java.io.File targetDir, SparkConf sparkConf, org.apache.hadoop.conf.Configuration hadoopConf)
path
- A file path from where the files will be downloaded.targetDir
- A temporary directory for which downloaded files.sparkConf
- Spark configuration.hadoopConf
- Hadoop configuration.public static String resolveGlobPaths(String paths, org.apache.hadoop.conf.Configuration hadoopConf)
public static void addJarToClasspath(String localJar, MutableURLClassLoader loader)
public static String mergeFileLists(scala.collection.Seq<String> lists)
lists
- (undocumented)public static org.slf4j.Logger org$apache$spark$internal$Logging$$log_()
public static void org$apache$spark$internal$Logging$$log__$eq(org.slf4j.Logger x$1)