CPARK 1.0
A light-weighted, distributed computing framework for C++ that offers a fast and general-purpose large data processing solution.
Loading...
Searching...
No Matches
Public Types | Public Member Functions | List of all members
cpark::Config Class Reference

#include <cpark.h>

Public Types

enum class  ParallelPolicy { Sequential , Thread }
 

Public Member Functions

constexpr const std::string & getDebugName () const noexcept
 
constexpr size_t getParallelTaskNum () const noexcept
 
constexpr ParallelPolicy getParallelPolicy () const noexcept
 
constexpr std::ostream * getLoggerPtr () const noexcept
 
constexpr std::ostream & getLoggerOrNullStream () const noexcept
 
ConfigsetDebugName (std::string name) noexcept
 
ConfigsetParallelTaskNum (size_t num=0) noexcept
 
ConfigsetParallelPolicy (ParallelPolicy policy) noexcept
 
ConfigsetLogger (std::ostream *logger) noexcept
 

Detailed Description

Configuration class for cpark.

Examples
calculate_pi.cpp, collect_partitions.cpp, merge_splits.cpp, simple.cpp, and speed_check.cpp.

Member Function Documentation

◆ getDebugName()

constexpr const std::string & cpark::Config::getDebugName ( ) const
inlineconstexprnoexcept

Returns the debug name, a name that will be shown in the log message of the cpark tasks created with this configuration

Examples
simple.cpp.

◆ getLoggerOrNullStream()

constexpr std::ostream & cpark::Config::getLoggerOrNullStream ( ) const
inlineconstexprnoexcept

Returns an ostream that will be used as a logger. If the logger is not set by user, it returns an ostream that eats everything put to it.

◆ getLoggerPtr()

constexpr std::ostream * cpark::Config::getLoggerPtr ( ) const
inlineconstexprnoexcept

Returns a pointer to an ostream that will be used as a logger.

◆ getParallelPolicy()

constexpr ParallelPolicy cpark::Config::getParallelPolicy ( ) const
inlineconstexprnoexcept

Returns the parallel policy of the cpark tasks.

◆ getParallelTaskNum()

constexpr size_t cpark::Config::getParallelTaskNum ( ) const
inlineconstexprnoexcept

Returns the parallel task number of the cpark task, which typically means the number of splits in an Rdd.

◆ setDebugName()

Config & cpark::Config::setDebugName ( std::string  name)
inlinenoexcept

Sets debug name.

Examples
collect_partitions.cpp, and simple.cpp.

◆ setLogger()

Config & cpark::Config::setLogger ( std::ostream *  logger)
inlinenoexcept

Sets logger.

Examples
simple.cpp.

◆ setParallelPolicy()

Config & cpark::Config::setParallelPolicy ( ParallelPolicy  policy)
inlinenoexcept

Sets parallel policy.

◆ setParallelTaskNum()

Config & cpark::Config::setParallelTaskNum ( size_t  num = 0)
inlinenoexcept

Sets parallel task number. If no parameter, default to physical supported thread number.

Examples
merge_splits.cpp, simple.cpp, and speed_check.cpp.

The documentation for this class was generated from the following file: