Created
October 9, 2014 16:57
-
-
Save bryanyang0528/eb6ab4b750feaeb7525b to your computer and use it in GitHub Desktop.
This file contains hidden or 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
| In [5]: | |
| raw_ratings = sc.textFile('/Users/bryanyang/Documents/Data/Movie Rating/ratings.dat',10) ##分成10份 | |
| raw_ratings.setName("raw ratings 10") | |
| raw_ratings.cache() | |
| Out[5]: | |
| raw ratings 10 MappedRDD[6] at textFile at NativeMethodAccessorImpl.java:-2 | |
| In [6]: | |
| entries = raw_ratings.count() | |
| print "%s entries in ratings" %entries | |
| Out[6] | |
| 100000 entries in ratings |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment