Created
June 14, 2016 19:54
-
-
Save rjeli/4c9f9c70016d2cb5528bc229a1464a0f to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
// Set<Document> added | |
// Featurizer f | |
// sc::parallelize : List<T> -> JavaRDD<T> | |
Stream<Tuple2<Integer,Vector>> featurizedStream = added.stream() | |
.map(d -> new Tuple2(d.getId(), f.vector(d))); | |
JavaRDD<Tuple2<Integer,Vector>> featurized = | |
sc.parallelize(featurizedStream.collect(Collectors.toList())); |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment