InetSocketAddress
or ServerName
or
a hostname String and port.public class HServerAddress extends Object implements org.apache.hadoop.io.WritableComparable<HServerAddress>
InetSocketAddress
and makes it
WritableComparable
. Resolves on construction AND on
deserialization -- since we're internally creating an InetSocketAddress --
so could end up with different results if the two ends of serialization have
different resolvers. Be careful where you use it. Should only be used when
you need to pass an InetSocketAddress across an RPC. Even then its a bad
idea because of the above resolve issue.Constructor and Description |
---|
HServerAddress()
Deprecated.
Constructor for deserialization use only.
|
HServerAddress(HServerAddress other)
Deprecated.
Copy-constructor.
|
HServerAddress(InetSocketAddress address)
Deprecated.
Construct an instance from an
InetSocketAddress . |
HServerAddress(String hostname,
int port)
Deprecated.
|
Modifier and Type | Method and Description |
---|---|
int |
compareTo(HServerAddress o)
Deprecated.
|
boolean |
equals(Object o)
Deprecated.
|
String |
getBindAddress()
Deprecated.
|
String |
getHostname()
Deprecated.
|
String |
getHostnameAndPort()
Deprecated.
|
InetSocketAddress |
getInetSocketAddress()
Deprecated.
|
int |
getPort()
Deprecated.
|
int |
hashCode()
Deprecated.
|
void |
readFields(DataInput in)
Deprecated.
|
String |
toString()
Deprecated.
|
void |
write(DataOutput out)
Deprecated.
|
public HServerAddress()
public HServerAddress(InetSocketAddress address)
InetSocketAddress
.address
- InetSocketAddress of serverpublic HServerAddress(String hostname, int port)
hostname
- Hostnameport
- Port numberpublic HServerAddress(HServerAddress other)
other
- HServerAddress to copy frompublic String getBindAddress()
public int getPort()
public String getHostname()
public String getHostnameAndPort()
public InetSocketAddress getInetSocketAddress()
public String toString()
public void readFields(DataInput in) throws IOException
readFields
in interface org.apache.hadoop.io.Writable
IOException
public void write(DataOutput out) throws IOException
write
in interface org.apache.hadoop.io.Writable
IOException
public int compareTo(HServerAddress o)
compareTo
in interface Comparable<HServerAddress>
Copyright © 2014 The Apache Software Foundation. All Rights Reserved.