|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Objectcom.bigdata.service.ServiceScore
public class ServiceScore
Per-service metadata and a score for that service which gets updated
periodically by the LoadBalancerService.UpdateTask. ServiceScores are a
resource utilization measure. They are higher for a service
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 service is always rank zero (0).
The most utilized service 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. |
String |
serviceName
|
UUID |
serviceUUID
|
| Constructor Summary | |
|---|---|
ServiceScore(String hostname,
UUID serviceUUID,
String serviceName)
Constructor variant used when you do not have performance counters for the service and could not compute its rawScore. |
|
ServiceScore(String hostname,
UUID serviceUUID,
String serviceName,
double rawScore)
Constructor variant used when you have computed the rawStore. |
|
| Method Summary | |
|---|---|
int |
compareTo(ServiceScore arg0)
Places elements into order by ascending rawScore. |
static double |
normalize(double rawScore,
double totalRawScore)
Normalizes a raw score in the context of totals for some service. |
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 UUID serviceUUID
public final String serviceName
public final double rawScore
public double score
public int rank
public double drank
| Constructor Detail |
|---|
public ServiceScore(String hostname,
UUID serviceUUID,
String serviceName)
hostname - serviceUUID -
public ServiceScore(String hostname,
UUID serviceUUID,
String serviceName,
double rawScore)
hostname - serviceUUID - rawScore - | Method Detail |
|---|
public String toString()
toString in class Objectpublic int compareTo(ServiceScore arg0)
rawScore. The
serviceUUID is used to break any ties.
compareTo in interface Comparable<ServiceScore>
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 | |||||||||