From 4e3ad2efe403f57035866d55a4d8382a4b4e1a10 Mon Sep 17 00:00:00 2001 From: Weibin Zeng Date: Fri, 10 May 2024 13:15:30 +0800 Subject: [PATCH] feat(c++)!: change the header folder and library name from `gar` to `graphar` (#477) ### Reason for this PR as issue #476 describe ### What changes are included in this PR? - change the header folder to include/graphar - change the generated library to graphar - update the related document and code. ### Are these changes tested? covered by existing tests. ### Are there any user-facing changes? yes **BREAKING CHANGE: This change make the header include sentence from include gar/ to include graphar/ and link library from gar to graphar** --------- Signed-off-by: acezen --- .github/workflows/ci-nightly.yml | 2 +- .github/workflows/ci.yml | 4 +- README.md | 20 ++-- cpp/CMakeLists.txt | 91 +++++++++---------- .../arrow_chunk_reader_benchmark.cc | 6 +- cpp/benchmarks/benchmark_util.h | 4 +- cpp/benchmarks/graph_info_benchmark.cc | 2 +- cpp/examples/bfs_father_example.cc | 10 +- cpp/examples/bfs_pull_example.cc | 8 +- cpp/examples/bfs_push_example.cc | 8 +- cpp/examples/bfs_stream_example.cc | 8 +- cpp/examples/bgl_example.cc | 10 +- cpp/examples/cc_push_example.cc | 8 +- cpp/examples/cc_stream_example.cc | 8 +- cpp/examples/construct_info_example.cc | 2 +- cpp/examples/high_level_reader_example.cc | 2 +- cpp/examples/high_level_writer_example.cc | 6 +- cpp/examples/low_level_reader_example.cc | 4 +- cpp/examples/mid_level_reader_example.cc | 6 +- cpp/examples/mid_level_writer_example.cc | 4 +- cpp/examples/pagerank_example.cc | 8 +- cpp/examples/snap_dataset_to_graphar.cc | 6 +- ....cmake => graphar-config-version.in.cmake} | 2 +- ...onfig.in.cmake => graphar-config.in.cmake} | 18 ++-- cpp/include/{gar => graphar}/api.h | 24 ++--- cpp/include/{gar => graphar}/fwd.h | 4 +- cpp/include/{gar => graphar}/graph.h | 12 +-- cpp/include/{gar => graphar}/graph_info.h | 2 +- .../reader/arrow_chunk_reader.h | 4 +- .../reader/chunk_info_reader.h | 2 +- .../{gar => graphar}/util/adj_list_type.h | 2 +- .../util/convert_to_arrow_type.h | 2 +- cpp/include/{gar => graphar}/util/data_type.h | 2 +- .../{gar => graphar}/util/expression.h | 2 +- cpp/include/{gar => graphar}/util/file_type.h | 4 +- .../{gar => graphar}/util/filesystem.h | 10 +- .../{gar => graphar}/util/general_params.h | 0 cpp/include/{gar => graphar}/util/macros.h | 0 .../{gar => graphar}/util/reader_util.h | 2 +- cpp/include/{gar => graphar}/util/result.h | 4 +- cpp/include/{gar => graphar}/util/status.h | 2 +- cpp/include/{gar => graphar}/util/util.h | 2 +- .../{gar => graphar}/util/version_parser.h | 2 +- .../{gar => graphar}/util/writer_util.h | 2 +- cpp/include/{gar => graphar}/util/yaml.h | 2 +- .../writer/arrow_chunk_writer.h | 4 +- .../{gar => graphar}/writer/edges_builder.h | 8 +- .../writer/vertices_builder.h | 6 +- cpp/src/arrow_chunk_reader.cc | 20 ++-- cpp/src/arrow_chunk_writer.cc | 18 ++-- cpp/src/chunk_info_reader.cc | 14 +-- cpp/src/data_type.cc | 4 +- cpp/src/edges_builder.cc | 8 +- cpp/src/expression.cc | 4 +- cpp/src/filesystem.cc | 6 +- cpp/src/graph.cc | 6 +- cpp/src/graph_info.cc | 14 +-- cpp/src/reader_util.cc | 10 +- cpp/src/util.cc | 2 +- cpp/src/version_parser.cc | 2 +- cpp/src/vertices_builder.cc | 6 +- cpp/src/yaml.cc | 4 +- cpp/test/test_arrow_chunk_reader.cc | 12 +-- cpp/test/test_arrow_chunk_writer.cc | 10 +- cpp/test/test_builder.cc | 8 +- cpp/test/test_chunk_info_reader.cc | 6 +- cpp/test/test_graph.cc | 4 +- cpp/test/test_info.cc | 12 +-- cpp/test/util.h | 2 +- docs/libraries/cpp/examples/bgl.md | 2 +- docs/libraries/cpp/examples/graphscope.md | 10 +- docs/libraries/cpp/examples/out-of-core.md | 2 +- docs/libraries/cpp/getting-started.md | 32 +++---- docs/libraries/java/how_to_develop_java.md | 2 +- docs/libraries/java/java.md | 14 +-- docs/libraries/pyspark/pyspark.md | 22 ++--- docs/libraries/spark/examples.md | 10 +- docs/libraries/spark/spark.md | 36 ++++---- licenserc.toml | 1 - .../graphar/example/Neo4j2GraphAr.scala | 2 +- .../apache/graphar/graph/GraphWriter.scala | 8 +- .../org/apache/graphar/importer/Neo4j.scala | 2 +- .../scala/org/apache/graphar/TestWriter.scala | 6 +- pyspark/README.md | 2 +- pyspark/graphar_pyspark/graph.py | 6 +- pyspark/graphar_pyspark/info.py | 16 ++-- 86 files changed, 346 insertions(+), 350 deletions(-) rename cpp/{gar-config-version.in.cmake => graphar-config-version.in.cmake} (96%) rename cpp/{gar-config.in.cmake => graphar-config.in.cmake} (63%) rename cpp/include/{gar => graphar}/api.h (65%) rename cpp/include/{gar => graphar}/fwd.h (99%) rename cpp/include/{gar => graphar}/graph.h (99%) rename cpp/include/{gar => graphar}/graph_info.h (99%) rename cpp/include/{gar => graphar}/reader/arrow_chunk_reader.h (99%) rename cpp/include/{gar => graphar}/reader/chunk_info_reader.h (99%) rename cpp/include/{gar => graphar}/util/adj_list_type.h (99%) rename cpp/include/{gar => graphar}/util/convert_to_arrow_type.h (99%) rename cpp/include/{gar => graphar}/util/data_type.h (99%) rename cpp/include/{gar => graphar}/util/expression.h (99%) rename cpp/include/{gar => graphar}/util/file_type.h (96%) rename cpp/include/{gar => graphar}/util/filesystem.h (96%) rename cpp/include/{gar => graphar}/util/general_params.h (100%) rename cpp/include/{gar => graphar}/util/macros.h (100%) rename cpp/include/{gar => graphar}/util/reader_util.h (99%) rename cpp/include/{gar => graphar}/util/result.h (98%) rename cpp/include/{gar => graphar}/util/status.h (99%) rename cpp/include/{gar => graphar}/util/util.h (99%) rename cpp/include/{gar => graphar}/util/version_parser.h (99%) rename cpp/include/{gar => graphar}/util/writer_util.h (97%) rename cpp/include/{gar => graphar}/util/yaml.h (98%) rename cpp/include/{gar => graphar}/writer/arrow_chunk_writer.h (99%) rename cpp/include/{gar => graphar}/writer/edges_builder.h (98%) rename cpp/include/{gar => graphar}/writer/vertices_builder.h (98%) diff --git a/.github/workflows/ci-nightly.yml b/.github/workflows/ci-nightly.yml index 4673f80c0..9f5eed6a2 100644 --- a/.github/workflows/ci-nightly.yml +++ b/.github/workflows/ci-nightly.yml @@ -57,7 +57,7 @@ jobs: run: | pushd build make -j$(nproc) - make gar-ccache-stats + make graphar-ccache-stats popd - name: Test diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index 9bb1c0a01..3018b8f53 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -85,7 +85,7 @@ jobs: # validate format function prepend() { while read line; do echo "${1}${line}"; done; } - make gar-clformat + make graphar-clformat GIT_DIFF=$(git diff --ignore-submodules) if [[ -n $GIT_DIFF ]]; then echo "~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~" @@ -109,7 +109,7 @@ jobs: function ec() { [[ "$1" == "-h" ]] && { shift && eval $* > /dev/null 2>&1; ec=$?; echo $ec; } || eval $*; ec=$?; } - ec make gar-cpplint + ec make graphar-cpplint if [[ "$ec" != "0" ]]; then echo "~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~" echo "| cpplint failures found! Run: " diff --git a/README.md b/README.md index d9daa8ec5..082491e35 100644 --- a/README.md +++ b/README.md @@ -34,24 +34,24 @@ data, thereby reducing the burden on systems when working together. Additionally, it can serve as a direct data source for graph processing applications. -To achieve this, GraphAr provides: +To achieve this, GraphAr project provides: -- The Graph Archive(GAR) file format: a standardized system-independent - file format for storing graph data +- The GraphAr format: a standardized system-independent + format for storing graph data - Libraries: a set of libraries for reading, writing and transforming - GAR files + GraphAr format data By using GraphAr, you can: - Store and persist your graph data in a system-independent way with the - GAR file format -- Easily access and generate GAR files using the libraries -- Utilize Apache Spark to quickly manipulate and transform your GAR - files + GraphAr format +- Easily access and generate GraphAr format data using the libraries +- Utilize Apache Spark to quickly manipulate and transform your graphar + format data -## The GAR File Format +## The GraphAr Format -The GAR file format is designed for storing property graphs. It uses +The GraphAr format is designed for storing property graphs. It uses metadata to record all the necessary information of a graph, and maintains the actual data in a chunked way. diff --git a/cpp/CMakeLists.txt b/cpp/CMakeLists.txt index d0efed82b..2a0d138b4 100644 --- a/cpp/CMakeLists.txt +++ b/cpp/CMakeLists.txt @@ -30,11 +30,11 @@ if (CMAKE_VERSION VERSION_GREATER_EQUAL "3.24.0") cmake_policy(SET CMP0135 NEW) endif() -set(GAR_MAJOR_VERSION 0) -set(GAR_MINOR_VERSION 11) -set(GAR_PATCH_VERSION 4) -set(GAR_VERSION ${GAR_MAJOR_VERSION}.${GAR_MINOR_VERSION}.${GAR_PATCH_VERSION}) -project(graph-archive LANGUAGES C CXX VERSION ${GAR_VERSION}) +set(GRAPHAR_MAJOR_VERSION 0) +set(GRAPHAR_MINOR_VERSION 11) +set(GRAPHAR_PATCH_VERSION 4) +set(GREAPHAR_VERSION ${GRAPHAR_MAJOR_VERSION}.${GRAPHAR_MINOR_VERSION}.${GRAPHAR_PATCH_VERSION}) +project(graphar-cpp LANGUAGES C CXX VERSION ${GREAPHAR_VERSION}) # ------------------------------------------------------------------------------ # cmake options @@ -84,11 +84,11 @@ if(NOT (CMAKE_CXX_COMPILER_LAUNCHER MATCHES "ccache") AND NOT (CMAKE_C_COMPILER_ if(ccache_EXECUTABLE) set(CMAKE_C_COMPILER_LAUNCHER ${ccache_EXECUTABLE}) set(CMAKE_CXX_COMPILER_LAUNCHER ${ccache_EXECUTABLE}) - add_custom_target(gar-ccache-stats + add_custom_target(graphar-ccache-stats COMMAND ${ccache_EXECUTABLE} --show-stats ) else() - add_custom_target(gar-ccache-stats + add_custom_target(graphar-ccache-stats COMMAND echo "ccache not found." ) endif(ccache_EXECUTABLE) @@ -106,7 +106,7 @@ set(CMAKE_CXX_FLAGS_DEBUG "${CMAKE_CXX_FLAGS_DEBUG} -O0 -g -fno-omit-frame-point set(CMAKE_LINKER_FLAGS_DEBUG "${CMAKE_LINKER_FLAGS_DEBUG} -fno-omit-frame-pointer -fsanitize=address") set(CMAKE_CXX_FLAGS_RELEASE "${CMAKE_CXX_FLAGS_RELEASE} -O3 -g") -message(STATUS "[gar] will build in type: ${CMAKE_BUILD_TYPE}") +message(STATUS "[graphar] will build in type: ${CMAKE_BUILD_TYPE}") # ------------------------------------------------------------------------------ # cmake configs @@ -167,10 +167,10 @@ macro(find_catch2) set(CMAKE_WARN_DEPRECATED ON CACHE BOOL "" FORCE) endmacro() -macro(install_gar_target target) +macro(install_graphar_target target) # install install(TARGETS ${target} - EXPORT gar-targets + EXPORT graphar-targets ARCHIVE DESTINATION lib LIBRARY DESTINATION lib RUNTIME DESTINATION bin @@ -226,44 +226,44 @@ macro(get_target_location var target) endmacro() # ------------------------------------------------------------------------------ -# generate gar library +# generate graphar library # ------------------------------------------------------------------------------ -macro(build_gar) +macro(build_graphar) file(GLOB_RECURSE CORE_SRC_FILES "src/*.cc" ${CMAKE_CURRENT_SOURCE_DIR}/thirdparty/mini-yaml/yaml/*.cpp) - add_library(gar SHARED ${CORE_SRC_FILES}) - install_gar_target(gar) - target_compile_features(gar PRIVATE cxx_std_17) - target_include_directories(gar PUBLIC $ + add_library(graphar SHARED ${CORE_SRC_FILES}) + install_graphar_target(graphar) + target_compile_features(graphar PRIVATE cxx_std_17) + target_include_directories(graphar PUBLIC $ $ ) - target_include_directories(gar PRIVATE ${CMAKE_CURRENT_SOURCE_DIR}/thirdparty) + target_include_directories(graphar PRIVATE ${CMAKE_CURRENT_SOURCE_DIR}/thirdparty) if(BUILD_ARROW_FROM_SOURCE) - target_include_directories(gar SYSTEM BEFORE PRIVATE ${GAR_ARROW_INCLUDE_DIR}) + target_include_directories(graphar SYSTEM BEFORE PRIVATE ${GAR_ARROW_INCLUDE_DIR}) endif() - target_link_libraries(gar PRIVATE Threads::Threads ${CMAKE_DL_LIBS}) + target_link_libraries(graphar PRIVATE Threads::Threads ${CMAKE_DL_LIBS}) if(APPLE) if(BUILD_ARROW_FROM_SOURCE) - target_link_libraries(gar PRIVATE -Wl,-force_load gar_arrow_static + target_link_libraries(graphar PRIVATE -Wl,-force_load gar_arrow_static "${GAR_PARQUET_STATIC_LIB}" "${GAR_DATASET_STATIC_LIB}" "${GAR_ACERO_STATIC_LIB}" "${GAR_ARROW_BUNDLED_DEPS_STATIC_LIB}") else() - target_link_libraries(gar PRIVATE -Wl,-force_load Arrow::arrow_shared + target_link_libraries(graphar PRIVATE -Wl,-force_load Arrow::arrow_shared Parquet::parquet_shared ArrowDataset::arrow_dataset_shared ArrowAcero::arrow_acero_shared) endif() else() if(BUILD_ARROW_FROM_SOURCE) - target_link_libraries(gar PRIVATE -Wl,--exclude-libs,ALL -Wl,--whole-archive gar_arrow_static + target_link_libraries(graphar PRIVATE -Wl,--exclude-libs,ALL -Wl,--whole-archive gar_arrow_static "${GAR_PARQUET_STATIC_LIB}" "${GAR_DATASET_STATIC_LIB}" "${GAR_ARROW_ACERO_STATIC_LIB}" "${GAR_ARROW_BUNDLED_DEPS_STATIC_LIB}" -Wl,--no-whole-archive) else() - target_link_libraries(gar PRIVATE -Wl,--exclude-libs,ALL -Wl,--whole-archive Arrow::arrow_shared + target_link_libraries(graphar PRIVATE -Wl,--exclude-libs,ALL -Wl,--whole-archive Arrow::arrow_shared Parquet::parquet_shared ArrowDataset::arrow_dataset_shared ArrowAcero::arrow_acero_shared -Wl,--no-whole-archive) @@ -273,17 +273,14 @@ macro(build_gar) # if OpenSSL library exists, link the OpenSSL library. # OpenSSL has to be linked after GAR_ARROW_BUNDLED_DEPS_STATIC_LIB if(OPENSSL_FOUND) - target_link_libraries(gar PRIVATE OpenSSL::SSL) + target_link_libraries(graphar PRIVATE OpenSSL::SSL) endif() if (CURL_FOUND) - target_link_libraries(gar PRIVATE ${CURL_LIBRARIES}) - endif() - if (APPLE) - target_link_libraries(gar "-framework CoreFoundation") + target_link_libraries(graphar PRIVATE ${CURL_LIBRARIES}) endif() endmacro() -build_gar() +build_graphar() # ------------------------------------------------------------------------------ # build example @@ -306,7 +303,7 @@ if (BUILD_EXAMPLES) if(BUILD_ARROW_FROM_SOURCE) target_include_directories(${E_NAME} SYSTEM BEFORE PRIVATE ${GAR_ARROW_INCLUDE_DIR}) endif() - target_link_libraries(${E_NAME} PRIVATE gar ${Boost_LIBRARIES} Threads::Threads ${CMAKE_DL_LIBS}) + target_link_libraries(${E_NAME} PRIVATE graphar ${Boost_LIBRARIES} Threads::Threads ${CMAKE_DL_LIBS}) if(APPLE) if(BUILD_ARROW_FROM_SOURCE) target_link_libraries(${E_NAME} PRIVATE -Wl,-force_load gar_arrow_static @@ -341,7 +338,7 @@ endif() # ------------------------------------------------------------------------------ # Install # ------------------------------------------------------------------------------ -install(DIRECTORY ${PROJECT_SOURCE_DIR}/include/gar +install(DIRECTORY ${PROJECT_SOURCE_DIR}/include/graphar DESTINATION include FILES_MATCHING PATTERN "*.h" @@ -353,22 +350,22 @@ install(DIRECTORY ${PROJECT_SOURCE_DIR}/thirdparty/result PATTERN "*.hpp" ) -configure_file(gar-config.in.cmake - "${PROJECT_BINARY_DIR}/gar-config.cmake" @ONLY +configure_file(graphar-config.in.cmake + "${PROJECT_BINARY_DIR}/graphar-config.cmake" @ONLY ) -configure_file(gar-config-version.in.cmake - "${PROJECT_BINARY_DIR}/gar-config-version.cmake" @ONLY +configure_file(graphar-config-version.in.cmake + "${PROJECT_BINARY_DIR}/graphar-config-version.cmake" @ONLY ) -install(FILES "${PROJECT_BINARY_DIR}/gar-config.cmake" - "${PROJECT_BINARY_DIR}/gar-config-version.cmake" - DESTINATION ${CMAKE_INSTALL_LIBDIR}/cmake/gar +install(FILES "${PROJECT_BINARY_DIR}/graphar-config.cmake" + "${PROJECT_BINARY_DIR}/graphar-config-version.cmake" + DESTINATION ${CMAKE_INSTALL_LIBDIR}/cmake/graphar ) -install(EXPORT gar-targets - FILE gar-targets.cmake - DESTINATION ${CMAKE_INSTALL_LIBDIR}/cmake/gar +install(EXPORT graphar-targets + FILE graphar-targets.cmake + DESTINATION ${CMAKE_INSTALL_LIBDIR}/cmake/graphar ) # ------------------------------------------------------------------------------ @@ -388,7 +385,7 @@ if (BUILD_TESTS) if(BUILD_ARROW_FROM_SOURCE) target_include_directories(${target} SYSTEM BEFORE PRIVATE ${GAR_ARROW_INCLUDE_DIR}) endif() - target_link_libraries(${target} PRIVATE Catch2::Catch2 gar Threads::Threads ${CMAKE_DL_LIBS}) + target_link_libraries(${target} PRIVATE Catch2::Catch2 graphar Threads::Threads ${CMAKE_DL_LIBS}) if(APPLE) if(BUILD_ARROW_FROM_SOURCE) target_link_libraries(${target} PRIVATE -Wl,-force_load gar_arrow_static @@ -445,7 +442,7 @@ if (BUILD_BENCHMARKS) add_executable(${target} ${add_test_SRCS}) target_compile_features(${target} PRIVATE cxx_std_17) target_include_directories(${target} PRIVATE ${PROJECT_SOURCE_DIR}/thirdparty) - target_link_libraries(${target} PRIVATE benchmark::benchmark_main gar Threads::Threads ${CMAKE_DL_LIBS}) + target_link_libraries(${target} PRIVATE benchmark::benchmark_main graphar Threads::Threads ${CMAKE_DL_LIBS}) # if OpenSSL library exists, link the OpenSSL library. # OpenSSL has to be linked after GAR_ARROW_BUNDLED_DEPS_STATIC_LIB @@ -462,21 +459,21 @@ endif() # ------------------------------------------------------------------------------ # Format code & cpplint # ------------------------------------------------------------------------------ -file(GLOB_RECURSE FILES_NEED_FORMAT "include/gar/*.h" "src/*.cc" +file(GLOB_RECURSE FILES_NEED_FORMAT "include/graphar/*.h" "src/*.cc" "test/*.h" "test/*.cc" "examples/*.h" "examples/*.cc" "benchmarks/*.h" "benchmarks/*.cc") -file(GLOB_RECURSE FILES_NEED_LINT "include/gar/*.h" "src/*.cc" +file(GLOB_RECURSE FILES_NEED_LINT "include/graphar/*.h" "src/*.cc" "test/*.h" "test/*.cc" "examples/*.h" "examples/*.cc" "benchmarks/*.h" "benchmarks/*.cc") -add_custom_target(gar-clformat +add_custom_target(graphar-clformat COMMAND clang-format --style=file -i ${FILES_NEED_FORMAT} COMMENT "Running clang-format." VERBATIM) -add_custom_target(gar-cpplint +add_custom_target(graphar-cpplint COMMAND ${PROJECT_SOURCE_DIR}/misc/cpplint.py --root=${PROJECT_SOURCE_DIR}/include ${FILES_NEED_LINT} COMMENT "Running cpplint check." VERBATIM) diff --git a/cpp/benchmarks/arrow_chunk_reader_benchmark.cc b/cpp/benchmarks/arrow_chunk_reader_benchmark.cc index 6b1dc5340..9f761d7cf 100644 --- a/cpp/benchmarks/arrow_chunk_reader_benchmark.cc +++ b/cpp/benchmarks/arrow_chunk_reader_benchmark.cc @@ -20,9 +20,9 @@ #include "benchmark/benchmark.h" #include "./benchmark_util.h" -#include "gar/graph_info.h" -#include "gar/reader/arrow_chunk_reader.h" -#include "gar/util/adj_list_type.h" +#include "graphar/graph_info.h" +#include "graphar/reader/arrow_chunk_reader.h" +#include "graphar/util/adj_list_type.h" namespace graphar { diff --git a/cpp/benchmarks/benchmark_util.h b/cpp/benchmarks/benchmark_util.h index af05ffbe7..4b843762e 100644 --- a/cpp/benchmarks/benchmark_util.h +++ b/cpp/benchmarks/benchmark_util.h @@ -25,8 +25,8 @@ #include "benchmark/benchmark.h" -#include "gar/graph_info.h" -#include "gar/util/status.h" +#include "graphar/graph_info.h" +#include "graphar/util/status.h" namespace graphar { diff --git a/cpp/benchmarks/graph_info_benchmark.cc b/cpp/benchmarks/graph_info_benchmark.cc index a7d9e848c..c193b0c63 100644 --- a/cpp/benchmarks/graph_info_benchmark.cc +++ b/cpp/benchmarks/graph_info_benchmark.cc @@ -20,7 +20,7 @@ #include "benchmark/benchmark.h" #include "./benchmark_util.h" -#include "gar/graph_info.h" +#include "graphar/graph_info.h" namespace graphar { diff --git a/cpp/examples/bfs_father_example.cc b/cpp/examples/bfs_father_example.cc index 0385c227f..10d5c9276 100644 --- a/cpp/examples/bfs_father_example.cc +++ b/cpp/examples/bfs_father_example.cc @@ -22,11 +22,11 @@ #include "arrow/api.h" #include "./config.h" -#include "gar/api.h" -#include "gar/graph.h" -#include "gar/reader/arrow_chunk_reader.h" -#include "gar/writer/arrow_chunk_writer.h" -#include "gar/writer/edges_builder.h" +#include "graphar/api.h" +#include "graphar/graph.h" +#include "graphar/reader/arrow_chunk_reader.h" +#include "graphar/writer/arrow_chunk_writer.h" +#include "graphar/writer/edges_builder.h" int main(int argc, char* argv[]) { // read file and construct graph info diff --git a/cpp/examples/bfs_pull_example.cc b/cpp/examples/bfs_pull_example.cc index 029266655..f247d6c36 100644 --- a/cpp/examples/bfs_pull_example.cc +++ b/cpp/examples/bfs_pull_example.cc @@ -22,10 +22,10 @@ #include "arrow/api.h" #include "./config.h" -#include "gar/api.h" -#include "gar/graph.h" -#include "gar/reader/arrow_chunk_reader.h" -#include "gar/writer/arrow_chunk_writer.h" +#include "graphar/api.h" +#include "graphar/graph.h" +#include "graphar/reader/arrow_chunk_reader.h" +#include "graphar/writer/arrow_chunk_writer.h" int main(int argc, char* argv[]) { // read file and construct graph info diff --git a/cpp/examples/bfs_push_example.cc b/cpp/examples/bfs_push_example.cc index f95ac2372..cdfb861df 100644 --- a/cpp/examples/bfs_push_example.cc +++ b/cpp/examples/bfs_push_example.cc @@ -22,10 +22,10 @@ #include "arrow/api.h" #include "./config.h" -#include "gar/api.h" -#include "gar/graph.h" -#include "gar/reader/arrow_chunk_reader.h" -#include "gar/writer/arrow_chunk_writer.h" +#include "graphar/api.h" +#include "graphar/graph.h" +#include "graphar/reader/arrow_chunk_reader.h" +#include "graphar/writer/arrow_chunk_writer.h" int main(int argc, char* argv[]) { // read file and construct graph info diff --git a/cpp/examples/bfs_stream_example.cc b/cpp/examples/bfs_stream_example.cc index b0d324d14..9abe4021e 100644 --- a/cpp/examples/bfs_stream_example.cc +++ b/cpp/examples/bfs_stream_example.cc @@ -22,10 +22,10 @@ #include "arrow/api.h" #include "./config.h" -#include "gar/api.h" -#include "gar/graph.h" -#include "gar/reader/arrow_chunk_reader.h" -#include "gar/writer/arrow_chunk_writer.h" +#include "graphar/api.h" +#include "graphar/graph.h" +#include "graphar/reader/arrow_chunk_reader.h" +#include "graphar/writer/arrow_chunk_writer.h" int main(int argc, char* argv[]) { // read file and construct graph info diff --git a/cpp/examples/bgl_example.cc b/cpp/examples/bgl_example.cc index 32ce2b947..dd2e6afaf 100644 --- a/cpp/examples/bgl_example.cc +++ b/cpp/examples/bgl_example.cc @@ -26,11 +26,11 @@ #include "arrow/api.h" #include "./config.h" -#include "gar/api.h" -#include "gar/graph.h" -#include "gar/reader/arrow_chunk_reader.h" -#include "gar/writer/arrow_chunk_writer.h" -#include "gar/writer/vertices_builder.h" +#include "graphar/api.h" +#include "graphar/graph.h" +#include "graphar/reader/arrow_chunk_reader.h" +#include "graphar/writer/arrow_chunk_writer.h" +#include "graphar/writer/vertices_builder.h" int main(int argc, char* argv[]) { // read file and construct graph info diff --git a/cpp/examples/cc_push_example.cc b/cpp/examples/cc_push_example.cc index 64ec0c5ca..1a8bdacd2 100644 --- a/cpp/examples/cc_push_example.cc +++ b/cpp/examples/cc_push_example.cc @@ -23,10 +23,10 @@ #include "arrow/api.h" #include "./config.h" -#include "gar/api.h" -#include "gar/graph.h" -#include "gar/reader/arrow_chunk_reader.h" -#include "gar/writer/arrow_chunk_writer.h" +#include "graphar/api.h" +#include "graphar/graph.h" +#include "graphar/reader/arrow_chunk_reader.h" +#include "graphar/writer/arrow_chunk_writer.h" int main(int argc, char* argv[]) { // read file and construct graph info diff --git a/cpp/examples/cc_stream_example.cc b/cpp/examples/cc_stream_example.cc index c847c54af..4e8f0cd1e 100644 --- a/cpp/examples/cc_stream_example.cc +++ b/cpp/examples/cc_stream_example.cc @@ -23,10 +23,10 @@ #include "arrow/api.h" #include "./config.h" -#include "gar/api.h" -#include "gar/graph.h" -#include "gar/reader/arrow_chunk_reader.h" -#include "gar/writer/arrow_chunk_writer.h" +#include "graphar/api.h" +#include "graphar/graph.h" +#include "graphar/reader/arrow_chunk_reader.h" +#include "graphar/writer/arrow_chunk_writer.h" int main(int argc, char* argv[]) { // read file and construct graph info diff --git a/cpp/examples/construct_info_example.cc b/cpp/examples/construct_info_example.cc index 50732dc65..9ef6b4f5e 100644 --- a/cpp/examples/construct_info_example.cc +++ b/cpp/examples/construct_info_example.cc @@ -20,7 +20,7 @@ #include #include "./config.h" -#include "gar/api.h" +#include "graphar/api.h" int main(int argc, char* argv[]) { /*------------------construct vertex info------------------*/ diff --git a/cpp/examples/high_level_reader_example.cc b/cpp/examples/high_level_reader_example.cc index 1a1b21a1d..17283298d 100644 --- a/cpp/examples/high_level_reader_example.cc +++ b/cpp/examples/high_level_reader_example.cc @@ -23,7 +23,7 @@ #include "arrow/filesystem/api.h" #include "./config.h" -#include "gar/graph.h" +#include "graphar/graph.h" void vertices_collection( const std::shared_ptr& graph_info) { diff --git a/cpp/examples/high_level_writer_example.cc b/cpp/examples/high_level_writer_example.cc index 02fa3baed..66aa83e19 100644 --- a/cpp/examples/high_level_writer_example.cc +++ b/cpp/examples/high_level_writer_example.cc @@ -23,9 +23,9 @@ #include "arrow/filesystem/api.h" #include "./config.h" -#include "gar/api.h" -#include "gar/writer/edges_builder.h" -#include "gar/writer/vertices_builder.h" +#include "graphar/api.h" +#include "graphar/writer/edges_builder.h" +#include "graphar/writer/vertices_builder.h" void vertices_builder() { // construct vertices builder diff --git a/cpp/examples/low_level_reader_example.cc b/cpp/examples/low_level_reader_example.cc index be9cebc94..5e68a2674 100644 --- a/cpp/examples/low_level_reader_example.cc +++ b/cpp/examples/low_level_reader_example.cc @@ -23,8 +23,8 @@ #include "arrow/filesystem/api.h" #include "./config.h" -#include "gar/api.h" -#include "gar/reader/chunk_info_reader.h" +#include "graphar/api.h" +#include "graphar/reader/chunk_info_reader.h" void vertex_property_chunk_info_reader( const std::shared_ptr& graph_info) { diff --git a/cpp/examples/mid_level_reader_example.cc b/cpp/examples/mid_level_reader_example.cc index edcbaf39e..f273fb4c8 100644 --- a/cpp/examples/mid_level_reader_example.cc +++ b/cpp/examples/mid_level_reader_example.cc @@ -23,9 +23,9 @@ #include "arrow/filesystem/api.h" #include "./config.h" -#include "gar/api.h" -#include "gar/reader/arrow_chunk_reader.h" -#include "gar/util/expression.h" +#include "graphar/api.h" +#include "graphar/reader/arrow_chunk_reader.h" +#include "graphar/util/expression.h" void vertex_property_chunk_reader( const std::shared_ptr& graph_info) { diff --git a/cpp/examples/mid_level_writer_example.cc b/cpp/examples/mid_level_writer_example.cc index f1862fb1d..4f678e61e 100644 --- a/cpp/examples/mid_level_writer_example.cc +++ b/cpp/examples/mid_level_writer_example.cc @@ -24,8 +24,8 @@ #include "arrow/result.h" #include "./config.h" -#include "gar/api.h" -#include "gar/writer/arrow_chunk_writer.h" +#include "graphar/api.h" +#include "graphar/writer/arrow_chunk_writer.h" arrow::Result> generate_vertex_table() { // property "id" diff --git a/cpp/examples/pagerank_example.cc b/cpp/examples/pagerank_example.cc index 3935ff62b..fc3c729cb 100644 --- a/cpp/examples/pagerank_example.cc +++ b/cpp/examples/pagerank_example.cc @@ -23,10 +23,10 @@ #include "arrow/filesystem/api.h" #include "./config.h" -#include "gar/api.h" -#include "gar/graph.h" -#include "gar/reader/arrow_chunk_reader.h" -#include "gar/writer/arrow_chunk_writer.h" +#include "graphar/api.h" +#include "graphar/graph.h" +#include "graphar/reader/arrow_chunk_reader.h" +#include "graphar/writer/arrow_chunk_writer.h" int main(int argc, char* argv[]) { // read file and construct graph info diff --git a/cpp/examples/snap_dataset_to_graphar.cc b/cpp/examples/snap_dataset_to_graphar.cc index a59a327ad..c26583dab 100644 --- a/cpp/examples/snap_dataset_to_graphar.cc +++ b/cpp/examples/snap_dataset_to_graphar.cc @@ -21,9 +21,9 @@ #include #include "./config.h" -#include "gar/api.h" -#include "gar/writer/edges_builder.h" -#include "gar/writer/vertices_builder.h" +#include "graphar/api.h" +#include "graphar/writer/edges_builder.h" +#include "graphar/writer/vertices_builder.h" // using facebook_combined.txt from SNAP dataset // available at https://snap.stanford.edu/data/ego-Facebook.html diff --git a/cpp/gar-config-version.in.cmake b/cpp/graphar-config-version.in.cmake similarity index 96% rename from cpp/gar-config-version.in.cmake rename to cpp/graphar-config-version.in.cmake index d8209f05c..9e6f1cce8 100644 --- a/cpp/gar-config-version.in.cmake +++ b/cpp/graphar-config-version.in.cmake @@ -15,7 +15,7 @@ # specific language governing permissions and limitations # under the License. -set(PACKAGE_VERSION "@GAR_VERSION@") +set(PACKAGE_VERSION "@GRAPHAR_VERSION@") # Check whether the requested PACKAGE_FIND_VERSION is compatible if("${PACKAGE_VERSION}" VERSION_LESS "${PACKAGE_FIND_VERSION}") diff --git a/cpp/gar-config.in.cmake b/cpp/graphar-config.in.cmake similarity index 63% rename from cpp/gar-config.in.cmake rename to cpp/graphar-config.in.cmake index 184d1ee4a..05bb4d541 100644 --- a/cpp/gar-config.in.cmake +++ b/cpp/graphar-config.in.cmake @@ -15,17 +15,17 @@ # specific language governing permissions and limitations # under the License. -# - Config file for the gar package +# - Config file for the graphar package # # It defines the following variables # -# GAR_INCLUDE_DIR - include directory for gar -# GAR_INCLUDE_DIRS - include directories for gar -# GAR_LIBRARIES - libraries to link against +# GRAPHAR_INCLUDE_DIR - include directory for graphar +# GRAPHAR_INCLUDE_DIRS - include directories for graphar +# GRAPHAR_LIBRARIES - libraries to link against -set(GAR_HOME "${CMAKE_CURRENT_LIST_DIR}/../../..") -include("${CMAKE_CURRENT_LIST_DIR}/gar-targets.cmake") +set(GRAPHAR_HOME "${CMAKE_CURRENT_LIST_DIR}/../../..") +include("${CMAKE_CURRENT_LIST_DIR}/graphar-targets.cmake") -set(GAR_LIBRARIES gar) -set(GAR_INCLUDE_DIR "${GAR_HOME}/include") -set(GAR_INCLUDE_DIRS "${GAR_INCLUDE_DIR}") +set(GRAPHAR_LIBRARIES graphar) +set(GRAPHAR_INCLUDE_DIR "${GRAPHAR_HOME}/include") +set(GRAPHAR_INCLUDE_DIRS "${GRAPHAR_INCLUDE_DIR}") diff --git a/cpp/include/gar/api.h b/cpp/include/graphar/api.h similarity index 65% rename from cpp/include/gar/api.h rename to cpp/include/graphar/api.h index e09f764ac..8a61add6d 100644 --- a/cpp/include/gar/api.h +++ b/cpp/include/graphar/api.h @@ -19,15 +19,15 @@ #pragma once -#include "gar/graph_info.h" -#include "gar/util/adj_list_type.h" -#include "gar/util/data_type.h" -#include "gar/util/file_type.h" -#include "gar/util/filesystem.h" -#include "gar/util/general_params.h" -#include "gar/util/macros.h" -#include "gar/util/result.h" -#include "gar/util/status.h" -#include "gar/util/util.h" -#include "gar/util/version_parser.h" -#include "gar/util/yaml.h" +#include "graphar/graph_info.h" +#include "graphar/util/adj_list_type.h" +#include "graphar/util/data_type.h" +#include "graphar/util/file_type.h" +#include "graphar/util/filesystem.h" +#include "graphar/util/general_params.h" +#include "graphar/util/macros.h" +#include "graphar/util/result.h" +#include "graphar/util/status.h" +#include "graphar/util/util.h" +#include "graphar/util/version_parser.h" +#include "graphar/util/yaml.h" diff --git a/cpp/include/gar/fwd.h b/cpp/include/graphar/fwd.h similarity index 99% rename from cpp/include/gar/fwd.h rename to cpp/include/graphar/fwd.h index a942ab74f..7936f5a53 100644 --- a/cpp/include/gar/fwd.h +++ b/cpp/include/graphar/fwd.h @@ -27,8 +27,8 @@ #include "result/result.hpp" -#include "gar/util/macros.h" -#include "gar/util/status.h" +#include "graphar/util/macros.h" +#include "graphar/util/status.h" namespace graphar { diff --git a/cpp/include/gar/graph.h b/cpp/include/graphar/graph.h similarity index 99% rename from cpp/include/gar/graph.h rename to cpp/include/graphar/graph.h index 7853cb712..23f2d75a3 100644 --- a/cpp/include/gar/graph.h +++ b/cpp/include/graphar/graph.h @@ -28,12 +28,12 @@ #include #include -#include "gar/graph_info.h" -#include "gar/reader/arrow_chunk_reader.h" -#include "gar/util/adj_list_type.h" -#include "gar/util/filesystem.h" -#include "gar/util/reader_util.h" -#include "gar/util/util.h" +#include "graphar/graph_info.h" +#include "graphar/reader/arrow_chunk_reader.h" +#include "graphar/util/adj_list_type.h" +#include "graphar/util/filesystem.h" +#include "graphar/util/reader_util.h" +#include "graphar/util/util.h" // forward declarations namespace arrow { diff --git a/cpp/include/gar/graph_info.h b/cpp/include/graphar/graph_info.h similarity index 99% rename from cpp/include/gar/graph_info.h rename to cpp/include/graphar/graph_info.h index 60d40603b..3ce858e83 100644 --- a/cpp/include/gar/graph_info.h +++ b/cpp/include/graphar/graph_info.h @@ -24,7 +24,7 @@ #include #include -#include "gar/fwd.h" +#include "graphar/fwd.h" namespace graphar { diff --git a/cpp/include/gar/reader/arrow_chunk_reader.h b/cpp/include/graphar/reader/arrow_chunk_reader.h similarity index 99% rename from cpp/include/gar/reader/arrow_chunk_reader.h rename to cpp/include/graphar/reader/arrow_chunk_reader.h index 908ed6431..b0c90516d 100644 --- a/cpp/include/gar/reader/arrow_chunk_reader.h +++ b/cpp/include/graphar/reader/arrow_chunk_reader.h @@ -24,8 +24,8 @@ #include #include -#include "gar/fwd.h" -#include "gar/util/reader_util.h" +#include "graphar/fwd.h" +#include "graphar/util/reader_util.h" // forward declaration namespace arrow { diff --git a/cpp/include/gar/reader/chunk_info_reader.h b/cpp/include/graphar/reader/chunk_info_reader.h similarity index 99% rename from cpp/include/gar/reader/chunk_info_reader.h rename to cpp/include/graphar/reader/chunk_info_reader.h index 28c98253a..94c537619 100644 --- a/cpp/include/gar/reader/chunk_info_reader.h +++ b/cpp/include/graphar/reader/chunk_info_reader.h @@ -23,7 +23,7 @@ #include #include -#include "gar/fwd.h" +#include "graphar/fwd.h" namespace graphar { diff --git a/cpp/include/gar/util/adj_list_type.h b/cpp/include/graphar/util/adj_list_type.h similarity index 99% rename from cpp/include/gar/util/adj_list_type.h rename to cpp/include/graphar/util/adj_list_type.h index 268fc128e..0da04dd00 100644 --- a/cpp/include/gar/util/adj_list_type.h +++ b/cpp/include/graphar/util/adj_list_type.h @@ -23,7 +23,7 @@ #include #include -#include "gar/util/macros.h" +#include "graphar/util/macros.h" namespace graphar { diff --git a/cpp/include/gar/util/convert_to_arrow_type.h b/cpp/include/graphar/util/convert_to_arrow_type.h similarity index 99% rename from cpp/include/gar/util/convert_to_arrow_type.h rename to cpp/include/graphar/util/convert_to_arrow_type.h index 8dd621711..764801a64 100644 --- a/cpp/include/gar/util/convert_to_arrow_type.h +++ b/cpp/include/graphar/util/convert_to_arrow_type.h @@ -25,7 +25,7 @@ #include "arrow/api.h" #include "arrow/type.h" -#include "gar/util/data_type.h" +#include "graphar/util/data_type.h" namespace graphar { diff --git a/cpp/include/gar/util/data_type.h b/cpp/include/graphar/util/data_type.h similarity index 99% rename from cpp/include/gar/util/data_type.h rename to cpp/include/graphar/util/data_type.h index cff29c6ff..1b803ff39 100644 --- a/cpp/include/gar/util/data_type.h +++ b/cpp/include/graphar/util/data_type.h @@ -24,7 +24,7 @@ #include #include -#include "gar/util/macros.h" +#include "graphar/util/macros.h" // forward declaration namespace arrow { diff --git a/cpp/include/gar/util/expression.h b/cpp/include/graphar/util/expression.h similarity index 99% rename from cpp/include/gar/util/expression.h rename to cpp/include/graphar/util/expression.h index db56e264e..3b784a137 100644 --- a/cpp/include/gar/util/expression.h +++ b/cpp/include/graphar/util/expression.h @@ -24,7 +24,7 @@ #include "arrow/compute/api.h" -#include "gar/graph_info.h" +#include "graphar/graph_info.h" namespace graphar { diff --git a/cpp/include/gar/util/file_type.h b/cpp/include/graphar/util/file_type.h similarity index 96% rename from cpp/include/gar/util/file_type.h rename to cpp/include/graphar/util/file_type.h index b2f4d2fbf..f1d08daa9 100644 --- a/cpp/include/gar/util/file_type.h +++ b/cpp/include/graphar/util/file_type.h @@ -23,8 +23,8 @@ #include #include -#include "gar/fwd.h" -#include "gar/util/macros.h" +#include "graphar/fwd.h" +#include "graphar/util/macros.h" namespace graphar { diff --git a/cpp/include/gar/util/filesystem.h b/cpp/include/graphar/util/filesystem.h similarity index 96% rename from cpp/include/gar/util/filesystem.h rename to cpp/include/graphar/util/filesystem.h index be6a23145..c929e7275 100644 --- a/cpp/include/gar/util/filesystem.h +++ b/cpp/include/graphar/util/filesystem.h @@ -24,12 +24,12 @@ #include #include -#include "gar/util/file_type.h" -#include "gar/util/result.h" -#include "gar/util/status.h" -#include "gar/util/util.h" +#include "graphar/util/file_type.h" +#include "graphar/util/result.h" +#include "graphar/util/status.h" +#include "graphar/util/util.h" -#include "gar/util/reader_util.h" +#include "graphar/util/reader_util.h" // forward declarations namespace arrow { diff --git a/cpp/include/gar/util/general_params.h b/cpp/include/graphar/util/general_params.h similarity index 100% rename from cpp/include/gar/util/general_params.h rename to cpp/include/graphar/util/general_params.h diff --git a/cpp/include/gar/util/macros.h b/cpp/include/graphar/util/macros.h similarity index 100% rename from cpp/include/gar/util/macros.h rename to cpp/include/graphar/util/macros.h diff --git a/cpp/include/gar/util/reader_util.h b/cpp/include/graphar/util/reader_util.h similarity index 99% rename from cpp/include/gar/util/reader_util.h rename to cpp/include/graphar/util/reader_util.h index 17bbcd692..c71d6438b 100644 --- a/cpp/include/gar/util/reader_util.h +++ b/cpp/include/graphar/util/reader_util.h @@ -24,7 +24,7 @@ #include #include -#include "gar/fwd.h" +#include "graphar/fwd.h" namespace graphar { diff --git a/cpp/include/gar/util/result.h b/cpp/include/graphar/util/result.h similarity index 98% rename from cpp/include/gar/util/result.h rename to cpp/include/graphar/util/result.h index 088291b4b..7db360140 100644 --- a/cpp/include/gar/util/result.h +++ b/cpp/include/graphar/util/result.h @@ -21,8 +21,8 @@ #include -#include "gar/fwd.h" -#include "gar/util/status.h" +#include "graphar/fwd.h" +#include "graphar/util/status.h" #define GAR_ASSIGN_OR_RAISE_IMPL(result_name, lhs, rexpr) \ auto&& result_name = (rexpr); \ diff --git a/cpp/include/gar/util/status.h b/cpp/include/graphar/util/status.h similarity index 99% rename from cpp/include/gar/util/status.h rename to cpp/include/graphar/util/status.h index fd603034a..840db81ec 100644 --- a/cpp/include/gar/util/status.h +++ b/cpp/include/graphar/util/status.h @@ -23,7 +23,7 @@ #include #include -#include "gar/util/macros.h" +#include "graphar/util/macros.h" #define GAR_RETURN_IF_(condition, status, _) \ do { \ diff --git a/cpp/include/gar/util/util.h b/cpp/include/graphar/util/util.h similarity index 99% rename from cpp/include/gar/util/util.h rename to cpp/include/graphar/util/util.h index 56f85b0f8..0ff1f3d58 100644 --- a/cpp/include/gar/util/util.h +++ b/cpp/include/graphar/util/util.h @@ -25,7 +25,7 @@ #include #include -#include "gar/util/result.h" +#include "graphar/util/result.h" #define REGULAR_SEPARATOR "_" diff --git a/cpp/include/gar/util/version_parser.h b/cpp/include/graphar/util/version_parser.h similarity index 99% rename from cpp/include/gar/util/version_parser.h rename to cpp/include/graphar/util/version_parser.h index da3924ba8..6f733a9d0 100644 --- a/cpp/include/gar/util/version_parser.h +++ b/cpp/include/graphar/util/version_parser.h @@ -25,7 +25,7 @@ #include #include -#include "gar/util/result.h" +#include "graphar/util/result.h" namespace graphar { diff --git a/cpp/include/gar/util/writer_util.h b/cpp/include/graphar/util/writer_util.h similarity index 97% rename from cpp/include/gar/util/writer_util.h rename to cpp/include/graphar/util/writer_util.h index ca4d66f5d..55bbd0ff3 100644 --- a/cpp/include/gar/util/writer_util.h +++ b/cpp/include/graphar/util/writer_util.h @@ -19,7 +19,7 @@ #pragma once -#include "gar/util/macros.h" +#include "graphar/util/macros.h" namespace graphar { diff --git a/cpp/include/gar/util/yaml.h b/cpp/include/graphar/util/yaml.h similarity index 98% rename from cpp/include/gar/util/yaml.h rename to cpp/include/graphar/util/yaml.h index 8c34e9ecf..54551cacb 100644 --- a/cpp/include/gar/util/yaml.h +++ b/cpp/include/graphar/util/yaml.h @@ -23,7 +23,7 @@ #include #include -#include "gar/util/result.h" +#include "graphar/util/result.h" // forward declaration namespace Yaml { diff --git a/cpp/include/gar/writer/arrow_chunk_writer.h b/cpp/include/graphar/writer/arrow_chunk_writer.h similarity index 99% rename from cpp/include/gar/writer/arrow_chunk_writer.h rename to cpp/include/graphar/writer/arrow_chunk_writer.h index e6ba16050..0a0496bc2 100644 --- a/cpp/include/gar/writer/arrow_chunk_writer.h +++ b/cpp/include/graphar/writer/arrow_chunk_writer.h @@ -23,8 +23,8 @@ #include #include -#include "gar/fwd.h" -#include "gar/util/writer_util.h" +#include "graphar/fwd.h" +#include "graphar/util/writer_util.h" // forward declaration namespace arrow { diff --git a/cpp/include/gar/writer/edges_builder.h b/cpp/include/graphar/writer/edges_builder.h similarity index 98% rename from cpp/include/gar/writer/edges_builder.h rename to cpp/include/graphar/writer/edges_builder.h index c6658f1f2..ce17c341f 100644 --- a/cpp/include/gar/writer/edges_builder.h +++ b/cpp/include/graphar/writer/edges_builder.h @@ -27,10 +27,10 @@ #include #include -#include "gar/fwd.h" -#include "gar/graph_info.h" -#include "gar/util/adj_list_type.h" -#include "gar/writer/arrow_chunk_writer.h" +#include "graphar/fwd.h" +#include "graphar/graph_info.h" +#include "graphar/util/adj_list_type.h" +#include "graphar/writer/arrow_chunk_writer.h" namespace arrow { class Array; diff --git a/cpp/include/gar/writer/vertices_builder.h b/cpp/include/graphar/writer/vertices_builder.h similarity index 98% rename from cpp/include/gar/writer/vertices_builder.h rename to cpp/include/graphar/writer/vertices_builder.h index 5061467be..8ca13366f 100644 --- a/cpp/include/gar/writer/vertices_builder.h +++ b/cpp/include/graphar/writer/vertices_builder.h @@ -26,9 +26,9 @@ #include #include -#include "gar/graph_info.h" -#include "gar/util/result.h" -#include "gar/writer/arrow_chunk_writer.h" +#include "graphar/graph_info.h" +#include "graphar/util/result.h" +#include "graphar/writer/arrow_chunk_writer.h" // forward declaration namespace arrow { diff --git a/cpp/src/arrow_chunk_reader.cc b/cpp/src/arrow_chunk_reader.cc index 08360c7f3..40a88163d 100644 --- a/cpp/src/arrow_chunk_reader.cc +++ b/cpp/src/arrow_chunk_reader.cc @@ -20,16 +20,16 @@ #include "arrow/api.h" #include "arrow/compute/api.h" -#include "gar/graph_info.h" -#include "gar/reader/arrow_chunk_reader.h" -#include "gar/util/adj_list_type.h" -#include "gar/util/data_type.h" -#include "gar/util/filesystem.h" -#include "gar/util/general_params.h" -#include "gar/util/reader_util.h" -#include "gar/util/result.h" -#include "gar/util/status.h" -#include "gar/util/util.h" +#include "graphar/graph_info.h" +#include "graphar/reader/arrow_chunk_reader.h" +#include "graphar/util/adj_list_type.h" +#include "graphar/util/data_type.h" +#include "graphar/util/filesystem.h" +#include "graphar/util/general_params.h" +#include "graphar/util/reader_util.h" +#include "graphar/util/result.h" +#include "graphar/util/status.h" +#include "graphar/util/util.h" namespace graphar { diff --git a/cpp/src/arrow_chunk_writer.cc b/cpp/src/arrow_chunk_writer.cc index f5c262d88..b62e496e2 100644 --- a/cpp/src/arrow_chunk_writer.cc +++ b/cpp/src/arrow_chunk_writer.cc @@ -32,15 +32,15 @@ #include "arrow/dataset/plan.h" #include "arrow/dataset/scanner.h" -#include "gar/graph_info.h" -#include "gar/util/adj_list_type.h" -#include "gar/util/data_type.h" -#include "gar/util/filesystem.h" -#include "gar/util/general_params.h" -#include "gar/util/result.h" -#include "gar/util/status.h" -#include "gar/util/util.h" -#include "gar/writer/arrow_chunk_writer.h" +#include "graphar/graph_info.h" +#include "graphar/util/adj_list_type.h" +#include "graphar/util/data_type.h" +#include "graphar/util/filesystem.h" +#include "graphar/util/general_params.h" +#include "graphar/util/result.h" +#include "graphar/util/status.h" +#include "graphar/util/util.h" +#include "graphar/writer/arrow_chunk_writer.h" namespace graphar { // common methods diff --git a/cpp/src/chunk_info_reader.cc b/cpp/src/chunk_info_reader.cc index c9f6a990e..13f48dc41 100644 --- a/cpp/src/chunk_info_reader.cc +++ b/cpp/src/chunk_info_reader.cc @@ -19,13 +19,13 @@ #include -#include "gar/graph_info.h" -#include "gar/reader/chunk_info_reader.h" -#include "gar/util/adj_list_type.h" -#include "gar/util/filesystem.h" -#include "gar/util/reader_util.h" -#include "gar/util/result.h" -#include "gar/util/util.h" +#include "graphar/graph_info.h" +#include "graphar/reader/chunk_info_reader.h" +#include "graphar/util/adj_list_type.h" +#include "graphar/util/filesystem.h" +#include "graphar/util/reader_util.h" +#include "graphar/util/result.h" +#include "graphar/util/util.h" namespace graphar { diff --git a/cpp/src/data_type.cc b/cpp/src/data_type.cc index 0bcad2d10..7ec8424bc 100644 --- a/cpp/src/data_type.cc +++ b/cpp/src/data_type.cc @@ -22,8 +22,8 @@ #include "arrow/api.h" #include "arrow/type.h" -#include "gar/fwd.h" -#include "gar/util/data_type.h" +#include "graphar/fwd.h" +#include "graphar/util/data_type.h" namespace graphar { diff --git a/cpp/src/edges_builder.cc b/cpp/src/edges_builder.cc index 2d0dcb762..06b2074b2 100644 --- a/cpp/src/edges_builder.cc +++ b/cpp/src/edges_builder.cc @@ -19,10 +19,10 @@ #include "arrow/api.h" -#include "gar/util/convert_to_arrow_type.h" -#include "gar/util/general_params.h" -#include "gar/util/result.h" -#include "gar/writer/edges_builder.h" +#include "graphar/util/convert_to_arrow_type.h" +#include "graphar/util/general_params.h" +#include "graphar/util/result.h" +#include "graphar/writer/edges_builder.h" namespace graphar { namespace builder { diff --git a/cpp/src/expression.cc b/cpp/src/expression.cc index 2212b06b5..f5bf89fff 100644 --- a/cpp/src/expression.cc +++ b/cpp/src/expression.cc @@ -17,8 +17,8 @@ * under the License. */ -#include "gar/util/expression.h" -#include "gar/util/result.h" +#include "graphar/util/expression.h" +#include "graphar/util/result.h" namespace graphar { diff --git a/cpp/src/filesystem.cc b/cpp/src/filesystem.cc index e0a8a4ac3..7e75e66ef 100644 --- a/cpp/src/filesystem.cc +++ b/cpp/src/filesystem.cc @@ -27,9 +27,9 @@ #include "parquet/arrow/writer.h" #include "simple-uri-parser/uri_parser.h" -#include "gar/fwd.h" -#include "gar/util/expression.h" -#include "gar/util/filesystem.h" +#include "graphar/fwd.h" +#include "graphar/util/expression.h" +#include "graphar/util/filesystem.h" namespace graphar { namespace ds = arrow::dataset; diff --git a/cpp/src/graph.cc b/cpp/src/graph.cc index e14eb41e5..c386815c6 100644 --- a/cpp/src/graph.cc +++ b/cpp/src/graph.cc @@ -17,9 +17,9 @@ * under the License. */ -#include "gar/graph.h" -#include "gar/util/adj_list_type.h" -#include "gar/util/convert_to_arrow_type.h" +#include "graphar/graph.h" +#include "graphar/util/adj_list_type.h" +#include "graphar/util/convert_to_arrow_type.h" namespace graphar { diff --git a/cpp/src/graph_info.cc b/cpp/src/graph_info.cc index c84e60154..3bf0c450f 100644 --- a/cpp/src/graph_info.cc +++ b/cpp/src/graph_info.cc @@ -21,13 +21,13 @@ #include "mini-yaml/yaml/Yaml.hpp" -#include "gar/graph_info.h" -#include "gar/util/adj_list_type.h" -#include "gar/util/data_type.h" -#include "gar/util/filesystem.h" -#include "gar/util/result.h" -#include "gar/util/version_parser.h" -#include "gar/util/yaml.h" +#include "graphar/graph_info.h" +#include "graphar/util/adj_list_type.h" +#include "graphar/util/data_type.h" +#include "graphar/util/filesystem.h" +#include "graphar/util/result.h" +#include "graphar/util/version_parser.h" +#include "graphar/util/yaml.h" namespace graphar { diff --git a/cpp/src/reader_util.cc b/cpp/src/reader_util.cc index 554985295..43cc85949 100644 --- a/cpp/src/reader_util.cc +++ b/cpp/src/reader_util.cc @@ -24,11 +24,11 @@ #include "arrow/io/api.h" #include "parquet/arrow/reader.h" -#include "gar/graph_info.h" -#include "gar/util/adj_list_type.h" -#include "gar/util/expression.h" -#include "gar/util/filesystem.h" -#include "gar/util/reader_util.h" +#include "graphar/graph_info.h" +#include "graphar/util/adj_list_type.h" +#include "graphar/util/expression.h" +#include "graphar/util/filesystem.h" +#include "graphar/util/reader_util.h" namespace graphar { diff --git a/cpp/src/util.cc b/cpp/src/util.cc index e948dab47..0f7ad9c96 100644 --- a/cpp/src/util.cc +++ b/cpp/src/util.cc @@ -22,7 +22,7 @@ #include "arrow/api.h" -#include "gar/util/util.h" +#include "graphar/util/util.h" namespace graphar { diff --git a/cpp/src/version_parser.cc b/cpp/src/version_parser.cc index 9fb056834..130a4944e 100644 --- a/cpp/src/version_parser.cc +++ b/cpp/src/version_parser.cc @@ -21,7 +21,7 @@ #include // NOLINT #include -#include "gar/util/version_parser.h" +#include "graphar/util/version_parser.h" namespace graphar { diff --git a/cpp/src/vertices_builder.cc b/cpp/src/vertices_builder.cc index ed399c423..5d7371b43 100644 --- a/cpp/src/vertices_builder.cc +++ b/cpp/src/vertices_builder.cc @@ -17,9 +17,9 @@ * under the License. */ -#include "gar/writer/vertices_builder.h" -#include "gar/graph_info.h" -#include "gar/util/convert_to_arrow_type.h" +#include "graphar/writer/vertices_builder.h" +#include "graphar/graph_info.h" +#include "graphar/util/convert_to_arrow_type.h" namespace graphar { namespace builder { diff --git a/cpp/src/yaml.cc b/cpp/src/yaml.cc index 829fdb284..e20da01c4 100644 --- a/cpp/src/yaml.cc +++ b/cpp/src/yaml.cc @@ -22,8 +22,8 @@ #include "mini-yaml/yaml/Yaml.hpp" -#include "gar/util/result.h" -#include "gar/util/yaml.h" +#include "graphar/util/result.h" +#include "graphar/util/yaml.h" namespace graphar { diff --git a/cpp/test/test_arrow_chunk_reader.cc b/cpp/test/test_arrow_chunk_reader.cc index 0ba5c7306..9bafc9dc8 100644 --- a/cpp/test/test_arrow_chunk_reader.cc +++ b/cpp/test/test_arrow_chunk_reader.cc @@ -22,12 +22,12 @@ #include "arrow/api.h" #include "./util.h" -#include "gar/reader/arrow_chunk_reader.h" -#include "gar/util/adj_list_type.h" -#include "gar/util/data_type.h" -#include "gar/util/expression.h" -#include "gar/util/filesystem.h" -#include "gar/util/general_params.h" +#include "graphar/reader/arrow_chunk_reader.h" +#include "graphar/util/adj_list_type.h" +#include "graphar/util/data_type.h" +#include "graphar/util/expression.h" +#include "graphar/util/filesystem.h" +#include "graphar/util/general_params.h" #define CATCH_CONFIG_MAIN #include diff --git a/cpp/test/test_arrow_chunk_writer.cc b/cpp/test/test_arrow_chunk_writer.cc index d25415c42..10bbbc8cb 100644 --- a/cpp/test/test_arrow_chunk_writer.cc +++ b/cpp/test/test_arrow_chunk_writer.cc @@ -33,11 +33,11 @@ #include "parquet/arrow/writer.h" #include "./util.h" -#include "gar/graph_info.h" -#include "gar/util/adj_list_type.h" -#include "gar/util/general_params.h" -#include "gar/util/yaml.h" -#include "gar/writer/arrow_chunk_writer.h" +#include "graphar/graph_info.h" +#include "graphar/util/adj_list_type.h" +#include "graphar/util/general_params.h" +#include "graphar/util/yaml.h" +#include "graphar/writer/arrow_chunk_writer.h" #define CATCH_CONFIG_MAIN #include diff --git a/cpp/test/test_builder.cc b/cpp/test/test_builder.cc index 32e975395..3da96df80 100644 --- a/cpp/test/test_builder.cc +++ b/cpp/test/test_builder.cc @@ -34,10 +34,10 @@ #include "parquet/arrow/writer.h" #include "./util.h" -#include "gar/graph_info.h" -#include "gar/util/yaml.h" -#include "gar/writer/edges_builder.h" -#include "gar/writer/vertices_builder.h" +#include "graphar/graph_info.h" +#include "graphar/util/yaml.h" +#include "graphar/writer/edges_builder.h" +#include "graphar/writer/vertices_builder.h" #define CATCH_CONFIG_MAIN #include diff --git a/cpp/test/test_chunk_info_reader.cc b/cpp/test/test_chunk_info_reader.cc index 61d665f05..d084e091d 100644 --- a/cpp/test/test_chunk_info_reader.cc +++ b/cpp/test/test_chunk_info_reader.cc @@ -20,9 +20,9 @@ #include #include "./util.h" -#include "gar/graph_info.h" -#include "gar/reader/chunk_info_reader.h" -#include "gar/util/adj_list_type.h" +#include "graphar/graph_info.h" +#include "graphar/reader/chunk_info_reader.h" +#include "graphar/util/adj_list_type.h" #define CATCH_CONFIG_MAIN #include diff --git a/cpp/test/test_graph.cc b/cpp/test/test_graph.cc index aa083ab7b..9fda46a0c 100644 --- a/cpp/test/test_graph.cc +++ b/cpp/test/test_graph.cc @@ -20,8 +20,8 @@ #include #include "./util.h" -#include "gar/graph.h" -#include "gar/util/data_type.h" +#include "graphar/graph.h" +#include "graphar/util/data_type.h" #define CATCH_CONFIG_MAIN #include diff --git a/cpp/test/test_info.cc b/cpp/test/test_info.cc index 4d5b4a456..5d8c17efc 100644 --- a/cpp/test/test_info.cc +++ b/cpp/test/test_info.cc @@ -24,12 +24,12 @@ #include "./util.h" -#include "gar/graph_info.h" -#include "gar/util/adj_list_type.h" -#include "gar/util/data_type.h" -#include "gar/util/file_type.h" -#include "gar/util/filesystem.h" -#include "gar/util/version_parser.h" +#include "graphar/graph_info.h" +#include "graphar/util/adj_list_type.h" +#include "graphar/util/data_type.h" +#include "graphar/util/file_type.h" +#include "graphar/util/filesystem.h" +#include "graphar/util/version_parser.h" #define CATCH_CONFIG_MAIN #include diff --git a/cpp/test/util.h b/cpp/test/util.h index b88e048c5..2c40841f6 100644 --- a/cpp/test/util.h +++ b/cpp/test/util.h @@ -22,7 +22,7 @@ #include #include -#include "gar/util/status.h" +#include "graphar/util/status.h" namespace graphar { diff --git a/docs/libraries/cpp/examples/bgl.md b/docs/libraries/cpp/examples/bgl.md index 0c9a8fd4a..918cbcae4 100644 --- a/docs/libraries/cpp/examples/bgl.md +++ b/docs/libraries/cpp/examples/bgl.md @@ -77,7 +77,7 @@ std::cout << "Total number of components: " << cc_num << std::endl; ``` Finally, we could use a **VerticesBuilder** of GraphAr to write the -results to new generated GAR files: +results to new generated GraphAr format data: ``` C++ // construct a new property group diff --git a/docs/libraries/cpp/examples/graphscope.md b/docs/libraries/cpp/examples/graphscope.md index e1c996b0c..8afcc96de 100644 --- a/docs/libraries/cpp/examples/graphscope.md +++ b/docs/libraries/cpp/examples/graphscope.md @@ -16,9 +16,9 @@ with other processors via synchronous message passing. To integrate GraphAr into GraphScope, we implemented *ArrowFragmentBuilder* and *ArrowFragmentWriter*. *ArrowFragmentBuilder* -establishes the fragments for workers of GraphScope through reading GAR -files in parallel. Conversely, *ArrowFragmentWriter* can take the -GraphScope fragments and save them as GAR files. If you're interested in +establishes the fragments for workers of GraphScope through reading GraphAr +format data in parallel. Conversely, *ArrowFragmentWriter* can take the +GraphScope fragments and save them as GraphAr format files. If you're interested in knowing more about the implementation, please refer to the [source code](https://github.com/v6d-io/v6d/commit/0eda2067e45fbb4ac46892398af0edc84fe1c27b). @@ -28,7 +28,7 @@ code](https://github.com/v6d-io/v6d/commit/0eda2067e45fbb4ac46892398af0edc84fe1c The time performance of *ArrowFragmentBuilder* and *ArrowFragmentWriter* in GraphScope is heavily dependent on the partitioning of the graph into -GAR files, that is, the *vertex chunk size* and *edge chunk size*, which +GraphAr format files, that is, the *vertex chunk size* and *edge chunk size*, which are specified in the vertex information file and in the edge information file, respectively. @@ -39,7 +39,7 @@ many small files increases the overhead associated with the file system and the file parser. We have conducted micro benchmarks to compare the time performance for -reading/writing GAR files by +reading/writing GraphAr format files by *ArrowFragmentBuilder*/*ArrowFragmentWriter*, across different *vertex chunk size* and *edge chunk size* configurations. The settings we recommend for *vertex chunk size* and *edge chunk size* are **2^18** and diff --git a/docs/libraries/cpp/examples/out-of-core.md b/docs/libraries/cpp/examples/out-of-core.md index 5978f0f1b..08cf509d7 100644 --- a/docs/libraries/cpp/examples/out-of-core.md +++ b/docs/libraries/cpp/examples/out-of-core.md @@ -1,7 +1,7 @@ # Out-of-core Graph Algorithms An important application case of GraphAr is to serve out-of-core graph -processing scenarios. With the graph data saved as GAR files in the +processing scenarios. With the graph data saved as GraphAr format files in the disk, GraphAr provides a set of reading interfaces to allow to load part of graph data into memory when needed, to conduct analytics. While it is more convenient and efficient to store the entirety of the graph in diff --git a/docs/libraries/cpp/getting-started.md b/docs/libraries/cpp/getting-started.md index 5f741fb28..0ce9d196c 100644 --- a/docs/libraries/cpp/getting-started.md +++ b/docs/libraries/cpp/getting-started.md @@ -12,9 +12,9 @@ C++. To begin with, please refer to the [Building Steps](https://github.com/apache/incubator-graphar/blob/main/README.md#building-libraries) to install GraphAr. -## GAR Information Files +## Information Files -GAR uses a group of Yaml files to save the meta information for a graph. +GraphAr uses a group of Yaml files to save the meta information for a graph. ### Graph information @@ -67,7 +67,7 @@ file located inside the test data contains an example of the edge information file. -In GAR format, separate data files are used to store the structure +In GraphAr format, separate data files are used to store the structure (called adjList) and the properties for edges. The adjList type can be either of **unordered_by_source**, **unordered_by_dest**, **ordered_by_source** or **ordered_by_dest**. For a specific @@ -81,7 +81,7 @@ edges at the same time. ::: -## GAR Data Files +## Data Files ### Property data @@ -116,7 +116,7 @@ of the edges is **ordered_by_source**. ### AdjList data -The adjList in GAR describes the topology structure, i.e., the internal +The adjList in GraphAr describes the topology structure, i.e., the internal id of the source vertex and the destination vertex for each of a group of edges. As explained in [Edges in GraphAr](https://graphar.apache.org/docs/specification/format#edge-chunks-in-graphar), the edges are separated into edge chunks, and each edge chunk has its own adjList table and 0 or @@ -140,11 +140,11 @@ as an example. ::: -## How to Use GAR +## How to Use GraphAr ### Construct information -It is convenient to construct the GAR metadata and dump it to generate +It is convenient to construct the graphar metadata and dump it to generate information files. We provide an [example program](https://github.com/apache/incubator-graphar/blob/main/cpp/examples/construct_info_example.cc) located in the source code which shows how to construct and dump the @@ -172,12 +172,12 @@ if (edge_info != nullptr) { } ``` -### Read GAR files +### Read GraphAr format files -GAR supports the flexible reading of graph data, e.g., allowing to read +GraphAr supports the flexible reading of graph data, e.g., allowing to read data of a single vertex, a vertex chunk, or all vertices with a specific label. In addition, necessary property groups can be selected to read -and avoid reading all properties from the files. Furthermore, GAR +and avoid reading all properties from the files. Furthermore, GraphAr provides convenient and flexible access to adjList, offset and property chunks for edges. @@ -212,10 +212,10 @@ for (auto it = edges->begin(); it != edges->end(); ++it) { } ``` -### Write GAR files +### Write GraphAr format files -As same with the readers, the GAR writers provide different-level -methods to output the graph data in memory into GAR files. +As same with the readers, the GraphAr writers provide different-level +methods to output the graph data in memory into GraphAr format files. As the simplest cases, the fist example below adds vertices to **VerticesBuilder**, and then dumps the data to files; the second @@ -234,7 +234,7 @@ builder.AddVertex(v); // add other vertices // ... -// write to GAR files +// write to GraphAr format files builder.Dump(); ``` @@ -251,14 +251,14 @@ builder.AddEdge(e); // add other edges // ... -// write to GAR files +// write to GraphAr format files builder.Dump(); ``` ### A PageRank Example Here we will go through an example of out-of-core graph analytic -algorithms based on GAR which calculates the PageRank. Please look +algorithms based on GraphAr which calculates the PageRank. Please look [here](https://en.wikipedia.org/wiki/PageRank) if you want a detailed explanation of the PageRank algorithm. And the source code can be found at diff --git a/docs/libraries/java/how_to_develop_java.md b/docs/libraries/java/how_to_develop_java.md index b536cb549..4a4aedcde 100644 --- a/docs/libraries/java/how_to_develop_java.md +++ b/docs/libraries/java/how_to_develop_java.md @@ -63,7 +63,7 @@ build_graphar_cpp() # build the bridge JNI library add_library(${LIBNAME} SHARED ${SOURCES}) # include graphar-cpp headers -target_include_directories(${LIBNAME} SYSTEM BEFORE PRIVATE ${GAR_INCLUDE_DIR}) +target_include_directories(${LIBNAME} SYSTEM BEFORE PRIVATE ${GRAPHAR_INCLUDE_DIR}) # link graphar-cpp and arrow target_link_libraries(${LIBNAME} ${CMAKE_JNI_LINKER_FLAGS} gar_shared) target_link_libraries(${LIBNAME} ${CMAKE_JNI_LINKER_FLAGS} Arrow::arrow_static) diff --git a/docs/libraries/java/java.md b/docs/libraries/java/java.md index da3ddefe0..352a36a6e 100644 --- a/docs/libraries/java/java.md +++ b/docs/libraries/java/java.md @@ -9,7 +9,7 @@ sidebar_position: 2 Based on an efficient FFI for Java and C++ called [fastFFI](https://github.com/alibaba/fastFFI), the GraphAr Java library allows users to write Java for generating, loading and -transforming GAR files. It consists of several components: +transforming GraphAr format files. It consists of several components: - **Information Classes**: As same with in the C++ library, the information classes are implemented to construct and access the meta @@ -17,14 +17,14 @@ transforming GAR files. It consists of several components: GraphAr. - **Writers**: The GraphAr Java writer provides a set of interfaces - that can be used to write Apache Arrow VectorSchemaRoot into GAR + that can be used to write Apache Arrow VectorSchemaRoot into GraphAr format files. Every time it takes a VectorSchemaRoot as the logical table for a type of vertices or edges, then convert it to ArrowTable, and - then dumps it to standard GAR files (CSV, ORC or Parquet files) under + then dumps it to standard GraphAr format files (CSV, ORC or Parquet files) under the specific directory path. - **Readers**: The GraphAr Java reader provides a set of interfaces - that can be used to read GAR files. It reads a collection of vertices + that can be used to read GraphAr format files. It reads a collection of vertices or edges at a time and assembles the result into the ArrowTable. Similar with the reader in the C++ library, it supports the users to specify the data they need, e.g., reading a single property group @@ -139,7 +139,7 @@ adjList type should also be specified. The adjList/properties can be written alone, or alternatively, all adjList, properties, and the offset (for CSR and CSC format) chunks can be written simultaneously. -To utilize the GAR Java writer, please refer to the following example +To utilize the GraphAr Java writer, please refer to the following example code. ```java @@ -183,11 +183,11 @@ for the complete example. ### Readers The GraphAr Java reader provides an extensive set of interfaces to read -GAR files. It reads a collection of vertices or edges at a time as +GraphAr format files. It reads a collection of vertices or edges at a time as ArrowTable. Similar with the reader in C++ library, it supports the users to specify the data they need, e.g., a single property group. -To utilize the GAR Java reader, please refer to the following example +To utilize the GraphAr Java reader, please refer to the following example code. ```java diff --git a/docs/libraries/pyspark/pyspark.md b/docs/libraries/pyspark/pyspark.md index 6436d7393..502eac395 100644 --- a/docs/libraries/pyspark/pyspark.md +++ b/docs/libraries/pyspark/pyspark.md @@ -18,7 +18,7 @@ Spark. ## Overview The GraphAr PySpark library is provided for generating, loading and -transforming GAR files with PySpark. +transforming GraphAr format files with PySpark. - **Information Classes**: As same with in the C++ library, the information classes are implemented as a part of the PySpark library @@ -27,16 +27,16 @@ transforming GAR files with PySpark. - **IndexGenerator**: The IndexGenerator helps to generate the indices for vertex/edge DataFrames. In most cases, IndexGenerator is first utilized to generate the indices for a DataFrame (e.g., from primary - keys), and then this DataFrame can be written into GAR files through + keys), and then this DataFrame can be written into GraphAr format files through the writer. - **Writer**: The GraphAr PySpark writer provides a set of interfaces - that can be used to write Spark DataFrames into GAR files. Every time + that can be used to write Spark DataFrames into GraphAr format files. Every time it takes a DataFrame as the logical table for a type of vertices or edges, assembles the data in specified format (e.g., reorganize the - edges in the CSR way) and then dumps it to standard GAR files (CSV, + edges in the CSR way) and then dumps it to standard GraphAr format files (CSV, ORC or Parquet files) under the specific directory path. - **Reader**: The GraphAr PySpark reader provides a set of interfaces - that can be used to read GAR files. It reads a collection of vertices + that can be used to read GraphAr format files. It reads a collection of vertices or edges at a time and assembles the result into the Spark DataFrame. Similar with the reader in the C++ library, it supports the users to specify the data they need, e.g., reading a single property group @@ -46,15 +46,15 @@ transforming GAR files with PySpark. The GraphAr Spark library can be used in a range of scenarios: -- Taking GAR as a data source to execute SQL queries or do graph +- Taking GraphAr format data as a data source to execute SQL queries or do graph processing (e.g., using GraphX). -- Transforming data between GAR and other data sources (e.g., Hive, +- Transforming data between GraphAr format data and other data sources (e.g., Hive, Neo4j, NebulaGraph, …). -- Transforming GAR data between different file types (e.g., from ORC to +- Transforming GraphAr format data between different file types (e.g., from ORC to Parquet). -- Transforming GAR data between different adjList types (e.g., from COO +- Transforming GraphAr format data between different adjList types (e.g., from COO to CSR). -- Modifying existing GAR data (e.g., adding new vertices/edges). +- Modifying existing GraphAr format data (e.g., adding new vertices/edges). ## Get GraphAr Spark Library @@ -102,7 +102,7 @@ this JAR. // create a SparkSession from pyspark.sql import SparkSession spark = ( SparkSession .builder. … .conf(“spark-jars”, -“path-to-graphara-spark-x.x.x.jar-file”) .getOrCreate() ) +“path-to-graphar-spark-x.x.x.jar-file”) .getOrCreate() ) from graphar_pyspark import initialize initialize(spark) ``` diff --git a/docs/libraries/spark/examples.md b/docs/libraries/spark/examples.md index c9e2e56bc..144b5ca74 100644 --- a/docs/libraries/spark/examples.md +++ b/docs/libraries/spark/examples.md @@ -7,21 +7,21 @@ sidebar_position: 1 ## Co-Work with Apache Spark -[Apache Spark](https://spark.apache.org/) is a multi-language engine for executing data engineering, data science, and machine learning on single-node machines or clusters. The GraphAr Spark library is developed to make the integration of GraphAr with Spark easy. This library allows users to efficiently generate, load, and transform GAR files, and to integrate GraphAr with other Spark-compatible systems. +[Apache Spark](https://spark.apache.org/) is a multi-language engine for executing data engineering, data science, and machine learning on single-node machines or clusters. The GraphAr Spark library is developed to make the integration of GraphAr with Spark easy. This library allows users to efficiently generate, load, and transform GraphAr format files, and to integrate GraphAr with other Spark-compatible systems. Examples of this co-working integration have been provided as showcases. ### Examples -### Transform GAR files +### Transform GraphAr format files We provide an example in [TestGraphTransformer.scala][test-graph-transformer], which demonstrates how to conduct data transformation at the graph level. [TransformExample.scala][transformer-example] is another example for graph data conversion between different file types or different adjList types, which is implemented at the vertex/edge table level. To do this, the original data is first loaded into a Spark DataFrame using the GraphAr Spark Reader. -Then, the DataFrame is written into generated GAR files through a GraphAr Spark Writer, +Then, the DataFrame is written into generated GraphAr format files through a GraphAr Spark Writer, following the meta data defined in a new information file. @@ -29,7 +29,7 @@ following the meta data defined in a new information file. Another important use case of GraphAr is to use it as a data source for graph computing or analytics; [ComputeExample.scala][compute-example] provides an example of constructing -a GraphX graph from reading GAR files and executing a connected-components computation. +a GraphX graph from reading GraphAr format files and executing a connected-components computation. Also, executing queries with Spark SQL and running other graph analytic algorithms can be implemented in a similar fashion. @@ -68,7 +68,7 @@ def main(args: Array[String]): Unit = { // put movie graph data into writer readAndPutDataIntoWriter(writer, spark) - // write in graphar format + // write in GraphAr format val outputPath: String = args(0) val vertexChunkSize: Long = args(1).toLong val edgeChunkSize: Long = args(2).toLong diff --git a/docs/libraries/spark/spark.md b/docs/libraries/spark/spark.md index 82c2bb456..7043005df 100644 --- a/docs/libraries/spark/spark.md +++ b/docs/libraries/spark/spark.md @@ -6,22 +6,22 @@ sidebar_position: 3 ## Overview -The GraphAr Spark library is provided for generating, loading and transforming GAR files with Apache Spark easy. It consists of several components: +The GraphAr Spark library is provided for generating, loading and transforming GraphAr format files with Apache Spark easy. It consists of several components: - **Information Classes**: As same with in the C++ library, the information classes are implemented as a part of the Spark library for constructing and accessing the meta information about the graphs, vertices and edges in GraphAr. -- **IndexGenerator**: The IndexGenerator helps to generate the indices for vertex/edge DataFrames. In most cases, IndexGenerator is first utilized to generate the indices for a DataFrame (e.g., from primary keys), and then this DataFrame can be written into GAR files through the writer. -- **Writer**: The GraphAr Spark writer provides a set of interfaces that can be used to write Spark DataFrames into GAR files. Every time it takes a DataFrame as the logical table for a type of vertices or edges, assembles the data in specified format (e.g., reorganize the edges in the CSR way) and then dumps it to standard GAR files (CSV, ORC or Parquet files) under the specific directory path. -- **Reader**: The GraphAr Spark reader provides a set of interfaces that can be used to read GAR files. It reads a collection of vertices or edges at a time and assembles the result into the Spark DataFrame. Similar with the reader in the C++ library, it supports the users to specify the data they need, e.g., reading a single property group instead of all properties. +- **IndexGenerator**: The IndexGenerator helps to generate the indices for vertex/edge DataFrames. In most cases, IndexGenerator is first utilized to generate the indices for a DataFrame (e.g., from primary keys), and then this DataFrame can be written into GraphAr format files through the writer. +- **Writer**: The GraphAr Spark writer provides a set of interfaces that can be used to write Spark DataFrames into GraphAr format files. Every time it takes a DataFrame as the logical table for a type of vertices or edges, assembles the data in specified format (e.g., reorganize the edges in the CSR way) and then dumps it to standard GraphAr format files (CSV, ORC or Parquet files) under the specific directory path. +- **Reader**: The GraphAr Spark reader provides a set of interfaces that can be used to read GraphAr format files. It reads a collection of vertices or edges at a time and assembles the result into the Spark DataFrame. Similar with the reader in the C++ library, it supports the users to specify the data they need, e.g., reading a single property group instead of all properties. ## Use Cases The GraphAr Spark library can be used in a range of scenarios: -- Taking GAR as a data source to execute SQL queries or do graph processing (e.g., using GraphX). -- Transforming data between GAR and other data sources (e.g., Hive, Neo4j, NebulaGraph, ...). -- Transforming GAR data between different file types (e.g., from ORC to Parquet). -- Transforming GAR data between different adjList types (e.g., from COO to CSR). -- Modifying existing GAR data (e.g., adding new vertices/edges). +- Taking GraphAr format as a data source to execute SQL queries or do graph processing (e.g., using GraphX). +- Transforming data between GraphAr format and other data sources (e.g., Hive, Neo4j, NebulaGraph, ...). +- Transforming GraphAr format data between different file types (e.g., from ORC to Parquet). +- Transforming GraphAr format data between different adjList types (e.g., from COO to CSR). +- Modifying existing GraphAr format data (e.g., adding new vertices/edges). For more information on its usage, please refer to the [Examples](examples.md). @@ -80,10 +80,10 @@ See [TestGraphInfo.scala][test-graph-info] for the complete example. The GraphAr file format assigns each vertex with a unique index inside the vertex type (which called internal vertex id) starting from 0 and increasing continuously for each type of vertex (i.e., with the same vertex label). However, the vertex/edge tables in Spark often lack this information, requiring special attention. For example, an edge table typically uses the primary key (e.g., "id", which is a string) to identify its source and destination vertices. -To address this issue, the GraphAr Spark library offers the IndexGenerator which is used to generate indices for vertex/edge DataFrames. For a vertex DataFrame, a mapping from the primary keys to GAR indices can be constructed, or an index column can be generated directly if no primary keys are available. For an edge DataFrame, source and destination columns can be generated from the vertex index mapping (when the end vertices are represented by the primary keys), or they may be generated directly without the mapping. +To address this issue, the GraphAr Spark library offers the IndexGenerator which is used to generate indices for vertex/edge DataFrames. For a vertex DataFrame, a mapping from the primary keys to indices can be constructed, or an index column can be generated directly if no primary keys are available. For an edge DataFrame, source and destination columns can be generated from the vertex index mapping (when the end vertices are represented by the primary keys), or they may be generated directly without the mapping. > **tip:** -> In most cases, IndexGenerator is first utilized to generate the indices for a DataFrame, and then this DataFrame can be written into GAR files through the writer. +> In most cases, IndexGenerator is first utilized to generate the indices for a DataFrame, and then this DataFrame can be written into GraphAr format files through the writer. To utilize IndexGenerator, please refer to the following example code. @@ -111,7 +111,7 @@ See [TestIndexGenerator.scala][test-index-generator] for the complete example. The GraphAr Spark writer provides the necessary Spark interfaces to write DataFrames into GraphAr formatted files in a batch-import fashion. With the VertexWriter, users can specify a particular property group to be written into its corresponding chunks, or choose to write all property groups. For edge chunks, besides the meta data (edge info), the adjList type should also be specified. The adjList/properties can be written alone, or alternatively, all adjList, properties, and the offset (for CSR and CSC format) chunks can be written simultaneously. -To utilize the GAR Spark writer, please refer to the following example code. +To utilize the GraphAr Spark writer, please refer to the following example code. ```scala // generate the vertex index column for vertex DataFrame @@ -148,11 +148,11 @@ See [TestWriter.scala][test-writer] for the complete example. ### Reader -The GraphAr Spark reader provides an extensive set of interfaces to read GAR files. It reads a collection of vertices or edges at a time and assembles the result into the Spark DataFrame. Similar with the reader in C++ library, it supports the users to specify the data they need, e.g., a single property group. +The GraphAr Spark reader provides an extensive set of interfaces to read GraphAr format files. It reads a collection of vertices or edges at a time and assembles the result into the Spark DataFrame. Similar with the reader in C++ library, it supports the users to specify the data they need, e.g., a single property group. -After content has been read into the Spark DataFrame, users can leverage it to do graph processing, execute SQL queries or perform various transformations (such as adding new vertices/edges, reorganizing the edge order, and changing the file type) and then write it back into GAR files if desired. +After content has been read into the Spark DataFrame, users can leverage it to do graph processing, execute SQL queries or perform various transformations (such as adding new vertices/edges, reorganizing the edge order, and changing the file type) and then write it back into GraphAr format files if desired. -To utilize the GAR Spark reader, please refer to the following example code. +To utilize the GraphAr Spark reader, please refer to the following example code. ```scala // construct the vertex reader @@ -188,7 +188,7 @@ To improve the usability of the GraphAr Spark library, a set of APIs are provide The Graph Reader is a helper object which enables users to read all the chunk files from GraphAr for a single graph. The only input required is a GraphInfo object or the path to the information yaml file. On successful completion, it returns a set of vertex DataFrames and edge DataFrames, each of which can be accessed by specifying the vertex/edge label. The Graph Writer is used for writing all vertex DataFrames and edge DataFrames of a graph to generate GraphAr chunk files. For more details, please refer to the [API Reference](https://graphar.apache.org/docs/spark/). -The Graph Transformer is a helper object in the GraphAr Spark library, designed to assist with data transformation at the graph level. It takes two GraphInfo objects (or paths of two yaml files) as inputs: one for the source graph, and one for the destination graph. The transformer will then load data from existing GAR files for the source graph, utilizing the GraphAr Spark Reader and the meta data defined in the source GraphInfo. After reorganizing the data according to the destination GraphInfo, it generates new GAR chunk files with the GraphAr Spark Writer. +The Graph Transformer is a helper object in the GraphAr Spark library, designed to assist with data transformation at the graph level. It takes two GraphInfo objects (or paths of two yaml files) as inputs: one for the source graph, and one for the destination graph. The transformer will then load data from existing GraphAr format files for the source graph, utilizing the GraphAr Spark Reader and the meta data defined in the source GraphInfo. After reorganizing the data according to the destination GraphInfo, it generates new GraphAr format chunk files with the GraphAr Spark Writer. ```scala // transform graphs by yaml paths @@ -205,7 +205,7 @@ GraphTransformer.transform(source_info, dest_info, spark) We provide an example in [TestGraphTransformer.scala][test-graph-transformer], which demonstrates how to conduct data transformation from the [source graph](https://github.com/apache/incubator-graphar-testing/blob/main/ldbc_sample/parquet/ldbc_sample.graph.yml) to the [destination graph](https://github.com/apache/incubator-graphar-testing/blob/main/transformer/ldbc_sample.graph.yml). -The Graph Transformer can be used for various purposes, including transforming GAR data between different file types (e.g. from ORC to Parquet), transforming between different adjList types (e.g. from COO to CSR), selecting properties or regrouping them, and setting a new chunk size. +The Graph Transformer can be used for various purposes, including transforming GraphAr format data between different file types (e.g. from ORC to Parquet), transforming between different adjList types (e.g. from COO to CSR), selecting properties or regrouping them, and setting a new chunk size. :::note @@ -221,7 +221,7 @@ There are certain limitations while using the Graph Transformer: For more information on usage, please refer to the examples: -- [ComputeExample.scala][compute-example] includes an example for constructing the GraphX graph from GAR files and executing a connected-components computation. +- [ComputeExample.scala][compute-example] includes an example for constructing the GraphX graph from GraphAr format files and executing a connected-components computation. - [TransformExample.scala][transform-example] shows an example for graph data conversion between different file types or different adjList types. - [Neo4j2GraphAr.scala][neo4j2graphar] and [GraphAr2Neo4j.scala][graphar2neo4j] are examples to conduct data importing/exporting for Neo4j. diff --git a/licenserc.toml b/licenserc.toml index c93235b58..b6e0919a2 100644 --- a/licenserc.toml +++ b/licenserc.toml @@ -43,7 +43,6 @@ excludes = [ "**/.scalafmt.conf", "cpp/apidoc", "cpp/thirdparty", - "cpp/include/gar/external/result.hpp", "cpp/misc/cpplint.py", "spark/datasources-32/src/main/scala/org/apache/graphar/datasources", "spark/datasources-33/src/main/scala/org/apache/graphar/datasources", diff --git a/maven-projects/spark/graphar/src/main/scala/org/apache/graphar/example/Neo4j2GraphAr.scala b/maven-projects/spark/graphar/src/main/scala/org/apache/graphar/example/Neo4j2GraphAr.scala index 9e6c6e1b3..8b0a7b647 100644 --- a/maven-projects/spark/graphar/src/main/scala/org/apache/graphar/example/Neo4j2GraphAr.scala +++ b/maven-projects/spark/graphar/src/main/scala/org/apache/graphar/example/Neo4j2GraphAr.scala @@ -58,7 +58,7 @@ object Neo4j2GraphAr { // file type val fileType: String = args(3) - // write in graphar format + // write in GraphAr format writer.write( outputPath, spark, diff --git a/maven-projects/spark/graphar/src/main/scala/org/apache/graphar/graph/GraphWriter.scala b/maven-projects/spark/graphar/src/main/scala/org/apache/graphar/graph/GraphWriter.scala index 7a2bb718a..b3597974e 100644 --- a/maven-projects/spark/graphar/src/main/scala/org/apache/graphar/graph/GraphWriter.scala +++ b/maven-projects/spark/graphar/src/main/scala/org/apache/graphar/graph/GraphWriter.scala @@ -75,7 +75,7 @@ class GraphWriter() { } /** - * Write the graph data in graphar format with graph info. + * Write the graph data in GraphAr format with graph info. * @param graphInfo * the graph info object for the graph. * @param spark @@ -162,7 +162,7 @@ class GraphWriter() { } /** - * Write the graph data in graphar format with path of the graph info yaml. + * Write the graph data in GraphAr format with path of the graph info yaml. * @param graphInfoPath * the path of the graph info yaml. * @param spark @@ -175,7 +175,7 @@ class GraphWriter() { } /** - * Write graph data in graphar format. + * Write graph data in GraphAr format. * * @param path * the directory to write. @@ -191,7 +191,7 @@ class GraphWriter() { * the file type for data payload file, support [parquet, orc, csv], default * is parquet. * @param version - * version of graphar format, default is v1. + * version of GraphAr format, default is v1. */ def write( path: String, diff --git a/maven-projects/spark/graphar/src/main/scala/org/apache/graphar/importer/Neo4j.scala b/maven-projects/spark/graphar/src/main/scala/org/apache/graphar/importer/Neo4j.scala index 50260ae9b..93bcc4e9b 100644 --- a/maven-projects/spark/graphar/src/main/scala/org/apache/graphar/importer/Neo4j.scala +++ b/maven-projects/spark/graphar/src/main/scala/org/apache/graphar/importer/Neo4j.scala @@ -84,7 +84,7 @@ object Neo4j { // put movie graph data into writer readAndPutDataIntoWriter(writer, spark, schema) - // write in graphar format + // write in GraphAr format writer.write( gar.path, spark, diff --git a/maven-projects/spark/graphar/src/test/scala/org/apache/graphar/TestWriter.scala b/maven-projects/spark/graphar/src/test/scala/org/apache/graphar/TestWriter.scala index 8277ab479..d0de0c9c4 100644 --- a/maven-projects/spark/graphar/src/test/scala/org/apache/graphar/TestWriter.scala +++ b/maven-projects/spark/graphar/src/test/scala/org/apache/graphar/TestWriter.scala @@ -57,7 +57,7 @@ class WriterSuite extends AnyFunSuite { val vertex_df_with_index = util.IndexGenerator.generateVertexIndexColumn(vertex_df) - // create writer object for person and generate the properties with GAR format + // create writer object for person and generate the properties with GraphAr format val prefix: String = "/tmp/" val writer = new VertexWriter(prefix, vertex_info, vertex_df_with_index) @@ -124,7 +124,7 @@ class WriterSuite extends AnyFunSuite { val edge_df_with_index = util.IndexGenerator .generateSrcAndDstIndexUnitedlyForEdges(edge_df, "src", "dst") - // create writer object for person_knows_person and generate the adj list and properties with GAR format + // create writer object for person_knows_person and generate the adj list and properties with GraphAr format val writer = new EdgeWriter( prefix, edge_info, @@ -276,7 +276,7 @@ class WriterSuite extends AnyFunSuite { vertex_mapping ) - // create writer object for person_knows_person and generate the adj list and properties with GAR format + // create writer object for person_knows_person and generate the adj list and properties with GraphAr format val writer = new EdgeWriter( prefix, edge_info, diff --git a/pyspark/README.md b/pyspark/README.md index 7864aa5e2..1aea43101 100644 --- a/pyspark/README.md +++ b/pyspark/README.md @@ -5,7 +5,7 @@ This directory contains the code and build system for the GraphAr PySpark librar ## Introduction -GraphAr PySpark project provides a PySpark API and utilities for working with GAR file format from PySpark. The project has the only python dependency -- `pyspark` itself. Currently only `pysaprk~=3.2` is supported, but in the future the scope of supported versions will be extended. +GraphAr PySpark project provides a PySpark API and utilities for working with GraphAr file format from PySpark. The project has the only python dependency -- `pyspark` itself. Currently only `pysaprk~=3.2` is supported, but in the future the scope of supported versions will be extended. ## Installation diff --git a/pyspark/graphar_pyspark/graph.py b/pyspark/graphar_pyspark/graph.py index c87660f5e..1c8f80433 100644 --- a/pyspark/graphar_pyspark/graph.py +++ b/pyspark/graphar_pyspark/graph.py @@ -166,7 +166,7 @@ def put_edge_data(self, relation: tuple[str, str, str], df: DataFrame) -> None: self._jvm_graph_writer_obj.PutEdgeData(relation_jvm, df._jdf) def write_with_graph_info(self, graph_info: Union[GraphInfo, str]) -> None: - """Write the graph data in graphar format with graph info. + """Write the graph data in GraphAr format with graph info. Note: original method is `write` but there is not directly overloading in Python. @@ -186,7 +186,7 @@ def write( file_type: Optional[FileType] = None, version: Optional[str] = None, ) -> None: - """Write graph data in graphar format. + """Write graph data in GraphAr format. Note: for default parameters check org.apache.graphar.GeneralParams; For this method None for any of arguments means that the default value will be used. @@ -196,7 +196,7 @@ def write( :param vertex_chunk_size: the chunk size for vertices, default is 2^18 :param edge_chunk_size: the chunk size for edges, default is 2^22 :param file_type: the file type for data payload file, support [parquet, orc, csv], default is parquet. - :param version: version of graphar format, default is v1. + :param version: version of GraphAr format, default is v1. """ if vertex_chunk_size is None: vertex_chunk_size = ( diff --git a/pyspark/graphar_pyspark/info.py b/pyspark/graphar_pyspark/info.py index 8617504b9..6f552829a 100644 --- a/pyspark/graphar_pyspark/info.py +++ b/pyspark/graphar_pyspark/info.py @@ -551,7 +551,7 @@ def from_python( :chunk_size: chunk size :prefix: vertex prefix :property_groups: list of property groups - :version: version of GAR + :version: version of GraphAr format """ return VertexInfo(label, chunk_size, prefix, property_groups, version, None) @@ -896,16 +896,16 @@ def set_property_groups(self, property_groups: Sequence[PropertyGroup]) -> None: ) def get_version(self) -> str: - """Get GAR version from the corresponding JVM object. + """Get GraphAr format version from the corresponding JVM object. - :returns: GAR version + :returns: GraphAr format version """ return self._jvm_edge_info_obj.getVersion() def set_version(self, version: str) -> None: """Mutate the corresponding JVM object. - :param version: the new GAR version + :param version: the new GraphAr format version """ self._jvm_edge_info_obj.setVersion(version) @@ -965,7 +965,7 @@ def from_python( :param prefix: path prefix :param adj_lists: sequence of AdjList objects :property_groups: sequence of of PropertyGroup objects - :param version: version of GAR format + :param version: version of GraphAr format """ if not prefix.endswith(os.sep): prefix += os.sep @@ -1374,7 +1374,7 @@ def set_edges(self, edges: Union[list[str], JavaList]) -> None: self._jvm_graph_info_obj.setEdges(edges) def get_version(self) -> str: - """Get GAR version from the corresponding JVM object. + """Get GraphAr format version from the corresponding JVM object. :returns: version """ @@ -1383,7 +1383,7 @@ def get_version(self) -> str: def set_version(self, version: str) -> None: """Mutate the corresponding JVM object. - :param version: new version of GAR + :param version: new version of GraphAr format """ self._jvm_graph_info_obj.setVersion(version) @@ -1417,7 +1417,7 @@ def from_python( :param prefix: path prefix :param vertices: list of vertices :param edges: list of edges - :param version: version of GAR format + :param version: version of GraphAr format """ if not prefix.endswith(os.sep): prefix += os.sep