18 #ifndef PDB_CLIENT_TEMPLATE_CC
19 #define PDB_CLIENT_TEMPLATE_CC
25 template <
class DataType>
27 const std::string &setName,
size_t pageSize) {
36 cout <<
"Created set.\n";
41 template <
class DataType>
43 const std::string &setName) {
52 cout <<
"Created set.\n";
57 template <
class DataType>
61 bool result =
dispatcherClient->sendData<DataType>(setAndDatabase, dataToSend,
68 cout <<
"Data sent.\n";
73 template <
class DataType>
88 cout <<
"Bytes sent.\n";
93 template <
class... Types>
106 template <
class Type>
108 std::string setName) {
110 return queryClient->getSetIterator<Type>(databaseName, setName);
113 template <
class KeyClass,
class ValueClass>
115 std::pair<std::string, std::string> outputSet,
118 std::shared_ptr<Partitioner<KeyClass, ValueClass>> myPartitioner
119 = std::make_shared<Partitioner<KeyClass, ValueClass>>(inputSet, outputSet);
124 template <
class KeyClass,
class ValueClass>
126 std::pair<std::string, std::string> outputSet,
129 std::shared_ptr<Partitioner<KeyClass, ValueClass>> myPartitioner
130 = std::make_shared<Partitioner<KeyClass, ValueClass>>(inputSet, outputSet);
131 return myPartitioner->partitionWithTransformation(
errorMsg, this->
queryClient, partitionComp);
bool sendData(std::pair< std::string, std::string > setAndDatabase, Handle< Vector< Handle< DataType >>> dataToSend)
bool sendBytes(std::pair< std::string, std::string > setAndDatabase, char *bytes, size_t numBytes)
std::shared_ptr< pdb::DistributedStorageManagerClient > distributedStorageClient
std::shared_ptr< pdb::DispatcherClient > dispatcherClient
SetIterator< Type > getSetIterator(std::string databaseName, std::string setName)
bool partitionAndTransformSet(std::pair< std::string, std::string > inputSet, std::pair< std::string, std::string > outputSet, Handle< PartitionTransformationComp< KeyClass, ValueClass >> partitionComp)
bool createSet(const std::string &databaseName, const std::string &setName, const std::string &typeName)
std::shared_ptr< pdb::QueryClient > queryClient
bool executeComputations(Handle< Computation > firstParam, Handle< Types >...args)
#define DEFAULT_PAGE_SIZE
bool partitionSet(std::pair< std::string, std::string > inputSet, std::pair< std::string, std::string > outputSet, Handle< PartitionComp< KeyClass, ValueClass >> partitionComp)