Running test doesn't require codegen.
| 468 | |
| 469 | // Running test doesn't require codegen. |
| 470 | void Run(vineyard::Client& client, const grape::CommSpec& comm_spec, |
| 471 | vineyard::ObjectID id, bool run_projected, bool run_property, |
| 472 | const std::string& app_name) { |
| 473 | std::shared_ptr<FragmentType> fragment = |
| 474 | std::dynamic_pointer_cast<FragmentType>(client.GetObject(id)); |
| 475 | |
| 476 | boost::property_tree::ptree pt; |
| 477 | pt.put("src", "4"); |
| 478 | pt.put("threadNum", "1"); |
| 479 | pt.put("app_class", app_name); |
| 480 | if (getenv("USER_JAR_PATH")) { |
| 481 | pt.put("jar_name", getenv("USER_JAR_PATH")); |
| 482 | } else { |
| 483 | LOG(ERROR) << "JAR_NAME not set"; |
| 484 | return; |
| 485 | } |
| 486 | |
| 487 | if (!run_projected) { |
| 488 | pt.put("frag_name", "gs::ArrowFragmentDefault<int64_t>"); |
| 489 | std::stringstream ss; |
| 490 | boost::property_tree::json_parser::write_json(ss, pt); |
| 491 | std::string basic_params = ss.str(); |
| 492 | VLOG(1) << "basic_params: " << basic_params; |
| 493 | |
| 494 | std::string selector_string; |
| 495 | std::string selectors_string; |
| 496 | if (run_property == 0) { |
| 497 | // labeled_vertex_data |
| 498 | selector_string = "r:label0"; |
| 499 | { |
| 500 | std::vector<std::pair<std::string, std::string>> selector_list; |
| 501 | selector_list.emplace_back("id", "v:label0.id"); |
| 502 | selector_list.emplace_back("result", "r:label0"); |
| 503 | selectors_string = gs::generate_selectors(selector_list); |
| 504 | } |
| 505 | } else { |
| 506 | // labeled_vertex_property |
| 507 | selector_string = "r:label0.dist_0"; |
| 508 | { |
| 509 | std::vector<std::pair<std::string, std::string>> selector_list; |
| 510 | selector_list.emplace_back("id", "v:label0.id"); |
| 511 | selector_list.emplace_back("result", "r:label0.dist_0"); |
| 512 | selectors_string = gs::generate_selectors(selector_list); |
| 513 | } |
| 514 | } |
| 515 | VLOG(1) << "selector string: " << selector_string << ", selectors string " |
| 516 | << selectors_string; |
| 517 | // 1. run java query |
| 518 | QueryProperty(client, fragment, comm_spec, app_name, "/tmp", basic_params, |
| 519 | selector_string, selectors_string); |
| 520 | } else { // 3. run projected |
| 521 | if (app_name.find("SSSP") != std::string::npos) { |
| 522 | pt.put("frag_name", |
| 523 | "gs::ArrowProjectedFragment<int64_t,uint64_t,int64_t,int64_t>"); |
| 524 | } else { |
| 525 | pt.put("frag_name", |
| 526 | "gs::ArrowProjectedFragment<int64_t,uint64_t,double,int64_t>"); |
| 527 | } |
no test coverage detected