MCPcopy Create free account
hub / github.com/alibaba/GraphScope / main

Function main

analytical_engine/test/run_java_app.cc:592–668  ·  view source on GitHub ↗

Run projected or not: by passing value Run property or not:

Source from the content-addressed store, hash-verified

590// Run projected or not: by passing value
591// Run property or not:
592int main(int argc, char** argv) {
593 if (argc < 10) {
594 printf(
595 "usage: ./run_java_app <ipc_socket> <e_label_num> "
596 "<efiles...> "
597 "<v_label_num> <vfiles...> <run_projected> <run_property>"
598 "[directed] [app_name]\n");
599 return 1;
600 }
601 int index = 1;
602 std::string ipc_socket = std::string(argv[index++]);
603
604 int edge_label_num = atoi(argv[index++]);
605 std::vector<std::string> efiles;
606 for (int i = 0; i < edge_label_num; ++i) {
607 efiles.push_back(argv[index++]);
608 }
609
610 int vertex_label_num = atoi(argv[index++]);
611 std::vector<std::string> vfiles;
612 for (int i = 0; i < vertex_label_num; ++i) {
613 vfiles.push_back(argv[index++]);
614 }
615
616 int run_projected = atoi(argv[index++]);
617 int run_property = atoi(argv[index++]);
618
619 int directed = 1;
620 std::string app_name = "";
621 if (argc > index) {
622 directed = atoi(argv[index++]);
623 }
624 if (argc > index) {
625 app_name = argv[index++];
626 }
627 VLOG(1) << "app name " << app_name;
628
629 grape::InitMPIComm();
630 {
631 grape::CommSpec comm_spec;
632 comm_spec.Init(MPI_COMM_WORLD);
633
634 vineyard::Client client;
635 VINEYARD_CHECK_OK(client.Connect(ipc_socket));
636
637 VLOG(1) << "Connected to IPCServer: " << ipc_socket;
638
639 vineyard::ObjectID fragment_id;
640 {
641 auto loader = std::make_unique<
642 gs::ArrowFragmentLoader<vineyard::property_graph_types::OID_TYPE,
643 vineyard::property_graph_types::VID_TYPE>>(
644 client, comm_spec, efiles, vfiles, directed != 0);
645 fragment_id =
646 bl::try_handle_all([&loader]() { return loader->LoadFragment(); },
647 [](const vineyard::GSError& e) {
648 LOG(ERROR) << e.error_msg;
649 return 0;

Callers

nothing calls this directly

Calls 5

worker_idMethod · 0.80
RunFunction · 0.70
push_backMethod · 0.65
InitMethod · 0.65
LoadFragmentMethod · 0.45

Tested by

no test coverage detected