Java org.apache.hadoop.net NetUtils fields, constructors, methods, implement or subclass

Example usage for Java org.apache.hadoop.net NetUtils fields, constructors, methods, implement or subclass

Introduction

In this page you can find the methods, fields and constructors for org.apache.hadoop.net NetUtils.

The text is from its open source code.

Method

voidaddStaticResolution(String host, String resolvedName)
Adds a static resolution for host.
voidconnect(Socket socket, SocketAddress address, int timeout)
This is a drop-in replacement for Socket#connect(SocketAddress,int) .
voidconnect(Socket socket, SocketAddress endpoint, SocketAddress localAddr, int timeout)
Like NetUtils#connect(Socket,SocketAddress,int) but also takes a local address and port to bind the socket to.
InetSocketAddresscreateSocketAddr(String target)
Util method to build socket addr from either: : ://:/
InetSocketAddresscreateSocketAddr(String target, int defaultPort)
Util method to build socket addr from either: : ://:/
InetSocketAddresscreateSocketAddr(String target, int defaultPort, String configName)
Create an InetSocketAddress from the given target string and default port.
InetSocketAddresscreateSocketAddrForHost(String host, int port)
Create a socket address with the given host and port.
URIgetCanonicalUri(URI uri, int defaultPort)
Resolve the uri's hostname and add the default port if not in the uri
InetSocketAddressgetConnectAddress(Server server)
Returns InetSocketAddress that a client can use to connect to the server.
InetSocketAddressgetConnectAddress(InetSocketAddress addr)
Returns an InetSocketAddress that a client can use to connect to the given listening address.
SocketFactorygetDefaultSocketFactory(Configuration conf)
Get the default socket factory as specified by the configuration parameter hadoop.rpc.socket.factory.default
intgetFreeSocketPort()
Return a free port number.
StringgetHostname()
Return hostname without throwing exception.
StringgetHostPortString(InetSocketAddress addr)
Compose a "host:port" string from the address.
SocketInputWrappergetInputStream(Socket socket)
Same as getInputStream(socket, socket.getSoTimeout()).

ListgetIPs(String subnet, boolean returnSubinterfaces)
Return an InetAddress for each interface that matches the given subnet specified using CIDR notation.
OutputStreamgetOutputStream(Socket socket)
Same as getOutputStream(socket, 0).
OutputStreamgetOutputStream(Socket socket, long timeout)
Returns OutputStream for the socket.
SocketFactorygetSocketFactory(Configuration conf, Class clazz)
Get the socket factory for the given class according to its configuration parameter hadoop.rpc.socket.factory.class.<ClassName>.
booleanisLocalAddress(InetAddress addr)
Given an InetAddress, checks to see if the address is a local address, by comparing the address with all the interfaces on the node.
booleanisValidSubnet(String subnet)
StringnormalizeHostName(String name)
Given a string representation of a host, return its ip address in textual presentation.
IOExceptionwrapException(final String destHost, final int destPort, final String localHost, final int localPort, final IOException exception)
Take an IOException , the local host port and remote host port details and return an IOException with the input exception as the cause and also include the host details.