Package org.apache.hadoop.metrics2.util
Class Servers
java.lang.Object
org.apache.hadoop.metrics2.util.Servers
Helpers to handle server addresses
-
Method Summary
Modifier and TypeMethodDescriptionstatic List<InetSocketAddress>Parses a space and/or comma separated sequence of server specifications of the form hostname or hostname:port.
-
Method Details
-
parse
Parses a space and/or comma separated sequence of server specifications of the form hostname or hostname:port. If the specs string is null, defaults to localhost:defaultPort.- Parameters:
specs- server specs (see description)defaultPort- the default port if not specified- Returns:
- a list of InetSocketAddress objects.
-