Class WorkerAddressUtils


  • public class WorkerAddressUtils
    extends java.lang.Object
    A util class for worker address -> string conversion.
    • Method Summary

      All Methods Static Methods Concrete Methods 
      Modifier and Type Method Description
      static java.lang.String convertAddressToStringWebPort​(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.String workerAddressListToString​(java.util.Collection<alluxio.wire.WorkerNetAddress> workers)
      Convert a list of worker addresses to string.
      static java.lang.String workerListToString​(java.util.Set<alluxio.client.block.BlockWorkerInfo> worker)
      Converts a set of worker metadata to string.
      • Methods inherited from class java.lang.Object

        clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
    • Constructor Detail

      • WorkerAddressUtils

        public WorkerAddressUtils()
    • 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 input
        alluxioConf - 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