public final class Utils extends Object
Modifier and Type | Method and Description |
---|---|
static alluxio.cli.validation.Utils.ProcessExecutionResult |
getResultFromProcess(String[] args)
Executes a command in another process and check for its execution result.
|
static boolean |
isAddressReachable(String hostname,
int port)
Validates whether a network address is reachable.
|
static boolean |
isAlluxioRunning(String className)
Checks whether an Alluxio service is running.
|
static boolean |
isMountingPoint(String path,
String[] fsTypes)
Checks whether a path is the mounting point of a RAM disk volume.
|
static List<String> |
readNodeList(String fileName)
Reads a list of nodes from given file name ignoring comments and empty lines.
|
public static boolean isAddressReachable(String hostname, int port)
hostname
- host name of the network addressport
- port of the network addresspublic static boolean isAlluxioRunning(String className)
className
- class name of the Alluxio service@Nullable public static List<String> readNodeList(String fileName)
fileName
- name of a file that contains the list of the nodespublic static boolean isMountingPoint(String path, String[] fsTypes) throws IOException
path
- a string represents the path to be checkedfsTypes
- an array of strings represents expected file system typeIOException
- if the function fails to get the mount information of the systempublic static alluxio.cli.validation.Utils.ProcessExecutionResult getResultFromProcess(String[] args)
args
- array representation of the command to executeProcessExecutionResult
including the process's exit value, output and errorCopyright © 2023. All Rights Reserved.