libfaster API Documentation  Development Version
Super fast distributted computing
faster Namespace Reference

Description

libfaster main namespace

Typedefs

typedef unsigned int fddType
 Dataset type.
 
typedef unsigned int fddOpType
 Dataset operation type.
 
template<typename T , typename U >
using mapFunctionP = U(*)(T &input)
 
template<typename T , typename L , typename U >
using ImapFunctionP = std::pair< L, U >(*)(T &input)
 
template<typename T , typename U >
using PmapFunctionP = std::pair< U, size_t >(*)(T &input)
 
template<typename T , typename L , typename U >
using IPmapFunctionP = std::tuple< L, U, size_t >(*)(T &input)
 
template<typename T , typename U >
using bulkMapFunctionP = void(*)(U *output, T *input, size_t size)
 
template<typename T , typename L , typename U >
using IbulkMapFunctionP = void(*)(L *outKey, U *output, T *input, size_t size)
 
template<typename T , typename U >
using PbulkMapFunctionP = void(*)(U *output, size_t *outputDataSizes, T *input, size_t size)
 
template<typename T , typename L , typename U >
using IPbulkMapFunctionP = void(*)(L *outKey, U *output, size_t *outputDataSizes, T *input, size_t size)
 
template<typename T , typename U >
using flatMapFunctionP = std::deque< U >(*)(T &input)
 
template<typename T , typename L , typename U >
using IflatMapFunctionP = std::deque< std::pair< L, U >>(*)(T &input)
 
template<typename T , typename U >
using PflatMapFunctionP = std::deque< std::pair< U, size_t >>(*)(T &input)
 
template<typename T , typename L , typename U >
using IPflatMapFunctionP = std::deque< std::tuple< L, U, size_t >>(*)(T &input)
 
template<typename T , typename U >
using bulkFlatMapFunctionP = void(*)(U *&output, size_t &outputSize, T *input, size_t size)
 
template<typename T , typename L , typename U >
using IbulkFlatMapFunctionP = void(*)(L *&outKey, U *&output, size_t &outputSize, T *input, size_t size)
 
template<typename T , typename U >
using PbulkFlatMapFunctionP = void(*)(U *&output, size_t *&outputDataSizes, size_t &outputSize, T *input, size_t size)
 
template<typename T , typename L , typename U >
using IPbulkFlatMapFunctionP = void(*)(L *&outKey, U *&output, size_t *&outputDataSizes, size_t &outputSize, T *input, size_t size)
 
template<typename T >
using reduceFunctionP = T(*)(T &a, T &b)
 
template<typename T >
using bulkReduceFunctionP = T(*)(T *input, size_t size)
 
template<typename T , typename U >
using mapPFunctionP = U(*)(T *input, size_t size)
 
template<typename T , typename L , typename U >
using ImapPFunctionP = std::pair< L, U >(*)(T *input, size_t size)
 
template<typename T , typename U >
using PmapPFunctionP = std::pair< U, size_t >(*)(T *input, size_t size)
 
template<typename T , typename L , typename U >
using IPmapPFunctionP = std::tuple< L, U, size_t >(*)(T *input, size_t size)
 
template<typename T , typename U >
using bulkMapPFunctionP = void(*)(U *output, T **input, size_t *inputDataSizes, size_t size)
 
template<typename T , typename L , typename U >
using IbulkMapPFunctionP = void(*)(L *outKey, U *output, T **input, size_t *inputDataSizes, size_t size)
 
template<typename T , typename U >
using PbulkMapPFunctionP = void(*)(U *output, size_t *outputDataSizes, T **input, size_t *inputDataSizes, size_t size)
 
template<typename T , typename L , typename U >
using IPbulkMapPFunctionP = void(*)(L *outKey, U *output, size_t *outputDataSizes, T **input, size_t *inputDataSizes, size_t size)
 
template<typename T , typename U >
using flatMapPFunctionP = std::deque< U >(*)(T *&input, size_t size)
 
template<typename T , typename L , typename U >
using IflatMapPFunctionP = std::deque< std::pair< L, U >>(*)(T *&input, size_t size)
 
template<typename T , typename U >
using PflatMapPFunctionP = std::deque< std::pair< U, size_t >>(*)(T *&input, size_t size)
 
template<typename T , typename L , typename U >
using IPflatMapPFunctionP = std::deque< std::tuple< L, U, size_t >>(*)(T *&input, size_t size)
 
template<typename T , typename U >
using bulkFlatMapPFunctionP = void(*)(U *&output, size_t &outputSize, T **input, size_t *inputDataSizes, size_t size)
 
template<typename T , typename L , typename U >
using IbulkFlatMapPFunctionP = void(*)(L *&outKey, U *&output, size_t &outputSize, T **input, size_t *inputDataSizes, size_t size)
 
template<typename T , typename U >
using PbulkFlatMapPFunctionP = void(*)(U *&output, size_t *outputDataSizes, size_t &outputSize, T **input, size_t *inputDataSizes, size_t size)
 
template<typename T , typename L , typename U >
using IPbulkFlatMapPFunctionP = void(*)(L *&outKey, U *&output, size_t *outputDataSizes, size_t &outputSize, T **input, size_t *inputDataSizes, size_t size)
 
template<typename T >
using PreducePFunctionP = std::pair< T *, size_t >(*)(T *a, size_t sizeA, T *b, size_t sizeB)
 
template<typename T >
using PbulkReducePFunctionP = std::pair< T *, size_t >(*)(T **input, size_t *inputDataSizes, size_t size)
 
template<typename K , typename T >
using updateIFunctionP = void(*)(K &inKey, T &input)
 
template<typename K , typename T >
using updateByKeyIFunctionP = void(*)(K &inKey, std::vector< T * > &input)
 
template<typename K , typename T , typename L , typename U >
using ImapIFunctionP = std::pair< L, U >(*)(const K &inKey, T &input)
 
template<typename K , typename T , typename U >
using mapIFunctionP = U(*)(const K &inKey, T &input)
 
template<typename K , typename T , typename L , typename U >
using IPmapIFunctionP = std::tuple< L, U, size_t >(*)(const K &inKey, T &input)
 
template<typename K , typename T , typename U >
using PmapIFunctionP = std::pair< U, size_t >(*)(const K &inKey, T &input)
 
template<typename K , typename T , typename L , typename U >
using ImapByKeyIFunctionP = std::pair< L, U >(*)(const K &inKey, std::vector< T * > &input)
 
template<typename K , typename T , typename U >
using mapByKeyIFunctionP = U(*)(const K &inKey, std::vector< T * > &input)
 
template<typename K , typename T , typename L , typename U >
using IPmapByKeyIFunctionP = std::tuple< L, U, size_t >(*)(const K &inKey, std::vector< T * > &input)
 
template<typename K , typename T , typename U >
using PmapByKeyIFunctionP = std::pair< U, size_t >(*)(const K &inKey, std::vector< T * > &input)
 
template<typename K , typename T , typename L , typename U >
using IbulkMapIFunctionP = void(*)(L *outKey, U *output, K *inKey, T *input, size_t size)
 
template<typename K , typename T , typename U >
using bulkMapIFunctionP = void(*)(U *output, K *inKey, T *input, size_t size)
 
template<typename K , typename T , typename L , typename U >
using IPbulkMapIFunctionP = void(*)(L *outKey, U *output, size_t *outputDataSizes, K *inKey, T *input, size_t size)
 
template<typename K , typename T , typename U >
using PbulkMapIFunctionP = void(*)(U *output, size_t *outputDataSizes, K *inKey, T *input, size_t size)
 
template<typename K , typename T , typename L , typename U >
using IflatMapIFunctionP = std::deque< std::pair< L, U >>(*)(K inKey, T &input)
 
template<typename K , typename T , typename U >
using flatMapIFunctionP = std::deque< U >(*)(K inKey, T &input)
 
template<typename K , typename T , typename L , typename U >
using IPflatMapIFunctionP = std::deque< std::tuple< L, U, size_t >>(*)(K inKey, T &input)
 
template<typename K , typename T , typename U >
using PflatMapIFunctionP = std::deque< std::pair< U, size_t >>(*)(K inKey, T &input)
 
template<typename K , typename T , typename L , typename U >
using IbulkFlatMapIFunctionP = void(*)(L *&outKey, U *&output, size_t &outputSize, K *inKey, T *input, size_t size)
 
template<typename K , typename T , typename U >
using bulkFlatMapIFunctionP = void(*)(U *&output, size_t &outputSize, K *inKey, T *input, size_t size)
 
template<typename K , typename T , typename L , typename U >
using IPbulkFlatMapIFunctionP = void(*)(L *&outKey, U *&output, size_t *&outputDataSizes, size_t &outputSize, K *inKey, T *input, size_t size)
 
template<typename K , typename T , typename U >
using PbulkFlatMapIFunctionP = void(*)(U *&output, size_t *&outputDataSizes, size_t &outputSize, K *inKey, T *input, size_t size)
 
template<typename K , typename T >
using IreduceIFunctionP = std::pair< K, T >(*)(const K &keyA, T &a, const K &keyB, T &b)
 
template<typename K , typename T >
using IreduceByKeyIFunctionP = std::pair< K, T >(*)(const K &keyA, T *a, size_t sizeA, const K &keyB, T *b, size_t sizeB)
 
template<typename K , typename T >
using IbulkReduceIFunctionP = std::pair< K, T >(*)(K *key, T *input, size_t size)
 
template<typename K , typename T , typename L , typename U >
using ImapIPFunctionP = std::pair< L, U >(*)(K inKey, T *input, size_t size)
 
template<typename K , typename T , typename U >
using mapIPFunctionP = U(*)(K inKey, T *input, size_t size)
 
template<typename K , typename T , typename L , typename U >
using IPmapIPFunctionP = std::tuple< L, U, size_t >(*)(K inKey, T *input, size_t size)
 
template<typename K , typename T , typename U >
using PmapIPFunctionP = std::pair< U, size_t >(*)(K inKey, T *input, size_t size)
 
template<typename K , typename T , typename L , typename U >
using ImapByKeyIPFunctionP = std::pair< L, U >(*)(const K &inKey, std::vector< std::pair< T *, size_t >>)
 
template<typename K , typename T , typename U >
using mapByKeyIPFunctionP = U(*)(const K &inKey, std::vector< std::pair< T *, size_t >>)
 
template<typename K , typename T , typename L , typename U >
using IPmapByKeyIPFunctionP = std::tuple< L, U, size_t >(*)(const K &inKey, std::vector< std::pair< T *, size_t >>)
 
template<typename K , typename T , typename U >
using PmapByKeyIPFunctionP = std::pair< U, size_t >(*)(const K &inKey, std::vector< std::pair< T *, size_t >>)
 
template<typename K , typename T , typename L , typename U >
using IbulkMapIPFunctionP = void(*)(L *outKey, U *output, K *inKey, T **input, size_t *inputDataSizes, size_t size)
 
template<typename K , typename T , typename U >
using bulkMapIPFunctionP = void(*)(U *output, K *inKey, T **input, size_t *inputDataSizes, size_t size)
 
template<typename K , typename T , typename L , typename U >
using IPbulkMapIPFunctionP = void(*)(L *outKey, U *output, size_t *outputDataSizes, K *inKey, T **input, size_t *inputDataSizes, size_t size)
 
template<typename K , typename T , typename U >
using PbulkMapIPFunctionP = void(*)(U *output, size_t *outputDataSizes, K *inKey, T **input, size_t *inputDataSizes, size_t size)
 
template<typename K , typename T , typename L , typename U >
using IflatMapIPFunctionP = std::deque< std::pair< L, U >>(*)(T *&input, size_t size)
 
template<typename K , typename T , typename U >
using flatMapIPFunctionP = std::deque< U >(*)(T *&input, size_t size)
 
template<typename K , typename T , typename L , typename U >
using IPflatMapIPFunctionP = std::deque< std::tuple< L, U, size_t >>(*)(T *&input, size_t size)
 
template<typename K , typename T , typename U >
using PflatMapIPFunctionP = std::deque< std::pair< U, size_t >>(*)(T *&input, size_t size)
 
template<typename K , typename T , typename L , typename U >
using IbulkFlatMapIPFunctionP = void(*)(L *&outKey, U *&output, size_t &outputSize, K *inKey, T **input, size_t *inputDataSizes, size_t size)
 
template<typename K , typename T , typename U >
using bulkFlatMapIPFunctionP = void(*)(U *&output, size_t &outputSize, K *inKey, T **input, size_t *inputDataSizes, size_t size)
 
template<typename K , typename T , typename L , typename U >
using IPbulkFlatMapIPFunctionP = void(*)(L *&outKey, U *&output, size_t *outputDataSizes, size_t &outputSize, K *inKey, T **input, size_t *inputDataSizes, size_t size)
 
template<typename K , typename T , typename U >
using PbulkFlatMapIPFunctionP = void(*)(U *&output, size_t *outputDataSizes, size_t &outputSize, K *inKey, T **input, size_t *inputDataSizes, size_t size)
 
template<typename K , typename T >
using IPreduceIPFunctionP = std::tuple< K, T *, size_t >(*)(K keyA, T *a, size_t sizeA, K keyB, T *b, size_t sizeB)
 
template<typename K , typename T >
using IPreduceByKeyIPFunctionP = std::tuple< K, T *, size_t >(*)(K keyA, T **a, size_t *dataSizesA, size_t sizeA, K keyB, T **b, size_t *dataSizesB, size_t sizeB)
 
template<typename K , typename T >
using IPbulkReduceIPFunctionP = std::tuple< K, T *, size_t >(*)(K *key, T **input, size_t *inputDataSizes, size_t size)
 
template<typename K >
using updateByKeyG2FunctionP = void(*)(const K &key, std::vector< void * > &a, std::vector< void * > &b)
 
template<typename K >
using updateByKeyG3FunctionP = void(*)(const K &key, std::vector< void * > &a, std::vector< void * > &b, std::vector< void * > &c)
 
template<typename K >
using bulkUpdateG2FunctionP = void(*)(K *keyA, void *a, size_t na, K *keyB, void *b, size_t nb)
 
template<typename K >
using bulkUpdateG3FunctionP = void(*)(K *keyA, void *a, size_t na, K *keyB, void *b, size_t nb, K *keyC, void *c, size_t nc)
 
template<typename K , typename To >
using mapByKeyG2FunctionP = To(*)(const K &key, std::vector< void * > &a, std::vector< void * > &b)
 
template<typename K , typename To >
using mapByKeyG3FunctionP = To(*)(const K &key, std::vector< void * > &a, std::vector< void * > &b, std::vector< void * > &c)
 
template<typename K , typename Ko , typename To >
using ImapByKeyG2FunctionP = std::pair< Ko, To >(*)(const K &key, std::vector< void * > &a, std::vector< void * > &b)
 
template<typename K , typename Ko , typename To >
using ImapByKeyG3FunctionP = std::pair< Ko, To >(*)(const K &key, std::vector< void * > &a, std::vector< void * > &b, std::vector< void * > &c)
 
template<typename K , typename To >
using flatMapByKeyG2FunctionP = std::deque< To >(*)(const K &key, std::vector< void * > &a, std::vector< void * > &b)
 
template<typename K , typename To >
using flatMapByKeyG3FunctionP = std::deque< To >(*)(const K &key, std::vector< void * > &a, std::vector< void * > &b, std::vector< void * > &c)
 
template<typename K , typename Ko , typename To >
using IflatMapByKeyG2FunctionP = std::deque< std::pair< Ko, To >>(*)(const K &key, std::vector< void * > &a, std::vector< void * > &b)
 
template<typename K , typename Ko , typename To >
using IflatMapByKeyG3FunctionP = std::deque< std::pair< Ko, To >>(*)(const K &key, std::vector< void * > &a, std::vector< void * > &b, std::vector< void * > &c)
 
template<typename K , typename To >
using bulkFlatMapG2FunctionP = std::deque< To >(*)(K *keyA, void *a, size_t na, K *keyB, void *b, size_t nb)
 
template<typename K , typename To >
using bulkFlatMapG3FunctionP = std::deque< To >(*)(K *keyA, void *a, size_t na, K *keyB, void *b, size_t nb, K *keyC, void *c, size_t nc)
 
template<typename K , typename Ko , typename To >
using IbulkFlatMapG2FunctionP = std::deque< std::pair< Ko, To >>(*)(K *keyA, void *a, size_t na, K *keyB, void *b, size_t nb)
 
template<typename K , typename Ko , typename To >
using IbulkFlatMapG3FunctionP = std::deque< std::pair< Ko, To >>(*)(K *keyA, void *a, size_t na, K *keyB, void *b, size_t nb, K *keyC, void *c, size_t nc)
 
Partition function definitions
template<typename T >
using onlineFullPartFuncP = int(*)(T &input)
 
template<typename K , typename T >
using IonlineFullPartFuncP = int(*)(K &key, T &input)
 

Enumerations

enum  dFuncName : char {
  NewWorkerDL = 0x01, NewWorkerSDL = 0x02, DiscardWorkerDL = 0x03, GetTypeDL = 0x04,
  GetKeyTypeDL = 0x05, SetDataDL = 0x06, SetDataRawDL = 0x07, GetLineSizesDL = 0x08,
  GetFddItemDL = 0x09, GetKeysDL = 0x0a, GetDataDL = 0x0b, GetSizeDL = 0x0c,
  ItemSizeDL = 0x0d, BaseSizeDL = 0x0e, SetSizeDL = 0x0f, DeleteItemDL = 0x10,
  ShrinkDL = 0x11, InsertDL = 0x12, InsertListDL = 0x13, PreapplyDL = 0x14,
  CollectDL = 0x15, GroupByKeyDL = 0x16, CountByKeyDL = 0x17, ExchangeDataByKeyDL = 0x18,
  GetKeyLocationDL = 0x19, GetUKeysDL = 0x1a, SetUKeysDL = 0x1b, GetKeyMapDL = 0x1c,
  SetKeyMapDL = 0x1d, WriteToFileDL = 0x1e
}
 
enum  commMode { Local, Mesos }
 
enum  msgTag : int {
  MSG_TASK, MSG_CREATEFDD, MSG_CREATEIFDD, MSG_CREATEGFDD,
  MSG_DISCARDFDD, MSG_FDDSETDATAID, MSG_FDDSETDATA, MSG_FDDSET2DDATAID,
  MSG_FDDSET2DDATASIZES, MSG_FDDSET2DDATA, MSG_READFDDFILE, MSG_WRITEFDDFILE,
  MSG_FILENAME, MSG_COLLECT, MSG_FDDDATAID, MSG_FDDDATA,
  MSG_TASKRESULT, MSG_FDDINFO, MSG_FDDSETIDATAID, MSG_FDDSETIDATA,
  MSG_FDDSETIKEYS, MSG_FDDSET2DIDATAID, MSG_FDDSET2DIDATASIZES, MSG_FDDSET2DIDATA,
  MSG_FDDSET2DIKEYS, MSG_KEYOWNERSHIPSUGEST, MSG_MYKEYOWNERSHIP, MSG_MYKEYCOUNT,
  MSG_IFDDDATAID, MSG_IFDDDATAKEYS, MSG_IFDDDATA, MSG_COLLECTDATA,
  MSG_KEYMAP, MSG_DISTKEYMAP, MSG_GROUPBYKEYDATA, MSG_FINISH
}
 
enum  fileMode : int { R = O_RDONLY, W = O_WRONLY, CR = O_RDONLY | O_CREAT, CW = O_WRONLY | O_CREAT }
 

Functions

procstat getProcStat ()
 
fddType decodeType (size_t typeCode)
 
const std::string decodeOptype (fddOpType op)
 
const std::string decodeOptypeAb (fddOpType op)
 
template<typename T >
double mean (std::vector< T > v)
 
template<typename T >
double max (std::vector< T > v)
 
template<typename T >
double sum (std::vector< T > v)
 
template<typename T >
double stdDev (std::vector< T > v, double mean)
 
workerFddBasenewWorkerSDL (unsigned long int id, fddType type, size_t size)
 
void discardWorkerDL (workerFddBase *fdd)
 
fddType getTypeDL (workerFddBase *fdd)
 
fddType getKeyTypeDL (workerFddBase *fdd)
 
void setDataDL (workerFddBase *fdd, void *keys, void *data, size_t *lineSizes, size_t size)
 
void setDataRawDL (workerFddBase *fdd, void *keys, void *data, size_t *lineSizes, size_t size)
 
size_t * getLineSizesDL (workerFddBase *fdd)
 
void * getFddItemDL (workerFddBase *fdd, size_t address)
 
void * getKeysDL (workerFddBase *fdd)
 
void * getDataDL (workerFddBase *fdd)
 
size_t getSizeDL (workerFddBase *fdd)
 
size_t itemSizeDL (workerFddBase *fdd)
 
size_t baseSizeDL (workerFddBase *fdd)
 
void setSizeDL (workerFddBase *fdd, size_t s)
 
void deleteItemDL (workerFddBase *fdd, void *item)
 
void shrinkDL (workerFddBase *fdd)
 
void insertDL (workerFddBase *fdd, void *k, void *v, size_t s)
 
void insertListDL (workerFddBase *fdd, void *v)
 
void preapplyDL (workerFddBase *fdd, unsigned long int id, void *func, fddOpType op, workerFddBase *dest, fastComm *comm)
 
void collectDL (workerFddBase *fdd, fastComm *comm)
 
void exchangeDataByKeyDL (workerFddBase *fdd, fastComm *comm)
 
void * getKeyLocationsDL (workerFddBase *fdd)
 
void * getUKeysDL (workerFddBase *fdd)
 
void setUKeysDL (workerFddBase *fdd, void *uk)
 
void * getKeyMapDL (workerFddBase *fdd)
 
void setKeyMapDL (workerFddBase *fdd, void *km)
 
void writeToFileDL (workerFddBase *fdd, void *path, size_t procId, void *sufix)
 

Variables

const int BUFFER_INITIAL_SIZE = 512*1024
 

Classes

class  _workerFdd
 
class  _workerFdd< T * >
 
class  _workerIFdd
 
class  _workerIFdd< K, T * >
 
class  fastComm
 
class  fastCommBuffer
 
class  fastContext
 Framework context class. More...
 
class  fastScheduler
 
class  fastSettings
 Context Configuration Class. More...
 
class  fastTask
 
class  fdd
 Fast Distributted Dataset(FDD) is like a cluster distributted Array. This class is the user side implementation. More...
 
class  fdd< T * >
 
class  fddBase
 
class  fddCore
 core class that implements simple operations. More...
 
class  fddStorage
 
class  fddStorage< T * >
 
class  fddStorageBase
 
class  fddStorageCore
 
class  groupedFdd
 
class  hasher
 
class  hasher< double >
 
class  hasher< float >
 
class  hasher< std::string >
 
class  hdfsEngine
 
class  hdfsFile
 
class  iFddCore
 
class  indexedFdd
 
class  indexedFdd< K, T * >
 
class  indexedFddStorage
 
class  indexedFddStorage< K, T * >
 
class  indexedFddStorageCore
 
class  procstat
 
class  worker
 
class  workerFdd
 
class  workerFddBase
 
class  workerFddCore
 
class  workerFddGroup
 
class  workerIFdd
 
class  workerIFddCore