18 #ifndef QUERY_SCHEDULER_SERVER_H
19 #define QUERY_SCHEDULER_SERVER_H
90 std::shared_ptr<StatisticsDB> statisticsDB,
128 time_t currentTime = time(
nullptr);
129 struct tm* local = localtime(¤tTime);
130 this->
jobId =
"Job-" + std::to_string(local->tm_year + 1900) +
"_" +
131 std::to_string(local->tm_mon + 1) +
"_" + std::to_string(local->tm_mday) +
"_" +
132 std::to_string(local->tm_hour) +
"_" + std::to_string(local->tm_min) +
"_" +
std::shared_ptr< Statistics > StatisticsPtr
void scheduleStages(std::vector< Handle< AbstractJobStage >> &stagesToSchedule, std::shared_ptr< ShuffleInfo > shuffleInfo)
Handle< TupleSetJobStage > getStageToSend(unsigned long index, Handle< TupleSetJobStage > &stage)
std::shared_ptr< PhysicalOptimizer > physicalOptimizerPtr
pthread_mutex_t connection_mutex
void removeUnusedIntermediateSets(DistributedStorageManagerClient &dsmClient, vector< Handle< SetIdentifier >> &intermediateSets)
std::vector< StandardResourceInfoPtr > * standardResources
std::shared_ptr< ShuffleInfo > shuffleInfo
pair< bool, basic_string< char > > executeComputation(Handle< ExecuteComputation > &request, PDBCommunicatorPtr &sendUsingMe)
pair< bool, basic_string< char > > registerReplica(Handle< RegisterReplica > &request, PDBCommunicatorPtr &sendUsingMe)
void extractPipelineStages(int &jobStageId, vector< Handle< AbstractJobStage >> &jobStages, vector< Handle< SetIdentifier >> &intermediateSets)
std::string getNextJobId()
std::shared_ptr< PDBCommunicator > PDBCommunicatorPtr
bool scheduleStage(unsigned long node, Handle< T > &stage, PDBCommunicatorPtr communicator)
std::vector< Handle< SetIdentifier > > interGlobalSets
void registerHandlers(PDBServer &forMe) override
shared_ptr< PDBBuzzer > PDBBuzzerPtr
shared_ptr< Configuration > ConfigurationPtr
PDBCommunicatorPtr getCommunicatorToNode(int port, std::string &ip)
QuerySchedulerServer(PDBLoggerPtr logger, ConfigurationPtr conf, std::shared_ptr< StatisticsDB > statisticsDB, bool pseudoClusterMode=false, double partitionToCoreRatio=0.75)
void requestStatistics(PDBCommunicatorPtr &communicator, bool &success, string &errMsg) const
unsigned int getNextSequenceID()
void prepareAndScheduleStage(Handle< AbstractJobStage > &stage, unsigned long node, int &counter, PDBBuzzerPtr &callerBuzzer)
void createIntermediateSets(DistributedStorageManagerClient &dsmClient, vector< Handle< SetIdentifier >> &intermediateSets)
std::shared_ptr< PDBLogger > PDBLoggerPtr
void collectStatsForNode(int node, int &counter, PDBBuzzerPtr &callerBuzzer)
void initializeForPseudoClusterMode()
std::shared_ptr< StatisticsDB > statisticsDB
void initializeForServerMode()
void removeIntermediateSets(DistributedStorageManagerClient &dsmClient)
StatisticsPtr statsForOptimization
double partitionToCoreRatio
void updateStats(Handle< SetIdentifier > setToUpdateStats)