@Private
@Unstable
public class RunJar
extends java.lang.Object
| Modifier and Type | Field | Description |
|---|---|---|
static java.lang.String |
HADOOP_CLASSPATH |
Environment key for the (user-provided) hadoop classpath.
|
static java.lang.String |
HADOOP_CLIENT_CLASSLOADER_SYSTEM_CLASSES |
Environment key for the system classes.
|
static java.lang.String |
HADOOP_CLIENT_SKIP_UNJAR |
Environment key for disabling unjar in client code.
|
static java.lang.String |
HADOOP_USE_CLIENT_CLASSLOADER |
Environment key for using the client classloader.
|
static java.util.regex.Pattern |
MATCH_ANY |
Pattern that matches any string.
|
static int |
SHUTDOWN_HOOK_PRIORITY |
Priority of the RunJar shutdown hook.
|
| Constructor | Description |
|---|---|
RunJar() |
| Modifier and Type | Method | Description |
|---|---|---|
static void |
main(java.lang.String[] args) |
Run a Hadoop job jar.
|
void |
run(java.lang.String[] args) |
|
void |
unJar(java.io.File jarFile,
java.io.File toDir) |
Unpack a jar file into a directory.
|
static void |
unJar(java.io.File jarFile,
java.io.File toDir,
java.util.regex.Pattern unpackRegex) |
Unpack matching files from a jar.
|
static void |
unJar(java.io.InputStream inputStream,
java.io.File toDir,
java.util.regex.Pattern unpackRegex) |
Unpack matching files from a jar.
|
static void |
unJarAndSave(java.io.InputStream inputStream,
java.io.File toDir,
java.lang.String name,
java.util.regex.Pattern unpackRegex) |
Deprecated.
|
public static final java.util.regex.Pattern MATCH_ANY
public static final int SHUTDOWN_HOOK_PRIORITY
public static final java.lang.String HADOOP_USE_CLIENT_CLASSLOADER
public static final java.lang.String HADOOP_CLASSPATH
public static final java.lang.String HADOOP_CLIENT_CLASSLOADER_SYSTEM_CLASSES
public static final java.lang.String HADOOP_CLIENT_SKIP_UNJAR
public void unJar(java.io.File jarFile,
java.io.File toDir)
throws java.io.IOException
jarFile - the .jar file to unpacktoDir - the destination directory into which to unpack the jarjava.io.IOException - if an I/O error has occurred or toDir
cannot be created and does not already existpublic static void unJar(java.io.InputStream inputStream,
java.io.File toDir,
java.util.regex.Pattern unpackRegex)
throws java.io.IOException
inputStream - the jar stream to unpacktoDir - the destination directory into which to unpack the jarunpackRegex - the pattern to match jar entries againstjava.io.IOException - if an I/O error has occurred or toDir
cannot be created and does not already exist@Deprecated
public static void unJarAndSave(java.io.InputStream inputStream,
java.io.File toDir,
java.lang.String name,
java.util.regex.Pattern unpackRegex)
throws java.io.IOException
inputStream - the jar stream to unpacktoDir - the destination directory into which to unpack the jarunpackRegex - the pattern to match jar entries againstname - name.java.io.IOException - if an I/O error has occurred or toDir
cannot be created and does not already existpublic static void unJar(java.io.File jarFile,
java.io.File toDir,
java.util.regex.Pattern unpackRegex)
throws java.io.IOException
jarFile - the .jar file to unpacktoDir - the destination directory into which to unpack the jarunpackRegex - the pattern to match jar entries againstjava.io.IOException - if an I/O error has occurred or toDir
cannot be created and does not already existpublic static void main(java.lang.String[] args)
throws java.lang.Throwable
args - args.java.lang.Throwable - error.public void run(java.lang.String[] args)
throws java.lang.Throwable
java.lang.ThrowableCopyright © 2008–2025 Apache Software Foundation. All rights reserved.