private void setViewUrl(ViewInstanceEntity instanceEntity) {
    ViewInstanceEntity viewInstanceEntity = instanceDAO.findByName(instanceEntity.getViewName(), instanceEntity.getInstanceName());
    Preconditions.checkNotNull(viewInstanceEntity);
    ViewURLEntity viewUrl = viewInstanceEntity.getViewUrl();
    // check if there is a URL attached
    if (viewUrl != null) {
      LOG.warn("Url exists for the auto instance {}, new url will not be created", viewInstanceEntity.getViewName());
      return;
    }

    String urlName = getUrlName(viewInstanceEntity);
    //Check if a URL exists with the same name
    Optional<ViewURLEntity> existingUrl = viewURLDAO.findByName(urlName);
    // remove any pre-existing URL's before creating new URL's
    ViewURLEntity urlEntity = new ViewURLEntity();
    urlEntity.setUrlName(urlName);

    urlEntity.setUrlSuffix(viewInstanceEntity.getInstanceName().toLowerCase());

    ViewURLEntity toSaveOrUpdate = existingUrl.or(urlEntity);
    toSaveOrUpdate.setViewInstanceEntity(viewInstanceEntity);

    if (existingUrl.isPresent()) {
      LOG.info("Url already present for {}", viewInstanceEntity.getViewName());
      viewURLDAO.update(toSaveOrUpdate);
    } else {
      LOG.info("Creating a new URL for auto instance {}", viewInstanceEntity.getViewName());
      viewURLDAO.save(urlEntity);
    }
    // Update the view with the URL
    viewInstanceEntity.setViewUrl(urlEntity);
    try {
      updateViewInstance(viewInstanceEntity);
    } catch (Exception ex) {
      LOG.error("Could not update the view instance with new URL, removing URL", ex);
      // Clean up
      Optional<ViewURLEntity> viewURLDAOByName = viewURLDAO.findByName(urlName);
      if (viewURLDAOByName.isPresent())
        viewURLDAO.delete(viewURLDAOByName.get());
    }
  }
Checks is service is 'HIVE' and INTERACTIVE_SERVICE(LLAP) is enabled. Then, it sets the view instance
parameter 'use.hive.interactive.mode' for the 'AUTO_INSTANCE_VIEW' to be true.
@param viewInstanceEntity
@param service
ambari-server/src/main/java/org/apache/ambari/server/view/ViewRegistry.java