@Transactional
  public void uninstallViewInstance(ViewInstanceEntity instanceEntity) throws IllegalStateException {
    try {
      viewInstanceOperationHandler.uninstallViewInstance(instanceEntity);
      updateCaches(instanceEntity);
    } catch (IllegalStateException illegalStateExcpetion) {
      LOG.error("Exception occurred while uninstalling view : {}", instanceEntity, illegalStateExcpetion);
      throw illegalStateExcpetion;
    }
  }
Uninstall a view instance for the view with the given view name.

@param instanceEntity the view instance entity
@throws IllegalStateException if the given instance is not in a valid state
ambari-server/src/main/java/org/apache/ambari/server/view/ViewRegistry.java