CPARK 1.0
A light-weighted, distributed computing framework for C++ that offers a fast and general-purpose large data processing solution.
|
#include <sample_rdd.h>
Public Types | |
using | Base = BaseRdd< SampleRdd< R > > |
Public Member Functions | |
constexpr | SampleRdd (const R &prev, double fraction) |
constexpr | SampleRdd (const SampleRdd &)=default |
SampleRdd & | operator= (const SampleRdd &)=default |
Public Member Functions inherited from cpark::BaseRdd< SampleRdd< R > > | |
BaseRdd (const BaseRdd< R > &prev, bool copy_id) | |
BaseRdd (const BaseRdd< R > &prev) | |
BaseRdd (ExecutionContext *context) | |
BaseRdd & | operator= (const BaseRdd< R > &prev) |
auto | begin () const |
auto | end () const |
ExecutionContext::RddId | id () const noexcept |
Public Attributes | |
friend | Base |
Additional Inherited Members | |
Protected Attributes inherited from cpark::BaseRdd< SampleRdd< R > > | |
ExecutionContext * | context_ |
ExecutionContext::RddId | rdd_id_ |
size_t | splits_num_ |
An Rdd holding the sampled data from an old rdd by a specific sample fraction
R | Type of the old Rdd. The type of the old Rdd R 's elements should be able to invoke random boolean function, the invoke result must be in boolean, and the element type shouldn't change after sampling. |
|
inlineconstexpr |
Main constructor of SampleRdd.
prev | Reference to previous Rdd of type R |
fraction | The desired sampling ratio from the 'prev' RDD |