private static Map<String, Map<String, String>> getInstanceDataByUser(ViewInstanceEntity instanceDefinition) {
    Map<String, Map<String, String>> instanceDataByUser = new HashMap<>();
    for (ViewInstanceDataEntity entity : instanceDefinition.getData()) {

      if (!instanceDataByUser.containsKey(entity.getUser())) {
        instanceDataByUser.put(entity.getUser(), new HashMap<>());
      }
      instanceDataByUser.get(entity.getUser()).put(entity.getName(), entity.getValue());
    }
    return  instanceDataByUser;
  }
Get the instance data in the mapping of user owning data to the key-value data.

@param instanceDefinition   the view instance definition
@return mapping of the data owner to the instance data entries
ambari-server/src/main/java/org/apache/ambari/server/view/ViewDataMigrationContextImpl.java