Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

implement RamTable #1183

Merged
merged 6 commits into from
Sep 21, 2020
Merged

implement RamTable #1183

merged 6 commits into from
Sep 21, 2020

Conversation

javeme
Copy link
Contributor

@javeme javeme commented Sep 19, 2020

  • implement RamTable
  • plugin ramtable to StandardHugeGrap.edges(query)
  • plugin ramtable to GraphTransaction.queryEdgesFromBackend(Query query)
  • allow config vertices/edges capacity of ramtable
  • tiny improve: remove empty line and delete IntLongMap
  • support concurrent loading
  • fix edge direction of result is set to BOTH when query with BOTH
  • add Consumers class to util package
  • fix ramtable missing some edges if vertex id is big long number(overflow int)
  • fix ramtable edge id(direction IN) does not exist and adjacent vertex without props
  • support load from file and export to file

Change-Id: I4e1a5c06bd331dc29a92dcb76843990863dfe6ca

* implement RamTable
* plugin ramtable to StandardHugeGrap.edges(query)
* plugin ramtable to GraphTransaction.queryEdgesFromBackend(Query query)
* allow config vertices/edges capacity of ramtable
* tiny improve: remove empty line and delete IntLongMap
* support concurrent loading
* fix edge direction of result is set to BOTH when query with BOTH

Change-Id: I4e1a5c06bd331dc29a92dcb76843990863dfe6ca
Change-Id: I8765582ba4e9b5fe8de4300719612a84bfce89a3
…low int) (#58)

Change-Id: Icfaba2550c7ee8892d98b1fbb736645e3d3820d1
… without props

Change-Id: I92cb10fbf0f7acd818a70723bc0dbd988ca89132
Change-Id: Iecfb5bad535e4954a325eb45b1d9def53fdb31c0
usage: graph.reloadRamtable(true)
this.readRateLimiter = readLimit > 0 ?
RateLimiter.create(readLimit) : null;

boolean ramtable = config.get(CoreOptions.QUERY_RAMTABLE_ENABLE);
if (!ramtable) {
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

if(ramtable) is more understandable

private Void runAndDone() {
try {
this.run();
this.done();
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

It is better to put this.done in finally clause.

houzhizhen
houzhizhen previously approved these changes Sep 21, 2020
Change-Id: I7ccd8ab674c0333d0a35930d0822b198954d6bd7
@codecov
Copy link

codecov bot commented Sep 21, 2020

Codecov Report

Merging #1183 into master will increase coverage by 1.24%.
The diff coverage is 61.98%.

Impacted file tree graph

@@             Coverage Diff              @@
##             master    #1183      +/-   ##
============================================
+ Coverage     64.45%   65.70%   +1.24%     
- Complexity     5596     5729     +133     
============================================
  Files           356      361       +5     
  Lines         28929    29429     +500     
  Branches       4066     4158      +92     
============================================
+ Hits          18646    19335     +689     
+ Misses         8395     8134     -261     
- Partials       1888     1960      +72     
Impacted Files Coverage Δ Complexity Δ
...aidu/hugegraph/backend/store/ram/IntObjectMap.java 0.00% <0.00%> (ø) 0.00 <0.00> (?)
.../main/java/com/baidu/hugegraph/util/Consumers.java 48.03% <48.03%> (ø) 14.00 <14.00> (?)
.../baidu/hugegraph/backend/store/ram/IntLongMap.java 59.37% <59.37%> (ø) 8.00 <8.00> (?)
...m/baidu/hugegraph/backend/store/ram/IntIntMap.java 62.50% <62.50%> (ø) 8.00 <8.00> (?)
...in/java/com/baidu/hugegraph/StandardHugeGraph.java 80.00% <63.15%> (-0.76%) 118.00 <3.00> (+2.00) ⬇️
...om/baidu/hugegraph/backend/store/ram/RamTable.java 66.88% <66.88%> (ø) 30.00 <30.00> (?)
...m/baidu/hugegraph/backend/tx/GraphTransaction.java 80.28% <76.92%> (-0.09%) 306.00 <0.00> (ø)
...ugegraph/backend/cache/CachedGraphTransaction.java 88.88% <100.00%> (+0.25%) 40.00 <14.00> (+2.00)
...n/java/com/baidu/hugegraph/config/CoreOptions.java 99.31% <100.00%> (+0.04%) 2.00 <0.00> (ø)
...n/java/com/baidu/hugegraph/structure/HugeEdge.java 73.71% <100.00%> (ø) 83.00 <0.00> (ø)
... and 29 more

Continue to review full report at Codecov.

Legend - Click here to learn more
Δ = absolute <relative> (impact), ø = not affected, ? = missing data
Powered by Codecov. Last update 71cda42...e910426. Read the comment docs.

@houzhizhen houzhizhen merged commit e35f9fb into master Sep 21, 2020
@houzhizhen houzhizhen deleted the ramtable-master branch September 21, 2020 09:40
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

3 participants