@Override
    public JavaPairRDD<Object, VertexWritable> readGraphRDD(final Configuration configuration, final JavaSparkContext sparkContext) {
        final List<Vertex> list = new ArrayList<>();
        list.add(StarGraph.open().addVertex(T.id, 1l, T.label, "person", "age", 29));
        list.add(StarGraph.open().addVertex(T.id, 2l, T.label, "person", "age", 27));
        list.add(StarGraph.open().addVertex(T.id, 4l, T.label, "person", "age", 32));
        list.add(StarGraph.open().addVertex(T.id, 6l, T.label, "person", "age", 35));
        return sparkContext.parallelize(list).mapToPair(vertex -> new Tuple2<>(vertex.id(), new VertexWritable(vertex)));
    }
@author Marko A. Rodriguez (http://markorodriguez.com)
spark-gremlin/src/test/java/org/apache/tinkerpop/gremlin/spark/structure/io/ExampleInputRDD.java