Package org.apache.spark.util
Class MavenUtils
Object
org.apache.spark.util.MavenUtils
Provides utility functions to be used inside SparkSubmit.
- 
Nested Class SummaryNested Classes
- 
Constructor SummaryConstructors
- 
Method SummaryModifier and TypeMethodDescriptionstatic org.apache.ivy.core.settings.IvySettingsbuildIvySettings(scala.Option<String> remoteRepos, scala.Option<String> ivyPath, boolean useLocalM2AsCache, PrintStream printStream) Build Ivy Settings using options with default resolversstatic scala.collection.immutable.Seq<org.apache.spark.util.MavenUtils.MavenCoordinate>extractMavenCoordinates(String coordinates) Extracts maven coordinates from a comma-delimited string.static scala.collection.immutable.Seq<String>static Stringstatic org.apache.ivy.core.settings.IvySettingsloadIvySettings(String settingsFile, scala.Option<String> remoteRepos, scala.Option<String> ivyPath, PrintStream printStream) Load Ivy settings from a given filename, using supplied resolversstatic org.apache.spark.internal.Logging.LogStringContextLogStringContext(scala.StringContext sc) static org.slf4j.Loggerstatic voidorg$apache$spark$internal$Logging$$log__$eq(org.slf4j.Logger x$1) parseQueryParams(URI uri) Parse URI query string's parameter value oftransitive,excludeandrepos.static scala.collection.immutable.Seq<String>resolveMavenCoordinates(String coordinates, org.apache.ivy.core.settings.IvySettings ivySettings, scala.Option<org.apache.ivy.core.settings.IvySettings> noCacheIvySettings, boolean transitive, scala.collection.immutable.Seq<String> exclusions, boolean isTest, PrintStream printStream) Resolves any dependencies that were supplied through maven coordinates
- 
Constructor Details- 
MavenUtilspublic MavenUtils()
 
- 
- 
Method Details- 
JAR_IVY_SETTING_PATH_KEY
- 
IVY_DEFAULT_EXCLUDES
- 
extractMavenCoordinatespublic static scala.collection.immutable.Seq<org.apache.spark.util.MavenUtils.MavenCoordinate> extractMavenCoordinates(String coordinates) Extracts maven coordinates from a comma-delimited string. Coordinates should be provided in the formatgroupId:artifactId:versionorgroupId/artifactId:version.- Parameters:
- coordinates- Comma-delimited string of maven coordinates
- Returns:
- Sequence of Maven coordinates
 
- 
buildIvySettingspublic static org.apache.ivy.core.settings.IvySettings buildIvySettings(scala.Option<String> remoteRepos, scala.Option<String> ivyPath, boolean useLocalM2AsCache, PrintStream printStream) Build Ivy Settings using options with default resolvers- Parameters:
- remoteRepos- Comma-delimited string of remote repositories other than maven central
- ivyPath- The path to the local ivy repository
- useLocalM2AsCache- Whether or not use- local-m2 repoas cache
- printStream- (undocumented)
- Returns:
- An IvySettings object
 
- 
loadIvySettingspublic static org.apache.ivy.core.settings.IvySettings loadIvySettings(String settingsFile, scala.Option<String> remoteRepos, scala.Option<String> ivyPath, PrintStream printStream) Load Ivy settings from a given filename, using supplied resolvers- Parameters:
- settingsFile- Path to Ivy settings file
- remoteRepos- Comma-delimited string of remote repositories other than maven central
- ivyPath- The path to the local ivy repository
- printStream- (undocumented)
- Returns:
- An IvySettings object
 
- 
resolveMavenCoordinatespublic static scala.collection.immutable.Seq<String> resolveMavenCoordinates(String coordinates, org.apache.ivy.core.settings.IvySettings ivySettings, scala.Option<org.apache.ivy.core.settings.IvySettings> noCacheIvySettings, boolean transitive, scala.collection.immutable.Seq<String> exclusions, boolean isTest, PrintStream printStream) Resolves any dependencies that were supplied through maven coordinates- Parameters:
- coordinates- Comma-delimited string of maven coordinates
- ivySettings- An IvySettings containing resolvers to use
- noCacheIvySettings- An no-cache(local-m2-cache) IvySettings containing resolvers to use
- transitive- Whether resolving transitive dependencies, default is true
- exclusions- Exclusions to apply when resolving transitive dependencies
- isTest- (undocumented)
- printStream- (undocumented)
- Returns:
- Seq of path to the jars of the given maven artifacts including their transitive dependencies
 
- 
parseQueryParamsParse URI query string's parameter value oftransitive,excludeandrepos. Other invalid parameters will be ignored.- Parameters:
- uri- Ivy URI need to be downloaded.
- Returns:
- Tuple value of parameter transitive,excludeandreposvalue.1. transitive: whether to download dependency jar of Ivy URI, default value is true and this parameter value is case-insensitive. This mimics Hive's behaviour for parsing the transitive parameter. Invalid value will be treat as false. Example: Input: exclude=org.mortbay.jetty:jetty&transitive=true Output: true 2. exclude: comma separated exclusions to apply when resolving transitive dependencies, consists of group:modulepairs separated by commas. Example: Input: excludeorg.mortbay.jetty:jetty,org.eclipse.jetty:jetty-http Output: [org.mortbay.jetty:jetty,org.eclipse.jetty:jetty-http]3. repos: comma separated repositories to use when resolving dependencies. 
 
- 
org$apache$spark$internal$Logging$$log_public static org.slf4j.Logger org$apache$spark$internal$Logging$$log_()
- 
org$apache$spark$internal$Logging$$log__$eqpublic static void org$apache$spark$internal$Logging$$log__$eq(org.slf4j.Logger x$1) 
- 
LogStringContextpublic static org.apache.spark.internal.Logging.LogStringContext LogStringContext(scala.StringContext sc) 
 
-