@Override
  public ServiceComponentHost addServiceComponentHost(String hostName) throws AmbariException {
    ServiceComponentHost hostComponent = serviceComponentHostFactory.createNew(this, hostName);
    addServiceComponentHost(hostComponent);
    return hostComponent;
  }
Set the recoveryEnabled field in the entity object.

@param recoveryEnabled - true or false
ambari-server/src/main/java/org/apache/ambari/server/state/ServiceComponentImpl.java