public class CollectMetricsCommand extends AbstractCollectInfoCommand
Modifier and Type | Field and Description |
---|---|
static String |
COMMAND_NAME |
static org.apache.commons.cli.Options |
OPTIONS |
mFsContext, mWorkingDirPath
Constructor and Description |
---|
CollectMetricsCommand(FileSystemContext fsContext)
Creates a new instance of
CollectMetricsCommand . |
Modifier and Type | Method and Description |
---|---|
String |
getCommandName()
Gets the command name as input from the shell.
|
String |
getDescription() |
static String |
getMetricsJson(String url)
Probes Alluxio metrics json sink.
|
String |
getUsage() |
static String |
masterMetrics(FileSystemContext fsContext)
Get master metrics.
|
int |
run(org.apache.commons.cli.CommandLine cl)
Runs the command.
|
static List<String> |
workerMetrics(FileSystemContext fsContext)
Get metrics from each worker.
|
generateOutputFile, getWorkingDirectory, validateArgs
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
close, getOptions, getSubCommands, hasSubCommand, parseAndValidateArgs
public static final String COMMAND_NAME
public static final org.apache.commons.cli.Options OPTIONS
public CollectMetricsCommand(FileSystemContext fsContext)
CollectMetricsCommand
.fsContext
- the FileSystemContext
to execute inpublic String getCommandName()
Command
public int run(org.apache.commons.cli.CommandLine cl) throws AlluxioException, IOException
Command
cl
- the parsed command line for the argumentsAlluxioException
IOException
public String getUsage()
public String getDescription()
public static String masterMetrics(FileSystemContext fsContext)
fsContext
- for connecting to masterpublic static List<String> workerMetrics(FileSystemContext fsContext) throws IOException
fsContext
- for connecting to masterIOException
public static String getMetricsJson(String url) throws IOException
url
- URL that serves Alluxio metricsIOException
Copyright © 2023. All Rights Reserved.