odps-sdk/odps-sdk-graph/src/main/java/com/aliyun/odps/graph/DefaultComputingVertexResolver.java [236:267]:
- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
  protected void addEdges(I vertexId, Vertex<I, V, E, M> vertex,
                          VertexChanges<I, V, E, M> vertexChanges) throws IOException {
    Set<I> destVertexId = new HashSet<I>();
    if (vertex != null && vertex.hasEdges()) {
      for (Edge<I, E> edge : vertex.getEdges()) {
        if (destVertexId.contains(edge.getDestVertexId())) {
          throw new IOException(
              "ODPS-0730001: Duplicate edges for vertex, from '"
              + vertex.getId() + "' to '" + edge.getDestVertexId() + "'");
        }
        destVertexId.add(edge.getDestVertexId());
      }
    }

    if (hasEdgeAdditions(vertexChanges)) {
      if (vertex == null) {
        throw new IOException("ODPS-0730001: Add edge to vertex(Id: '" + vertexId
                              + "') that does not exist");
      }

      /** Check whether or not vertex has duplicate edges */
      for (Edge<I, E> edge : vertexChanges.getAddedEdgeList()) {
        if (destVertexId.contains(edge.getDestVertexId())) {
          throw new IOException(
              "ODPS-0730001: Add duplicate edges for vertex, from '"
              + vertex.getId() + "' to '" + edge.getDestVertexId() + "'");
        }
        destVertexId.add(edge.getDestVertexId());
        vertex.addEdge(edge.getDestVertexId(), edge.getValue());
      }
    }
  }
- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -



odps-sdk/odps-sdk-graph/src/main/java/com/aliyun/odps/graph/DefaultLoadingVertexResolver.java [219:250]:
- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
  protected void addEdges(I vertexId, Vertex<I, V, E, M> vertex,
                          VertexChanges<I, V, E, M> vertexChanges) throws IOException {
    Set<I> destVertexId = new HashSet<I>();
    if (vertex != null && vertex.hasEdges()) {
      for (Edge<I, E> edge : vertex.getEdges()) {
        if (destVertexId.contains(edge.getDestVertexId())) {
          throw new IOException(
              "ODPS-0730001: GraphLoader load duplicate edges for vertex, from '"
              + vertex.getId() + "' to '" + edge.getDestVertexId() + "'");
        }
        destVertexId.add(edge.getDestVertexId());
      }
    }

    if (hasEdgeAdditions(vertexChanges)) {
      if (vertex == null) {
        throw new IOException("ODPS-0730001: GraphLoader add edge to vertex(Id: '" + vertexId
                              + "') that does not exist");
      }

      /** Check whether or not vertex has duplicate edges */
      for (Edge<I, E> edge : vertexChanges.getAddedEdgeList()) {
        if (destVertexId.contains(edge.getDestVertexId())) {
          throw new IOException(
              "ODPS-0730001: GraphLoader load duplicate edges for vertex, from '"
              + vertex.getId() + "' to '" + edge.getDestVertexId() + "'");
        }
        destVertexId.add(edge.getDestVertexId());
        vertex.addEdge(edge.getDestVertexId(), edge.getValue());
      }
    }
  }
- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -



