hobbes
a language, embedded compiler, and runtime for efficient dynamic expression evaluation, data storage and analysis
Classes | Typedefs | Functions | Variables
hog Namespace Reference

Classes

struct  BatchSendSession
 
struct  buffer
 
struct  gzbuffer
 
struct  RunMode
 
struct  Session
 

Typedefs

typedef std::function< void(hobbes::storage::Transaction &)> ProcessTxnF
 

Functions

void read (gzbuffer *in, uint8_t *b, size_t n)
 
void read (gzbuffer *in, uint32_t *n)
 
void read (gzbuffer *in, uint64_t *n)
 
void read (gzbuffer *in, std::string *x)
 
void read (gzbuffer *in, std::vector< uint8_t > *x)
 
void read (gzbuffer *in, storage::statements *stmts)
 
void runRecvConnection (int c, std::string dir)
 
void runRecvServer (int socket, std::string dir)
 
std::thread pullRemoteDataT (const std::string &dir, const std::string &listenport)
 
bool pullRemoteData (const std::string &dir, const std::string &listenport)
 
void sendFileContents (int connection, int sfd)
 
void sendSegmentFiles (int connection, const std::string &localdir)
 
void sendInitMessage (int connection, const std::string &groupName, const std::string &localdir)
 
void runConnectedSegmentSendingProcess (int connection, const std::string &groupName, const std::string &localdir)
 
void runSegmentSendingProcess (std::string groupName, std::string hostport, std::string localdir)
 
std::string segmentFileName (uint32_t seg)
 
void write (BatchSendSession *s, const uint8_t *d, size_t sz)
 
void write (BatchSendSession *s, const std::string &x)
 
void write (BatchSendSession *s, const std::vector< uint8_t > &x)
 
template<typename T >
void write (BatchSendSession *s, T x)
 
static void initNetSession (BatchSendSession *s, const std::string &groupName, const std::string &dir, storage::PipeQOS qos, storage::CommitMethod cm, const storage::statements &stmts)
 
void pushLocalData (const storage::QueueConnection &qc, const std::string &groupName, const std::string &dir, size_t clevel, size_t batchsendsize, long batchsendtime, const std::string &sendto)
 
void compileBootCode (hobbes::cc &ctx)
 
void recordLocalData (const hobbes::storage::QueueConnection &qc, const std::string &dir)
 
std::ostream & operator<< (std::ostream &o, const std::set< std::string > &xs)
 
std::ostream & operator<< (std::ostream &o, const RunMode &m)
 
size_t sizeInBytes (const std::string &s)
 
void showUsage ()
 
RunMode config (int argc, const char **argv)
 
std::string instantiateDir (const std::string &groupName, const std::string &dir)
 
void evalGroupHostConnection (const std::string &groupName, const RunMode &m, std::vector< std::thread > *ts, int c)
 
void runGroupHost (const std::string &groupName, const RunMode &m, std::vector< std::thread > *ts)
 
void run (const RunMode &m)
 
void ssend (int c, const uint8_t *d, size_t dsz)
 
void ssend (int c, const std::string &s)
 
void srecv (int c, uint8_t *d, size_t dsz)
 
void srecv (int c, std::vector< uint8_t > *d)
 
void srecv (int c, std::string *s)
 
size_t uptoPow2 (size_t x)
 
void srecv (int c, buffer *b)
 
bool hstoreCanRead (storage::Transaction &txn, size_t n)
 
const uint8_t * hstoreUnsafeRead (storage::Transaction &txn, size_t n)
 
const uint8_t * hstoreUnsafeReadFixedArray (storage::Transaction &txn, size_t bytes, size_t asIfLen)
 
ccloggerCompiler ()
 
 DEFINE_STRUCT (Stmt,(strref, name),(size_t, flags),(strref, display),(strref, file),(size_t, line))
 
std::string ensureDirExists (const std::string &dirPfx)
 
std::string freshTempFile (const std::string &dirPfx)
 
ProcessTxnF initStorageSession (Session *s, const std::string &dirPfx, storage::PipeQOS qos, storage::CommitMethod cm, const storage::statements &stmts)
 

Variables

unsigned char ___bootdata []
 
unsigned int ___bootdata_len = 6973
 

Typedef Documentation

◆ ProcessTxnF

typedef std::function<void(hobbes::storage::Transaction&)> hog::ProcessTxnF

Function Documentation

◆ compileBootCode()

void hog::compileBootCode ( hobbes::cc ctx)

◆ config()

RunMode hog::config ( int  argc,
const char **  argv 
)

◆ DEFINE_STRUCT()

hog::DEFINE_STRUCT ( Stmt  ,
(strref, name)  ,
(size_t, flags)  ,
(strref, display)  ,
(strref, file)  ,
(size_t, line)   
)

◆ ensureDirExists()

std::string hog::ensureDirExists ( const std::string &  dirPfx)

◆ evalGroupHostConnection()

void hog::evalGroupHostConnection ( const std::string &  groupName,
const RunMode m,
std::vector< std::thread > *  ts,
int  c 
)

◆ freshTempFile()

std::string hog::freshTempFile ( const std::string &  dirPfx)

◆ hstoreCanRead()

bool hog::hstoreCanRead ( storage::Transaction txn,
size_t  n 
)

◆ hstoreUnsafeRead()

const uint8_t* hog::hstoreUnsafeRead ( storage::Transaction txn,
size_t  n 
)

◆ hstoreUnsafeReadFixedArray()

const uint8_t* hog::hstoreUnsafeReadFixedArray ( storage::Transaction txn,
size_t  bytes,
size_t  asIfLen 
)

◆ initNetSession()

static void hog::initNetSession ( BatchSendSession s,
const std::string &  groupName,
const std::string &  dir,
storage::PipeQOS  qos,
storage::CommitMethod  cm,
const storage::statements stmts 
)
static

◆ initStorageSession()

ProcessTxnF hog::initStorageSession ( Session s,
const std::string &  dirPfx,
storage::PipeQOS  qos,
storage::CommitMethod  cm,
const storage::statements stmts 
)

◆ instantiateDir()

std::string hog::instantiateDir ( const std::string &  groupName,
const std::string &  dir 
)

◆ loggerCompiler()

cc* hog::loggerCompiler ( )

◆ operator<<() [1/2]

std::ostream& hog::operator<< ( std::ostream &  o,
const std::set< std::string > &  xs 
)

◆ operator<<() [2/2]

std::ostream& hog::operator<< ( std::ostream &  o,
const RunMode m 
)

◆ pullRemoteData()

bool hog::pullRemoteData ( const std::string &  dir,
const std::string &  listenport 
)

◆ pullRemoteDataT()

std::thread hog::pullRemoteDataT ( const std::string &  dir,
const std::string &  listenport 
)

◆ pushLocalData()

void hog::pushLocalData ( const storage::QueueConnection qc,
const std::string &  groupName,
const std::string &  dir,
size_t  clevel,
size_t  batchsendsize,
long  batchsendtime,
const std::string &  sendto 
)

◆ read() [1/6]

void hog::read ( gzbuffer in,
uint8_t *  b,
size_t  n 
)

◆ read() [2/6]

void hog::read ( gzbuffer in,
uint32_t *  n 
)

◆ read() [3/6]

void hog::read ( gzbuffer in,
uint64_t *  n 
)

◆ read() [4/6]

void hog::read ( gzbuffer in,
std::string *  x 
)

◆ read() [5/6]

void hog::read ( gzbuffer in,
std::vector< uint8_t > *  x 
)

◆ read() [6/6]

void hog::read ( gzbuffer in,
storage::statements stmts 
)

◆ recordLocalData()

void hog::recordLocalData ( const hobbes::storage::QueueConnection qc,
const std::string &  dir 
)

◆ run()

void hog::run ( const RunMode m)

◆ runConnectedSegmentSendingProcess()

void hog::runConnectedSegmentSendingProcess ( int  connection,
const std::string &  groupName,
const std::string &  localdir 
)

◆ runGroupHost()

void hog::runGroupHost ( const std::string &  groupName,
const RunMode m,
std::vector< std::thread > *  ts 
)

◆ runRecvConnection()

void hog::runRecvConnection ( int  c,
std::string  dir 
)

◆ runRecvServer()

void hog::runRecvServer ( int  socket,
std::string  dir 
)

◆ runSegmentSendingProcess()

void hog::runSegmentSendingProcess ( std::string  groupName,
std::string  hostport,
std::string  localdir 
)

◆ segmentFileName()

std::string hog::segmentFileName ( uint32_t  seg)

◆ sendFileContents()

void hog::sendFileContents ( int  connection,
int  sfd 
)

◆ sendInitMessage()

void hog::sendInitMessage ( int  connection,
const std::string &  groupName,
const std::string &  localdir 
)

◆ sendSegmentFiles()

void hog::sendSegmentFiles ( int  connection,
const std::string &  localdir 
)

◆ showUsage()

void hog::showUsage ( )

◆ sizeInBytes()

size_t hog::sizeInBytes ( const std::string &  s)

◆ srecv() [1/4]

void hog::srecv ( int  c,
uint8_t *  d,
size_t  dsz 
)
inline

◆ srecv() [2/4]

void hog::srecv ( int  c,
std::vector< uint8_t > *  d 
)
inline

◆ srecv() [3/4]

void hog::srecv ( int  c,
std::string *  s 
)
inline

◆ srecv() [4/4]

void hog::srecv ( int  c,
buffer b 
)
inline

◆ ssend() [1/2]

void hog::ssend ( int  c,
const uint8_t *  d,
size_t  dsz 
)
inline

◆ ssend() [2/2]

void hog::ssend ( int  c,
const std::string &  s 
)
inline

◆ uptoPow2()

size_t hog::uptoPow2 ( size_t  x)
inline

◆ write() [1/4]

void hog::write ( BatchSendSession s,
const uint8_t *  d,
size_t  sz 
)

◆ write() [2/4]

void hog::write ( BatchSendSession s,
const std::string &  x 
)

◆ write() [3/4]

void hog::write ( BatchSendSession s,
const std::vector< uint8_t > &  x 
)

◆ write() [4/4]

template<typename T >
void hog::write ( BatchSendSession s,
x 
)

Variable Documentation

◆ ___bootdata

unsigned char hog::___bootdata[]

◆ ___bootdata_len

unsigned int hog::___bootdata_len = 6973