public class VMAssignmentResult
extends java.lang.Object
scheduleOnce()
method to schedule a set of
tasks, that method returns a SchedulingResult
. That object includes the method
getResultMap()
which returns a map of host names to
VMAssignmentResult
objects. Those objects in turn have the getLeasesUsed()
and
getTasksAssigned()
methods, which return information about the resource offers that participated in
the assignments and which tasks were assigned on those hosts, in the form of VirtualMachineLease
objects and TaskAssignmentResult
objects respectively. This approach will give you insight into which
tasks have been assigned to which hosts in the current scheduling round (but not about which tasks are
already running on those hosts).Constructor and Description |
---|
VMAssignmentResult(java.lang.String hostname,
java.util.List<VirtualMachineLease> leasesUsed,
java.util.Set<TaskAssignmentResult> tasksAssigned) |
Modifier and Type | Method and Description |
---|---|
java.lang.String |
getHostname()
Get the name of the host whose assignment results are available.
|
java.util.List<VirtualMachineLease> |
getLeasesUsed()
Get the list of leases (resource offers) used in creating the resource assignments for tasks.
|
java.util.Set<TaskAssignmentResult> |
getTasksAssigned()
Get the set of tasks that are assigned resources from this host.
|
java.lang.String |
toString() |
public VMAssignmentResult(java.lang.String hostname, java.util.List<VirtualMachineLease> leasesUsed, java.util.Set<TaskAssignmentResult> tasksAssigned)
public java.lang.String getHostname()
public java.util.List<VirtualMachineLease> getLeasesUsed()
public java.util.Set<TaskAssignmentResult> getTasksAssigned()
public java.lang.String toString()
toString
in class java.lang.Object