Class ClasspathConstructor
java.lang.Object
org.apache.hadoop.yarn.service.containerlaunch.ClasspathConstructor
build a classpath -allows for entries to be injected in front of
YARN classpath as well as behind, adds appropriate separators,
extraction of local classpath, etc.
-
Field Summary
Fields -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionvoidaddClassDirectory(String pathToDir) voidvoidvoidAppend an entryvoidappendAll(Collection<String> paths) buildLibDir(String pathToLibDir) Build a lib dir pathGet a copy of the path listvoidInsert a path at the front of the list.voidinsertAll(Collection<String> paths) voidinsertClassDirectory(String pathToDir) voidinsertLibDir(String pathToLibDir) voidGet the local JVM classpath split upsplitClasspath(String localpath) Split a classpath.toString()yarnApplicationClasspath(org.apache.hadoop.conf.Configuration config) Get the list of JARs from the YARN settings
-
Field Details
-
CLASS_PATH_SEPARATOR
- See Also:
-
-
Constructor Details
-
ClasspathConstructor
public ClasspathConstructor()
-
-
Method Details
-
yarnApplicationClasspath
Get the list of JARs from the YARN settings- Parameters:
config- configuration
-
toString
-
buildClasspath
-
getPathElements
Get a copy of the path list- Returns:
- the JARs
-
append
Append an entry- Parameters:
path- path
-
insert
Insert a path at the front of the list. This places it ahead of the standard YARN artifacts- Parameters:
path- path to the JAR. Absolute or relative -on the target system
-
appendAll
-
insertAll
-
addLibDir
-
insertLibDir
-
addClassDirectory
-
insertClassDirectory
-
addRemoteClasspathEnvVar
public void addRemoteClasspathEnvVar() -
insertRemoteClasspathEnvVar
public void insertRemoteClasspathEnvVar() -
buildLibDir
Build a lib dir path- Parameters:
pathToLibDir- path to the directory; may or may not end with a trailing space- Returns:
- a path to a lib dir that is compatible with the java classpath
-
splitClasspath
Split a classpath. This uses the local path separator so MUST NOT be used to work with remote classpaths- Parameters:
localpath- local path- Returns:
- a splite
-
localJVMClasspath
Get the local JVM classpath split up- Returns:
- the list of entries on the JVM classpath env var
-