-
Notifications
You must be signed in to change notification settings - Fork 1
Memory Model
Matheus C. Santos edited this page Feb 3, 2015
·
3 revisions
When a function is applied to a dataset, a new dataset is generated and the source dataset is and discarded. If the programmer wishes to use a dataset more than once, he needs to cache it calling the cache() function. The exceptions are all update functions, which do not discard any dataset.
Examples of data automatic distruction:
auto data = FDD<int>("fileInput.txt");
auto processedData = data->map(&myMap);Examples of data reutilization:
auto data = FDD<int>("fileInput.txt").cache();
auto processedData = data->map(&myMap);
auto otherData = data->flatMap(&myFlatMap);