private static Vertex getOrCreateVertex(
      Map<String, Vertex> vertices, String label, Vertex.Type type) {
    Vertex vertex = vertices.get(label);
    if (vertex == null) {
      vertex = new Vertex(label, type);
      vertices.put(label, vertex);
    }
    return vertex;
  }
Find a vertex from a cache, or create one if not.
ql/src/java/org/apache/hadoop/hive/ql/hooks/LineageLogger.java