if (maybeFirstPort.isPresent()) {
String upstream = String.format("%s:%d", task.getOffer().getHostname(), maybeFirstPort.get());
String rackId = task.getTaskId().getRackId();
upstreams.add(new UpstreamInfo(upstream, Optional.of(requestId), Optional.fromNullable(rackId)));
} else {
LOG.warn("Task {} is missing port but is being passed to LB ({})", task.getTaskId(), task);
}
}