public void setComponentVersions(Cluster cluster) throws AmbariException {
    componentVersionMap = cluster.getComponentVersionMap();
  }
Used to set a map of {service -> { component -> version}}. This is
necessary when performing an upgrade to correct build paths of required
binaries. This method will only set the version information for a component
if:
<ul>
<li>The component advertises a version</li>
<li>The repository for the component has been resolved and the version can
be trusted</li>
</ul>

@param cluster
         the cluster from which to build the map
ambari-server/src/main/java/org/apache/ambari/server/agent/ExecutionCommand.java