You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
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);