Package alluxio.cli.fsadmin.command
Class WorkerAddressUtils
- java.lang.Object
-
- alluxio.cli.fsadmin.command.WorkerAddressUtils
-
public class WorkerAddressUtils extends java.lang.ObjectA util class for worker address -> string conversion.
-
-
Constructor Summary
Constructors Constructor Description WorkerAddressUtils()
-
Method Summary
All Methods Static Methods Concrete Methods Modifier and Type Method Description static java.lang.StringconvertAddressToStringWebPort(alluxio.wire.WorkerNetAddress address)Converts a worker address to string.static java.util.List<alluxio.wire.WorkerNetAddress>parseWorkerAddresses(java.lang.String workerAddressesStr, alluxio.conf.AlluxioConfiguration alluxioConf)Parses a string to worker addresses.static java.lang.StringworkerAddressListToString(java.util.Collection<alluxio.wire.WorkerNetAddress> workers)Convert a list of worker addresses to string.static java.lang.StringworkerListToString(java.util.Set<alluxio.client.block.BlockWorkerInfo> worker)Converts a set of worker metadata to string.
-
-
-
Method Detail
-
parseWorkerAddresses
public static java.util.List<alluxio.wire.WorkerNetAddress> parseWorkerAddresses(java.lang.String workerAddressesStr, alluxio.conf.AlluxioConfiguration alluxioConf)Parses a string to worker addresses.- Parameters:
workerAddressesStr- the string inputalluxioConf- the conf to rely on- Returns:
- a list of worker addresses
-
workerAddressListToString
public static java.lang.String workerAddressListToString(java.util.Collection<alluxio.wire.WorkerNetAddress> workers)
Convert a list of worker addresses to string.- Parameters:
workers- input worker list- Returns:
- the string format
-
workerListToString
public static java.lang.String workerListToString(java.util.Set<alluxio.client.block.BlockWorkerInfo> worker)
Converts a set of worker metadata to string.- Parameters:
worker- a set of workers- Returns:
- the converted string format
-
convertAddressToStringWebPort
public static java.lang.String convertAddressToStringWebPort(alluxio.wire.WorkerNetAddress address)
Converts a worker address to string. To stay consistent with the command, we print the web port of the worker.- Parameters:
address- the worker address- Returns:
- the string format
-
-