public final class ResourceSchedulerUtils
extends java.lang.Object
Modifier and Type | Method and Description |
---|---|
static boolean |
extractPackage(java.lang.String workingDirectory,
java.lang.String packageDestination,
boolean isDeletePackage,
boolean isVerbose) |
static java.lang.String |
getHostIP(Config cfg) |
static java.lang.String |
getLocalIPFromNetworkInterfaces(java.util.List<java.lang.String> interfaceNames)
get ipv4 address of first matching network interface in the given list
network interface can not be loop back and it has to be up
|
static java.lang.String |
getOutgoingHostIP()
get the IP address of the host machine
a machine may have multiple IP addresses
we want the IP address that is reachable from outside
we don't want 127.xxx
implementation is based on the suggestion from:
stackoverflow.com/questions/9481865/getting-the-ip-address-of-the-current-machine-using-java
this only works if the host is connected to outside Internet
|
static boolean |
isValidIPv4(java.lang.String ip)
this is from:
https://stackoverflow.com/questions/5667371/validate-ipv4-address-in-java
|
static boolean |
setupWorkingDirectory(java.lang.String jobName,
java.lang.String workingDirectory,
java.lang.String corePackageName,
java.lang.String jobPackageURI,
boolean isVerbose) |
static boolean |
setupWorkingDirectory(java.lang.String jobId,
java.lang.String workingDirectory,
java.lang.String corePackageName,
java.lang.String jobPackageURI,
boolean isVerbose,
boolean copyCore) |
public static boolean setupWorkingDirectory(java.lang.String jobName, java.lang.String workingDirectory, java.lang.String corePackageName, java.lang.String jobPackageURI, boolean isVerbose)
public static boolean setupWorkingDirectory(java.lang.String jobId, java.lang.String workingDirectory, java.lang.String corePackageName, java.lang.String jobPackageURI, boolean isVerbose, boolean copyCore)
public static boolean extractPackage(java.lang.String workingDirectory, java.lang.String packageDestination, boolean isDeletePackage, boolean isVerbose)
public static java.lang.String getHostIP(Config cfg)
public static java.lang.String getOutgoingHostIP()
public static java.lang.String getLocalIPFromNetworkInterfaces(java.util.List<java.lang.String> interfaceNames)
interfaceNames
- public static boolean isValidIPv4(java.lang.String ip)
ip
-