Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
88 commits
Select commit Hold shift + click to select a range
ae6aee6
Added sheep partitioning
Gayan-Kaushalya Jan 29, 2026
32c4600
minor change
Gayan-Kaushalya Jan 29, 2026
368d49c
metadb update
Gayan-Kaushalya Jan 29, 2026
588781b
Changed output to pgrnk compatible format
Gayan-Kaushalya Jan 30, 2026
7863144
Flatbuffers
Gayan-Kaushalya Jan 30, 2026
d2f75e4
MInor change
Gayan-Kaushalya Feb 6, 2026
61334f2
Trying to speed up partition file sending to workers
Gayan-Kaushalya Feb 7, 2026
b23c3da
Trying to make partition file uploading to workers efficient
Gayan-Kaushalya Feb 14, 2026
e8e9657
Traingle counting made efficient
Gayan-Kaushalya Feb 14, 2026
cf8bd96
shtrian implemented
Gayan-Kaushalya Feb 14, 2026
16af900
shtrian implemented
Gayan-Kaushalya Feb 15, 2026
b5fca5b
shtrian logic separated
Gayan-Kaushalya Feb 15, 2026
637eaad
Minor changes
Gayan-Kaushalya Feb 16, 2026
4c79082
Minor change
Gayan-Kaushalya Feb 16, 2026
216ccdb
minor change
Gayan-Kaushalya Feb 16, 2026
ef1cc6a
minor change
Gayan-Kaushalya Feb 16, 2026
b806b5d
shtrian response not showing in frontend solved
Gayan-Kaushalya Feb 17, 2026
ee4ce5b
Minor change
Gayan-Kaushalya Feb 17, 2026
c8079bb
Minor change
Gayan-Kaushalya Apr 27, 2026
19e3bba
Try to fix the errors
Gayan-Kaushalya May 10, 2026
0144697
Split shtrian from trian
Gayan-Kaushalya May 10, 2026
689f4d0
Minor change
Gayan-Kaushalya May 10, 2026
f098311
Merge branch 'master' into sheep
Gayan-Kaushalya May 10, 2026
46d6b37
Merge branch 'master' into sheep
Gayan-Kaushalya May 10, 2026
49aa69a
Removing duplicate code
Gayan-Kaushalya May 10, 2026
a78befc
Build issue fix
Gayan-Kaushalya May 10, 2026
2a2e833
Minor change
Gayan-Kaushalya May 10, 2026
7be4a8d
Reduce duplicate code
Gayan-Kaushalya May 10, 2026
d5d55dd
MInor change
Gayan-Kaushalya May 10, 2026
006bb2e
Minor change
Gayan-Kaushalya May 10, 2026
470f686
Minor change
Gayan-Kaushalya May 11, 2026
01c9455
Minor change
Gayan-Kaushalya May 11, 2026
6e043bf
Minor change
Gayan-Kaushalya May 11, 2026
a03aa6a
Minor change
Gayan-Kaushalya May 11, 2026
8f48f5b
Minor change
Gayan-Kaushalya May 11, 2026
84b5b6c
Style issues fixed
Gayan-Kaushalya May 11, 2026
d5e4563
Spelling mistake fixed
Gayan-Kaushalya May 11, 2026
d25804c
Style issue fix
Gayan-Kaushalya May 11, 2026
c9b1c5b
Minor change
Gayan-Kaushalya May 11, 2026
c908362
Changed year to 2026
Gayan-Kaushalya May 11, 2026
61fb0d4
Merge branch 'master' into sheep
Gayan-Kaushalya May 13, 2026
c854837
Edited Utils.cpp
Gayan-Kaushalya May 13, 2026
bc8fc68
Merge branch 'sheep' of https://github.com/Gayan-Kaushalya/jasminegra…
Gayan-Kaushalya May 13, 2026
7fa4246
Minor change
Gayan-Kaushalya May 13, 2026
b94921c
MInor change
Gayan-Kaushalya May 14, 2026
287a8ae
Style issue fixed
Gayan-Kaushalya May 14, 2026
1762c76
Minor change
Gayan-Kaushalya May 14, 2026
81f8daf
Minor change
Gayan-Kaushalya May 16, 2026
da9a307
Minor changes
Gayan-Kaushalya May 17, 2026
9d47a2f
Fixed issues in JasmineGraphFrontEnd.cpp
Gayan-Kaushalya May 17, 2026
656fd79
Build error fixed
Gayan-Kaushalya May 17, 2026
9729426
Minor changes
Gayan-Kaushalya May 17, 2026
e7bd6d0
Merge branch 'master' into sheep
Gayan-Kaushalya May 17, 2026
0287b60
Minor changes
Gayan-Kaushalya May 17, 2026
50c0902
Minor change
Gayan-Kaushalya May 17, 2026
fc5e391
Minor change
Gayan-Kaushalya May 17, 2026
de810c1
Minor change
Gayan-Kaushalya May 17, 2026
caa1f5b
Reduce cognitive complexity of functions
Gayan-Kaushalya May 17, 2026
75eb3e8
Using transparent comparator "std::less<>"
Gayan-Kaushalya May 17, 2026
af5a549
Using transparent comparator "std::less<>"
Gayan-Kaushalya May 17, 2026
f96f8b3
Minor changes
Gayan-Kaushalya May 17, 2026
934ded8
MInor changes
Gayan-Kaushalya May 17, 2026
4bccbac
Applied SonarQube suggestions
Gayan-Kaushalya May 17, 2026
f718f40
Changed JasmineGraphFrontEndUI.cpp
Gayan-Kaushalya May 17, 2026
5266ad1
Edited JasmineGraphInstanceService.cpp
Gayan-Kaushalya May 17, 2026
8635ba2
Changed multiple files
Gayan-Kaushalya May 17, 2026
a7a5932
Minor changes
Gayan-Kaushalya May 17, 2026
2fac8bc
Changed multiple files
Gayan-Kaushalya May 17, 2026
40ab439
Addressed SonarQube changes
Gayan-Kaushalya May 17, 2026
9822cd2
Final changes
Gayan-Kaushalya May 17, 2026
2b959bd
Merge branch 'master' into sheep
Gayan-Kaushalya May 19, 2026
cc90941
Cypher problem fix
Gayan-Kaushalya Jun 10, 2026
10802ab
Merge branch 'master' of https://github.com/Gayan-Kaushalya/jasminegraph
Gayan-Kaushalya Jun 23, 2026
4ffa7cd
Merge branch 'master' into sheep
Gayan-Kaushalya Jun 23, 2026
5150dcf
Solved merge conflict
Gayan-Kaushalya Jun 23, 2026
ffa7c63
Fixed build issues
Gayan-Kaushalya Jun 23, 2026
a5a627d
Build error fixed
Gayan-Kaushalya Jun 23, 2026
2204c47
Build issues fixed
Gayan-Kaushalya Jun 23, 2026
f704a27
Build issue fixed
Gayan-Kaushalya Jun 23, 2026
0617420
Fixed style issues
Gayan-Kaushalya Jun 24, 2026
cb8e1ff
Removed unused variables
Gayan-Kaushalya Jun 24, 2026
8089608
Fixed build isuues
Gayan-Kaushalya Jun 24, 2026
4a2d817
Added a new helper function
Gayan-Kaushalya Jun 24, 2026
e02268d
Mkaing global variables const
Gayan-Kaushalya Jun 25, 2026
716061e
Fixed timeout issue
Gayan-Kaushalya Jun 25, 2026
88cc010
Edited Utils.cpp
Gayan-Kaushalya Jun 25, 2026
988f52a
Addresses sonarqube comments
Gayan-Kaushalya Jun 25, 2026
5b86632
Changed the std::unique_lock initialization
Gayan-Kaushalya Jun 25, 2026
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
5 changes: 5 additions & 0 deletions CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -28,6 +28,7 @@ set(HEADERS globals.h
src/frontend/core/executor/AbstractExecutor.h
src/frontend/core/executor/impl/TriangleCountExecutor.h
src/frontend/core/executor/impl/StreamingTriangleCountExecutor.h
src/frontend/core/executor/impl/SheepTriangleCountExecutor.h
src/frontend/core/factory/ExecutorFactory.h
src/frontend/core/scheduler/JobScheduler.h
src/knowledgegraph/construction/Pipeline.h
Expand All @@ -39,6 +40,7 @@ set(HEADERS globals.h
src/ml/trainer/JasmineGraphTrainingSchedular.h
src/partitioner/local/JSONParser.h
src/partitioner/local/MetisPartitioner.h
src/partitioner/local/SheepPartitioner.h
src/partitioner/local/RDFParser.h
src/partitioner/local/RDFPartitioner.h
src/partitioner/stream/Partition.h
Expand Down Expand Up @@ -140,6 +142,7 @@ set(SOURCES src/backend/JasmineGraphBackend.cpp
src/frontend/core/executor/AbstractExecutor.cpp
src/frontend/core/executor/impl/TriangleCountExecutor.cpp
src/frontend/core/executor/impl/StreamingTriangleCountExecutor.cpp
src/frontend/core/executor/impl/SheepTriangleCountExecutor.cpp
src/frontend/core/factory/ExecutorFactory.cpp
src/frontend/core/scheduler/JobScheduler.cpp
src/knowledgegraph/construction/Pipeline.cpp
Expand All @@ -151,6 +154,7 @@ set(SOURCES src/backend/JasmineGraphBackend.cpp
src/ml/trainer/JasmineGraphTrainingSchedular.cpp
src/partitioner/local/JSONParser.cpp
src/partitioner/local/MetisPartitioner.cpp
src/partitioner/local/SheepPartitioner.cpp
src/partitioner/local/RDFParser.cpp
src/partitioner/local/RDFPartitioner.cpp
src/partitioner/stream/Partition.cpp
Expand All @@ -161,6 +165,7 @@ set(SOURCES src/backend/JasmineGraphBackend.cpp
src/query/algorithms/linkprediction/JasminGraphLinkPredictor.cpp
src/query/algorithms/triangles/Triangles.cpp
src/query/algorithms/triangles/StreamingTriangles.cpp
src/query/algorithms/triangles/SheepTriangles.cpp
src/query/processor/cypher/astbuilder/ASTBuilder.cpp
src/query/processor/cypher/astbuilder/ASTInternalNode.cpp
src/query/processor/cypher/astbuilder/ASTLeafNoValue.cpp
Expand Down
213 changes: 208 additions & 5 deletions src/frontend/JasmineGraphFrontEnd.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -38,6 +38,7 @@
#include "../nativestore/RelationBlock.h"
#include "../partitioner/local/JSONParser.h"
#include "../partitioner/local/MetisPartitioner.h"
#include "../partitioner/local/SheepPartitioner.h"
#include "../partitioner/local/RDFParser.h"
#include "../partitioner/local/RDFPartitioner.h"
#include "../partitioner/stream/Partitioner.h"
Expand Down Expand Up @@ -161,6 +162,10 @@
static void start_remote_worker_command(int connFd, bool *loop_exit_p);
static void sla_command(int connFd, SQLiteDBInterface *sqlite, PerformanceSQLiteDBInterface *perfSqlite,
bool *loop_exit_p);
static void sheep_command(const std::string& masterIP, int connFd, SQLiteDBInterface *sqlite, bool *loop_exit_p);
static void sheep_triangles_command(const std::string& masterIP, int conn_fd, SQLiteDBInterface *sqlite,
PerformanceSQLiteDBInterface *perfSqlite,
JobScheduler *jobScheduler, bool *loop_exit_p);
std::map<int, std::shared_ptr<::KGConstructionRate>> JasmineGraphFrontEnd::kgConstructionRates = {};
static vector<DataPublisher*> getWorkerClients(SQLiteDBInterface* sqlite) {
const vector<Utils::worker>& workerList = Utils::getWorkerList(sqlite);
Expand Down Expand Up @@ -284,7 +289,7 @@
JasmineGraphFrontEnd::constructKGStreamLocalTXTCommand(masterIP, connFd, numberOfPartitions, sqlite,
&loop_exit);
} else if (line.compare(STOP_CONSTRUCT_KG) == 0) {
JasmineGraphFrontEnd::stop_graph_streaming(connFd, sqlite, &loop_exit);
JasmineGraphFrontEnd::stop_graph_streaming(connFd, &loop_exit);
} else if (line.compare(0, STOP_STREAM_KAFKA.length(), STOP_STREAM_KAFKA) == 0 &&
(line.length() == STOP_STREAM_KAFKA.length() ||
std::isspace(static_cast<unsigned char>(line[STOP_STREAM_KAFKA.length()])))) {
Expand Down Expand Up @@ -349,6 +354,10 @@
start_remote_worker_command(connFd, &loop_exit);
} else if (line.compare(SLA) == 0) {
sla_command(connFd, sqlite, perfSqlite, &loop_exit);
} else if (line.compare(SHEEP) == 0) {
sheep_command(masterIP, connFd, sqlite, &loop_exit);
} else if (line.compare(SHTRIAN) == 0) {
sheep_triangles_command(masterIP, connFd, sqlite, perfSqlite, jobScheduler, &loop_exit);
} else {
frontend_logger.error("Message format not recognized " + line);
int result_wr = write(connFd, INVALID_FORMAT.c_str(), INVALID_FORMAT.size());
Expand Down Expand Up @@ -4656,7 +4665,7 @@
writeSocketResultOrEmpty(connFd, result, loop_exit_p);
}

void JasmineGraphFrontEnd::stop_graph_streaming(int connFd, SQLiteDBInterface *sqlite, bool *loop_exit_p) {
void JasmineGraphFrontEnd::stop_graph_streaming(int connFd, bool *loop_exit_p) {

Check warning on line 4668 in src/frontend/JasmineGraphFrontEnd.cpp

View check run for this annotation

SonarQubeCloud / SonarCloud Code Analysis

Declaration shadows a global variable "connFd" in the outer scope.

See more on https://sonarcloud.io/project/issues?id=miyurud_jasminegraph&issues=AZ7_YoKum0zzAkiN1I28&open=AZ7_YoKum0zzAkiN1I28&pullRequest=362
std::string message1 = "Graph ID?";
int resultWr = write(connFd, message1.c_str(), message1.length());
if (resultWr < 0) {
Expand Down Expand Up @@ -4698,10 +4707,204 @@
std::string sqlStatement =
"UPDATE graph SET kg_construction_status = 'paused' WHERE idgraph = " + userResS;

sqlite->runUpdate(sqlStatement);
} else {
std::string message2 = "Graph Id not Found";
int resultWr = write(connFd, message2.c_str(), message2.length());
}
}

static void sheep_command(const std::string& masterIP, int conn_fd, SQLiteDBInterface *sqlite, bool *loop_exit_p) {
frontend_logger.info("Starting sheep partitioning command");
if (!writeSocketLine(conn_fd, "send graph name", loop_exit_p)) {
return;
}
string graphName = readTrimmedSocketInput(conn_fd);
frontend_logger.info("Graph name received: " + graphName);

if (!writeSocketLine(conn_fd, "send graph path", loop_exit_p)) {
return;
}
string graphPath = readTrimmedSocketInput(conn_fd);
frontend_logger.info("Graph path received: " + graphPath);

if (!writeSocketLine(conn_fd, "send number of partitions", loop_exit_p)) {
return;
}
string partitionCount = readTrimmedSocketInput(conn_fd);
int numPartitions = 0;
try {
numPartitions = std::stoi(partitionCount);
} catch (const std::invalid_argument&) {
frontend_logger.error("Invalid partition count received: " + partitionCount);
*loop_exit_p = true;
writeSocketLine(conn_fd, "error: invalid partition count", loop_exit_p);
return;
}
frontend_logger.info("Number of partitions: " + to_string(numPartitions));

// Check if graph file exists
if (!Utils::fileExists(graphPath)) {
frontend_logger.error("Graph file does not exist: " + graphPath);
writeSocketLine(conn_fd, "error: graph file not found", loop_exit_p);
*loop_exit_p = true;
return;
}

// Insert graph record into metadb
std::time_t time = chrono::system_clock::to_time_t(chrono::system_clock::now());
string uploadStartTime(26, '\0');
ctime_r(&time, &uploadStartTime[0]);
uploadStartTime = Utils::trim_copy(uploadStartTime);

string sqlStatement =
"INSERT INTO graph (name,upload_path,upload_start_time,upload_end_time,graph_status_idgraph_status,"
"vertexcount,centralpartitioncount,edgecount) VALUES(\"" +
graphName + R"(", ")" + graphPath + R"(", ")" + uploadStartTime + R"(", ""," )" +
to_string(Conts::GRAPH_STATUS::LOADING) + R"(", "", "", "")";
int graphID = sqlite->runInsert(sqlStatement);

if (graphID < 0) {
frontend_logger.error("Failed to insert graph into database");
writeSocketLine(conn_fd, "error: database insertion failed", loop_exit_p);
*loop_exit_p = true;
return;
}

frontend_logger.info("Graph record created with ID: " + to_string(graphID));

// Prepare output path in format: datafolder/graphID_
// The partitioner will append partition number and create central/local store files
string outputPath = Utils::getJasmineGraphProperty("org.jasminegraph.server.instance.datafolder") +
"/" + to_string(graphID) + "_";

// Create SheepPartitioner instance and partition the graph
SheepPartitioner sheepPartitioner(sqlite);
vector<std::map<int, string>> fullFileList =
sheepPartitioner.partitionGraph(graphID, graphPath, outputPath, numPartitions);

if (!fullFileList.empty()) {
frontend_logger.info("Sheep partitioning completed successfully for graph ID: " + to_string(graphID));

// Upload partition files to workers
JasmineGraphServer *server = JasmineGraphServer::getInstance();
server->uploadGraphLocally(graphID, Conts::GRAPH_TYPE_NORMAL, fullFileList, masterIP);

// Clean up temporary directory if it exists
if (string tempDir = Utils::getHomeDir() + "/.jasminegraph/tmp/" + to_string(graphID);
Utils::fileExists(tempDir)) {
Utils::deleteDirectory(tempDir);
}

JasmineGraphFrontEndCommon::getAndUpdateUploadTime(to_string(graphID), sqlite);

string message = "sheep partitioning completed for graph ID: " + to_string(graphID);
writeSocketLine(conn_fd, message, loop_exit_p);
if (*loop_exit_p) {
return;
}
} else {
frontend_logger.error("Sheep partitioning failed");
writeSocketLine(conn_fd, "error: sheep partitioning failed", loop_exit_p);
*loop_exit_p = true;
}
}

static void sheep_triangles_command(const std::string& masterIP, int conn_fd, SQLiteDBInterface *sqlite,
PerformanceSQLiteDBInterface *perfSqlite, JobScheduler *jobScheduler,
bool *loop_exit_p) {
frontend_logger.info("Starting sheep triangle counting command");

int uniqueId = JasmineGraphFrontEndCommon::getUid();
if (!writeSocketLine(conn_fd, GRAPHID_SEND, loop_exit_p)) {
return;
}
string graph_id = readTrimmedSocketInput(conn_fd);

if (!JasmineGraphFrontEndCommon::graphExistsByID(graph_id, sqlite)) {
string error_message = "The specified graph id does not exist";
writeSocketLine(conn_fd, error_message, loop_exit_p);
*loop_exit_p = true;
return;
}

if (!writeSocketLine(conn_fd, PRIORITY, loop_exit_p)) {
return;
}
string priority = readTrimmedSocketInput(conn_fd);

if (!(std::find_if(priority.begin(), priority.end(), [](unsigned char c) { return !std::isdigit(c); }) ==
priority.end())) {
*loop_exit_p = true;
string error_message = "Priority should be numeric and > 1 or empty";
writeSocketLine(conn_fd, error_message, loop_exit_p);
return;
}

int threadPriority = std::atoi(priority.c_str());

static std::atomic reqCounter = 0;
string reqId = to_string(reqCounter++);
frontend_logger.info("Started processing sheep triangle counting request " + reqId);
auto begin = chrono::high_resolution_clock::now();
JobRequest jobDetails;
jobDetails.setJobId(std::to_string(uniqueId));
jobDetails.setJobType(SHEEP_TRIANGLES);

long graphSLA = -1; // This prevents auto calibration for priority=1 (=default priority)
if (threadPriority > Conts::DEFAULT_THREAD_PRIORITY) {
// All high priority threads will be set the same high priority level
threadPriority = Conts::HIGH_PRIORITY_DEFAULT_VALUE;
graphSLA = JasmineGraphFrontEndCommon::getSLAForGraphId(sqlite, perfSqlite, graph_id, SHEEP_TRIANGLES,
Conts::SLA_CATEGORY::LATENCY);
jobDetails.addParameter(Conts::PARAM_KEYS::GRAPH_SLA, std::to_string(graphSLA));
}

if (graphSLA == 0) {
if (JasmineGraphFrontEnd::areRunningJobsForSameGraph()) {
if (canCalibrate) {
// initial calibration
jobDetails.addParameter(Conts::PARAM_KEYS::AUTO_CALIBRATION, "false");
} else {
std::string message2 = "Graph Id not Found";
int resultWr = write(connFd, message2.c_str(), message2.length());
// auto calibration
jobDetails.addParameter(Conts::PARAM_KEYS::AUTO_CALIBRATION, "true");
}
} else {
frontend_logger.error("Can't calibrate the graph now");
}
}

jobDetails.setPriority(threadPriority);
jobDetails.setMasterIP(masterIP);
jobDetails.addParameter(Conts::PARAM_KEYS::GRAPH_ID, graph_id);
jobDetails.addParameter(Conts::PARAM_KEYS::CATEGORY, Conts::SLA_CATEGORY::LATENCY);
if (canCalibrate) {
jobDetails.addParameter(Conts::PARAM_KEYS::CAN_CALIBRATE, "true");
} else {
jobDetails.addParameter(Conts::PARAM_KEYS::CAN_CALIBRATE, "false");
}

jobScheduler->pushJob(jobDetails);
JobResponse jobResponse = jobScheduler->getResult(jobDetails);
if (std::string errorMessage = jobResponse.getParameter(Conts::PARAM_KEYS::ERROR_MESSAGE); !errorMessage.empty()) {
*loop_exit_p = true;
writeSocketLine(conn_fd, errorMessage, loop_exit_p);
return;
}

std::string sheepTriangleCount = jobResponse.getParameter(Conts::PARAM_KEYS::TRIANGLE_COUNT);

if (threadPriority == Conts::HIGH_PRIORITY_DEFAULT_VALUE) {
highPriorityTaskCount--;
}

auto end = chrono::high_resolution_clock::now();
auto dur = end - begin;
auto msDuration = std::chrono::duration_cast<std::chrono::milliseconds>(dur).count();
frontend_logger.info("Req: " + reqId + " Sheep-Partitioned Triangle Count: " + sheepTriangleCount +
" Time Taken: " + to_string(msDuration) + " milliseconds");

writeSocketLine(conn_fd, sheepTriangleCount, loop_exit_p);
if (*loop_exit_p) {
return;
}
}
2 changes: 1 addition & 1 deletion src/frontend/JasmineGraphFrontEnd.h
Original file line number Diff line number Diff line change
Expand Up @@ -62,7 +62,7 @@ class JasmineGraphFrontEnd {
static bool areRunningJobsForSameGraph();
static bool constructKGStreamHDFSCommand(std::string masterIP, int connFd, int numberOfPartitions,
SQLiteDBInterface *sqlite, bool *loop_exit_p);
static void stop_graph_streaming(int connFd, SQLiteDBInterface*sqlite, bool *loop_exit_p);
static void stop_graph_streaming(int connFd, bool *loop_exit_p);
static bool constructKGStreamLocalTXTCommand(std::string masterIP, int connFd, int numberOfPartitions,
SQLiteDBInterface *sqlite, bool *loop_exit_p);
static bool strian_exit;
Expand Down
3 changes: 3 additions & 0 deletions src/frontend/JasmineGraphFrontEndProtocol.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -68,3 +68,6 @@ const string AGENT_PLAN = "graphrag";
const string PROPERTIES = "prp";
const string UPDATE_PARTITION_META = "update-partition-meta";
const string META = "meta";
const string SHEEP = "sheep";
const string SHTRIAN = "shtrian";
const string SHEEP_TRIANGLES = "sheep-triangles";
3 changes: 3 additions & 0 deletions src/frontend/JasmineGraphFrontEndProtocol.h
Original file line number Diff line number Diff line change
Expand Up @@ -100,6 +100,9 @@ extern const string AGENT_PLAN;
extern const string PROPERTIES;
extern const string UPDATE_PARTITION_META;
extern const string META;
extern const string SHEEP;
extern const string SHTRIAN;
extern const string SHEEP_TRIANGLES;

class JasminGraphFrontEndProtocol {
// Note that this protocol do not need a handshake session since the communication in most of the time is conducted
Expand Down
15 changes: 10 additions & 5 deletions src/frontend/core/domain/JobRequest.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -18,27 +18,32 @@ std::string JobRequest::getJobId() const { return jobId; }

void JobRequest::setJobId(std::string inputJobId) { jobId = inputJobId; }

std::string JobRequest::getJobType() { return jobType; }
std::string JobRequest::getJobType() const { return jobType; }

void JobRequest::setJobType(std::string inputJobType) { jobType = inputJobType; }

void JobRequest::addParameter(std::string key, std::string value) { requestParams[key] = value; }

std::string JobRequest::getParameter(std::string key) { return requestParams[key]; }
std::string JobRequest::getParameter(std::string key) const {
if (requestParams.find(key) != requestParams.end()) {
return requestParams.at(key);
}
return "";
}

void JobRequest::setPriority(int priority) { this->priority = priority; }

int JobRequest::getPriority() { return priority; }
int JobRequest::getPriority() const { return priority; }

void JobRequest::setMasterIP(std::string masterip) { this->masterIP = masterip; }

std::string JobRequest::getMasterIP() { return masterIP; }
std::string JobRequest::getMasterIP() const { return masterIP; }

void JobRequest::setBeginTime(std::chrono::time_point<std::chrono::system_clock> begin) {
this->begin = begin;
}

std::chrono::time_point<std::chrono::system_clock> JobRequest::getBegin() {
std::chrono::time_point<std::chrono::system_clock> JobRequest::getBegin() const {
return begin;
}

10 changes: 5 additions & 5 deletions src/frontend/core/domain/JobRequest.h
Original file line number Diff line number Diff line change
Expand Up @@ -32,15 +32,15 @@ class JobRequest {

std::string getJobId() const;
void setJobId(std::string inputJobId);
std::string getJobType();
std::string getJobType() const;
void setJobType(std::string inputJobType);
void addParameter(std::string key, std::string value);
std::string getParameter(std::string key);
std::string getParameter(std::string key) const;
void setPriority(int priority);
int getPriority();
int getPriority() const;
void setMasterIP(std::string masterip);
std::string getMasterIP();
std::chrono::time_point<std::chrono::system_clock> getBegin();
std::string getMasterIP() const;
std::chrono::time_point<std::chrono::system_clock> getBegin() const;
void setBeginTime(std::chrono::time_point<std::chrono::system_clock> begin);
};

Expand Down
1 change: 1 addition & 0 deletions src/frontend/core/executor/AbstractExecutor.h
Original file line number Diff line number Diff line change
Expand Up @@ -32,6 +32,7 @@ class AbstractExecutor {
AbstractExecutor();
AbstractExecutor(JobRequest jobRequest);
static std::vector<std::vector<string>> getCombinations(std::vector<string> inputVector);
virtual ~AbstractExecutor() = default;
virtual void execute() = 0;
static int collectPerformaceData(PerformanceSQLiteDBInterface *perDB, std::string graphId,
std::string command, std::string category, int partitionCount,
Expand Down
Loading
Loading