|
|||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||||
java.lang.Object | +--dd.host.api.HostInfo
HostInfo is tuple object/record that contains all the
local information stored about a particular host in the system.
| Field Summary | |
|---|---|
long |
classification
classification is a numeric label, indicating
the group/cluster that this node is a member of.
|
long |
clockSkew
clockSkew (in us) is the difference between
the local clock and clock at the src node. |
bamboo.vivaldi.VirtualCoordinate |
coordinate
VirtualCoordinate of host. |
long |
deadline
deadline time (in us) that we should
receive a heartbeat from src node. |
long |
domainId
domainId is the last eight bytes of the hash of
the domain_guess. |
short |
event
event is the event that transitioned our local
knowledge of a node into into the current
state. |
static short |
EVENT_HB_RECV
HB_RECV - Node successful sent a
HostHbStage. |
static short |
EVENT_HB_TIMEOUT
HB_TIMEOUT - Node not successfully sent a
HB_RECV that we have received. |
static short |
EVENT_JOIN
JOIN - Node was added to local
RoutingTable. |
static short |
EVENT_MULTICAST_DEAD
MULTICAST_DEAD - Node is dead (i.e. not responding).
|
static short |
EVENT_PING_DEAD
PING_DEAD - Node declared dead
(i.e. |
static short |
EVENT_PING_JOIN
PING_JOIN - Node was added to local
RoutingTable and we need to
ping node to tell whether how many hops the
remote node is from the local node. |
static short |
EVENT_PING_REMOVE
PING_REMOVE - Node was removed from local
RoutingTable and we need to
ping node to tell whether, node was removed because
it is dead or just
RoutingTable re-adjustment. |
static short |
EVENT_PUBLISH
PUBLISH - Node was added to local
PtrMgr because a
publish resulted in a
AddPtrReq. |
static short |
EVENT_Q_TIMEOUT
Q_TIMEOUT - Node has finished incubating in
the reviving state. |
static short |
EVENT_REMOVE
REMOVE - Node was removed from local
RoutingTable. |
static String[] |
EVENT_STRING
Strings corresponding to host states. |
static short |
EVENT_UNPUBLISH
UNPUBLISH - Node was modified in local
PtrMgr because an
unpublish resulted in a
RemovePtrReq. |
HostAppFilter |
filter
HostAppFilter is a summary of the
applications that host is exporting to the rest of
the system. |
long |
firstSeen
firstSeen is the recorded local time (in us) of
of time when the host was first heard of.
|
SecureHash |
guid
guid of the src/host node. |
short |
hops
hops is the number of overlay hops between
the src node and local node. |
short |
latitude
latitude is the angle of a host above (or below) the equator.
|
byte |
locationGranularity
location_granularity is granularity of the
latitude/longitude coordinates. |
short |
longitude
longitude is the angle of a host west or east of the
prime meridian passing through the old Royal Astronomical Observatory
in Greenwich, England. |
NodeId |
nodeId
NodeId of the src/host node. |
long |
srcTime
srcTime (in us) is the time at the src. |
short |
state
state is the local nodes knowledge of the state
of the src node. |
static short |
STATE_DEAD
DEAD - Node has not been responding for a while. |
static short |
STATE_HIBERNATING
HIBERNATING - Node has stop responding. |
static short |
STATE_NOEXIST
NOEXIST - Node does not exist to us; that is, we have
not heard of node before. |
static short |
STATE_NORMAL
NORMAL - Node is functioning normal. |
static short |
STATE_REVIVING
REVIVING - We have just heard from node, but do not know if
node if functioning normally. |
static String[] |
STATE_STRING
Strings corresponding to host states. |
long |
sumSession
sumSession is the sum of time that the node was availabile
(in us).
|
| Constructor Summary | |
|---|---|
HostInfo(InputBuffer buffer)
Constructs a HostInfo from its
serialized form. |
|
HostInfo(SecureHash guid,
NodeId nodeId,
long srcTime,
short hops,
short state,
short event,
long deadline,
long clockSkew,
long sumSession,
long firstSeen,
long classification,
long domainId,
short latitude,
short longitude,
byte locationGranularity,
bamboo.vivaldi.VirtualCoordinate coordinate,
HostAppFilter filter)
Constructor: Creates a new HostInfo. |
|
| Method Summary | |
|---|---|
Object |
clone()
Specified by java.lang.Object |
int |
compareTo(Object other)
Specified by java.lang.Comparable |
boolean |
equals(Object other)
Specified by java.lang.Object |
int |
hashCode()
Specified by java.lang.Object |
void |
serialize(OutputBuffer buffer)
Specified by ostore.util.QuickSerializable |
String |
toString()
Specified by java.lang.Object |
| Methods inherited from class java.lang.Object |
|---|
finalize, getClass, notify, notifyAll, wait, wait, wait |
| Field Detail |
public static final short STATE_NOEXIST
NOEXIST - Node does not exist to us; that is, we have
not heard of node before.
public static final short STATE_NORMAL
NORMAL - Node is functioning normal. We send
DDLocateMsg routing traffic to node.
public static final short STATE_REVIVING
REVIVING - We have just heard from node, but do not know if
node if functioning normally. With caution, we send
DDLocateMsg routing traffic to node;
that is, we are monitoring node very closely.
public static final short STATE_HIBERNATING
HIBERNATING - Node has stop responding. Monitor node
very closely, but do NOT send
DDLocateMsg routing traffic to node.
public static final short STATE_DEAD
DEAD - Node has not been responding for a while. Node
is dead to us. Do NOT foward traffic or monitor
node. Okay to remove pointer state associated with node.
public static final String[] STATE_STRING
public static final short EVENT_JOIN
JOIN - Node was added to local
RoutingTable.
public static final short EVENT_PUBLISH
PUBLISH - Node was added to local
PtrMgr because a
publish resulted in a
AddPtrReq.
public static final short EVENT_UNPUBLISH
UNPUBLISH - Node was modified in local
PtrMgr because an
unpublish resulted in a
RemovePtrReq.
public static final short EVENT_PING_JOIN
PING_JOIN - Node was added to local
RoutingTable and we need to
ping node to tell whether how many hops the
remote node is from the local node.
public static final short EVENT_PING_REMOVE
PING_REMOVE - Node was removed from local
RoutingTable and we need to
ping node to tell whether, node was removed because
it is dead or just
RoutingTable re-adjustment.
public static final short EVENT_PING_DEAD
PING_DEAD - Node declared dead
(i.e. HB_TIMEOUT),
ping to confirm node not responding (i.e. node is dead).
public static final short EVENT_REMOVE
REMOVE - Node was removed from local
RoutingTable.
public static final short EVENT_HB_RECV
HB_RECV - Node successful sent a
HostHbStage.
public static final short EVENT_Q_TIMEOUT
Q_TIMEOUT - Node has finished incubating in
the reviving state. That is, we have been receiving
HB_RECV normally.
public static final short EVENT_HB_TIMEOUT
HB_TIMEOUT - Node not successfully sent a
HB_RECV that we have received.
public static final short EVENT_MULTICAST_DEAD
MULTICAST_DEAD - Node is dead (i.e. not responding).
Another node is telling us this. If the node is actually alive
it will immediately send a HB_RECV to correct the
mistake.
public static final String[] EVENT_STRING
public SecureHash guid
guid of the src/host node.
public NodeId nodeId
NodeId of the src/host node.
public long srcTime
srcTime (in us) is the time at the src.
public short hops
hops is the number of overlay hops between
the src node and local node.
public short state
state is the local nodes knowledge of the state
of the src node.
public short event
event is the event that transitioned our local
knowledge of a node into into the current
state.
public long deadline
deadline time (in us) that we should
receive a heartbeat from src node.
public long clockSkew
clockSkew (in us) is the difference between
the local clock and clock at the src node. If clocks are synchronized
clockSkew is the latency between local and src node.
public long sumSession
sumSession is the sum of time that the node was availabile
(in us).
This quantity is used to produce a rate of availability.
For example, sumSession/(current - firstSeen) = availability.
Alternative values can be used in the denominator of the availability
calculation. For example, the first time the node has been seen,
or a window of time, etc.
public long firstSeen
firstSeen is the recorded local time (in us) of
of time when the host was first heard of.
This quantity is used to produce a rate of availability.
For example, sumSession/(current - firstSeen) = availability.
Alternative values can be used in the denominator of the availability
calculation. For example, the first time the node has been seen,
or a window of time, etc.
public long classification
classification is a numeric label, indicating
the group/cluster that this node is a member of.
classification is an int because
each node could potentially be un-related to all other nodes.
That is, there is a max of
2^64-1 = 18,446,744,073,709,551,615 (i.e. 18 quintillion!)
labels/classifications. The default classification
is Long.MIN_VALUE.
Note: if there is not classifier running locally than the
HostHbStage labels each individual
node with its own unique classification based on
NodeId.
public long domainId
domainId is the last eight bytes of the hash of
the domain_guess. In simulation, domainId is
the hashCode of the transit stub domain.
public short latitude
latitude is the angle of a host above (or below) the equator.
The latitude is stored as a short by multiplying the
latitude in decimal form by 100. For example, Berkeley, CA, USA is at
latitude 37.87; we therefore, multiply 37.87*100=3787 and store
3787 as a short since latitude is bound by [-90.00,90.00] (south pole and
north pole, respectively). We do the same with longitude.
Note: We only store latitude and longitude because
they uniquely identify any location on earth. We also store the
granularity of the latitude and longitude as city=>0,
state/province=>1, or country=>2. Also note. If the latitude,
longitude, and/or granularity is unknown we store a
Short.MIN_VALUE
(or Byte.MIN_VALUE for granularity).
public short longitude
longitude is the angle of a host west or east of the
prime meridian passing through the old Royal Astronomical Observatory
in Greenwich, England. The longitude is stored as a short
by multiplying the longitude in decimal form by 100. For example,
Berkeley, CA, USA is at longitude -122.29; we therefore, multiply
-122.29*100=-12229 and store -12229 as a short since longitude is
bound by [-180.00,180.00] (just east and west of the international
date line respectively). We do the same with longitude.
Note: We only store latitude and longitude because
they uniquely identify any location on earth. We also store the
granularity of the latitude and longitude as city=>0,
state/province=>1, or country=>2. Also note. If the latitude,
longitude, and/or granularity is unknown we store
Short.MIN_VALUE
(or Byte.MIN_VALUE for granularity).
public byte locationGranularity
location_granularity is granularity of the
latitude/longitude coordinates. We store the
granularity of the latitude and longitude as city => 0,
state/province => 1, or country => 2.
NOTE: If the latitude, longitude, and/or granularity is unknown we
store a Short.MIN_VALUE
(or Byte.MIN_VALUE for granularity).
public bamboo.vivaldi.VirtualCoordinate coordinate
VirtualCoordinate of host.
public HostAppFilter filter
HostAppFilter is a summary of the
applications that host is exporting to the rest of
the system.
| Constructor Detail |
public HostInfo(SecureHash guid,
NodeId nodeId,
long srcTime,
short hops,
short state,
short event,
long deadline,
long clockSkew,
long sumSession,
long firstSeen,
long classification,
long domainId,
short latitude,
short longitude,
byte locationGranularity,
bamboo.vivaldi.VirtualCoordinate coordinate,
HostAppFilter filter)
HostInfo.
public HostInfo(InputBuffer buffer)
throws QSException
HostInfo from its
serialized form.
buffer - serialized
form of object.| Method Detail |
public void serialize(OutputBuffer buffer)
serialize in interface QuickSerializablepublic int hashCode()
hashCode in class Objectpublic boolean equals(Object other)
equals in class Objectpublic int compareTo(Object other)
compareTo in interface Comparable
public Object clone()
throws CloneNotSupportedException
clone in class ObjectCloneNotSupportedExceptionpublic String toString()
toString in class Object
|
|||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||||