@Override
    public Iterator<String> head(final String location, final int totalLines) {
        return IteratorUtils.map(Spark.getRDD(location).toJavaRDD().take(totalLines).iterator(), Object::toString);
    }
@param pattern
@return true if the pattern is actually a path as of the path definition in {@linkplain Storage}

NOTE: a more precise syntax check is possible
spark-gremlin/src/main/java/org/apache/tinkerpop/gremlin/spark/structure/io/SparkContextStorage.java