|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Objectcom.bigdata.service.HostScore
public class HostScore
Per-host metadata and a score for that host which gets updated
periodically by LoadBalancerService.UpdateTask. HostScores are a
resource utilization measure. They are higher for a host which
is more highly utilized. There are several ways to look at the score,
including the rawScore, the rank, and the
normalized double-precision rank. The ranks move in the
same direction as the rawScores - a higher rank indicates
higher utilization. The least utilized host is always rank zero (0). The
most utilized host is always in the last rank.
| Field Summary | |
|---|---|
double |
drank
The normalized double precision rank in [0.0:1.0]. |
String |
hostname
|
int |
rank
The rank in [0:#scored]. |
double |
rawScore
The raw score computed for that service. |
double |
score
The normalized score computed for that service. |
| Constructor Summary | |
|---|---|
HostScore(String hostname)
Constructor variant used when you do not have performance counters for the host and could not compute its rawScore. |
|
HostScore(String hostname,
double rawScore)
Constructor variant used when you have computed the rawStore. |
|
| Method Summary | |
|---|---|
int |
compareTo(HostScore arg0)
Places elements into order by ascending rawScore (aka
increasing utilization). |
static double |
normalize(double rawScore,
double totalRawScore)
Normalizes a raw score in the context of totals for some host. |
String |
toString()
|
| Methods inherited from class java.lang.Object |
|---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait |
| Field Detail |
|---|
public final String hostname
public final double rawScore
public double score
public int rank
public double drank
| Constructor Detail |
|---|
public HostScore(String hostname)
hostname -
public HostScore(String hostname,
double rawScore)
hostname - rawScore - | Method Detail |
|---|
public String toString()
toString in class Objectpublic int compareTo(HostScore arg0)
rawScore (aka
increasing utilization). The hostname is used to break any
ties.
compareTo in interface Comparable<HostScore>
public static double normalize(double rawScore,
double totalRawScore)
rawScore - The raw score.totalRawScore - The raw score computed from the totals.
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||