// Create a new vertex assignment event
final ManagementVertexID managementVertexID = id.toManagementVertexID();
final long timestamp = System.currentTimeMillis();
final AbstractInstance instance = newAllocatedResource.getInstance();
VertexAssignmentEvent event;
if (instance == null) {
event = new VertexAssignmentEvent(timestamp, managementVertexID, "null", "null");
} else {
String instanceName = null;
if (instance.getInstanceConnectionInfo() != null) {
instanceName = instance.getInstanceConnectionInfo().toString();
} else {
instanceName = instance.toString();
}
event = new VertexAssignmentEvent(timestamp, managementVertexID, instanceName, instance.getType()
.getIdentifier());
}
this.eventCollector.updateManagementGraph(jobID, event);
this.eventCollector.addEvent(this.jobID, event);