feat(api&core):  in oltp apis, add statistics info and support full info about vertices and edges (#2262)

* chore: improve gitignore file

* feat: add ApiMeasure to collect runtime data

ApiMeasure will count the number of vertices and edges traversed at runtime, and the time the api takes to execute

* feat: Add ApiMeasure to JsonSerializer and Modify the Serializer interface

* JsonSerializer: return measure information in api response

* Serializer: fit the feature that returns complete information about vertices and edges

* refactor: format code based on hugegraph-style.xml

* feat: Add statistics information in all oltp restful apis response and Support full information about vertices and edges

Statistics information:

* add vertexIterCounter and edgeIterCounter in HugeTraverser.java to track traversed vertices and edges at run time

* modify all oltp restful apis to add statistics information in response

Full information about vertices and edges:

* add 'with_vertex' and 'with_edge' parameter option in apis

* modify oltp apis to support vertex and edge information in api response

* add EdgeRecord in HugeTraverser.java to record edges at run time and generate the edge information returned in api response

* modify Path and PathSet in HugeTraverser.java to support full edge information storage

* modify all traversers to support track of edge information at run time

* fix: numeric cast

* fix: Jaccard Similarity api test

* fix: adjust the code style and naming convention

* Empty commit

* Empty commit

* fix:
1. change System.currentTimeMillis() to System.nanoTime();
2. modify addCount()

* fix: rollback change in .gitignore

* fix: rollback ServerOptions.java code style

* fix: rollback API.java code style and add exception in else branch

* fix: fix code style

* fix: name style & code style
* rename edgeRecord to edgeResults
* fix Request class code style in SameNeighborsAPI.java
44 files changed
tree: 7be682a59340de37fa0ca3462686944eb97ddb34
  1. .github/
  2. hugegraph-api/
  3. hugegraph-cassandra/
  4. hugegraph-core/
  5. hugegraph-dist/
  6. hugegraph-example/
  7. hugegraph-hbase/
  8. hugegraph-mysql/
  9. hugegraph-palo/
  10. hugegraph-postgresql/
  11. hugegraph-rocksdb/
  12. hugegraph-scylladb/
  13. hugegraph-test/
  14. style/
  15. .asf.yaml
  16. .editorconfig
  17. .gitattributes
  18. .gitignore
  19. .licenserc.yaml
  20. BUILDING.md
  21. CONTRIBUTING.md
  22. DISCLAIMER
  23. Dockerfile
  24. hugegraph-style.xml
  25. LICENSE
  26. NOTICE
  27. pom.xml
  28. README.md
README.md

License HugeGraph-CI CodeQL License checker Codecov GitHub Releases Downloads stars

What is Apache HugeGraph?

HugeGraph is a fast-speed and highly-scalable graph database. Billions of vertices and edges can be easily stored into and queried from HugeGraph due to its excellent OLTP ability. As compliance to Apache TinkerPop 3 framework, various complicated graph queries can be accomplished through Gremlin(a powerful graph traversal language).

Features

  • Compliance to Apache TinkerPop 3, support Gremlin & Cypher language
  • Schema Metadata Management, including VertexLabel, EdgeLabel, PropertyKey and IndexLabel
  • Multi-type Indexes, supporting exact query, range query and complex conditions combination query
  • Plug-in Backend Store Driver Framework, support RocksDB, Cassandra, HBase, ScyllaDB, and MySQL/Postgre now and easy to add other backend store driver if needed
  • Integration with Flink/Spark/HDFS, and friendly to connect other big data platforms

Quick Start

1. Docker Way

We can use docker run -itd --name=graph -p 8080:8080 hugegraph/hugegraph to quickly start an inner HugeGraph server with RocksDB in background.

Optional: use docker exec -it graph bash to enter the container to do some operations.

2. Download Way

Visit Download Page and refer the doc to download the latest release package and start the server.

3. Source Building Way

Visit Source Building Page and follow the steps to build the source code and start the server.

The project doc page contains more information on HugeGraph and provides detailed documentation for users. (Structure / Usage / API / Configs...)

And here are links of other HugeGraph component/repositories:

  1. hugegraph-toolchain (graph loader/dashboard/tool/client)
  2. hugegraph-computer (matched graph computing system)
  3. hugegraph-commons (common & rpc module)
  4. hugegraph-website (doc & website code)

License

HugeGraph is licensed under Apache 2.0 License.

Contributing

  • Welcome to contribute to HugeGraph, please see How to Contribute & Guidelines for more information.
  • Note: It's recommended to use GitHub Desktop to greatly simplify the PR and commit process.
  • Thank you to all the people who already contributed to HugeGraph!

contributors graph

Thanks

HugeGraph relies on the TinkerPop framework, we refer to the storage structure of Titan and the schema definition of DataStax. Thanks to TinkerPop, thanks to Titan, thanks to DataStax. Thanks to all other organizations or authors who contributed to the project.

You are welcome to contribute to HugeGraph, and we are looking forward to working with you to build an excellent open source community.

Contact Us