@Transactional
  public void removeInstanceData(ViewInstanceEntity instanceEntity, String key) {
    ViewInstanceDataEntity dataEntity = instanceEntity.getInstanceData(key);
    if (dataEntity != null) {
      instanceDAO.removeData(dataEntity);
    }
    instanceEntity.removeInstanceData(key);
    instanceDAO.merge(instanceEntity);
  }
Remove the data entry keyed by the given key from the given instance entity.

@param instanceEntity the instance entity
@param key            the data key
ambari-server/src/main/java/org/apache/ambari/server/view/ViewRegistry.java