-
Notifications
You must be signed in to change notification settings - Fork 527
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
Add system schema store #1533
Add system schema store #1533
Conversation
f1c4fc0
to
4cd1edb
Compare
hugegraph-core/src/main/java/com/baidu/hugegraph/backend/store/SystemSchemaStore.java
Outdated
Show resolved
Hide resolved
hugegraph-core/src/main/java/com/baidu/hugegraph/backend/tx/SchemaTransaction.java
Outdated
Show resolved
Hide resolved
hugegraph-core/src/main/java/com/baidu/hugegraph/backend/tx/SchemaTransaction.java
Outdated
Show resolved
Hide resolved
hugegraph-core/src/main/java/com/baidu/hugegraph/backend/tx/SchemaTransaction.java
Outdated
Show resolved
Hide resolved
hugegraph-core/src/main/java/com/baidu/hugegraph/backend/tx/SchemaTransaction.java
Outdated
Show resolved
Hide resolved
6250a6e
to
9541494
Compare
Codecov Report
@@ Coverage Diff @@
## master #1533 +/- ##
============================================
+ Coverage 57.98% 59.78% +1.80%
- Complexity 6108 6230 +122
============================================
Files 412 413 +1
Lines 33648 33857 +209
Branches 4633 4647 +14
============================================
+ Hits 19511 20242 +731
+ Misses 12097 11514 -583
- Partials 2040 2101 +61
Continue to review full report at Codecov.
|
a80b302
to
68c4724
Compare
hugegraph-core/src/main/java/com/baidu/hugegraph/backend/store/AbstractBackendStore.java
Show resolved
Hide resolved
hugegraph-core/src/main/java/com/baidu/hugegraph/backend/store/SystemSchemaStore.java
Outdated
Show resolved
Hide resolved
hugegraph-core/src/main/java/com/baidu/hugegraph/backend/tx/SchemaTransaction.java
Outdated
Show resolved
Hide resolved
hugegraph-rocksdb/src/main/java/com/baidu/hugegraph/backend/store/rocksdb/RocksDBTables.java
Show resolved
Hide resolved
Change-Id: I2feabace71f266d6be6c2094c30cd19f74ab7f7d
Change-Id: Idb4d3bffcb1cd941bd8a533981d5ab3d479f4069
Change-Id: Ibc4213370d3134ece10eb60830dad25b5bc208b1
Change-Id: I1460e49c4ffb96f49df713a5ae0c845367c67a22
Change-Id: I538714f0b5ee3a8e90aa90db8f43f4b1cc0597d6
hugegraph-core/src/main/java/com/baidu/hugegraph/backend/store/SystemSchemaStore.java
Outdated
Show resolved
Hide resolved
hugegraph-core/src/main/java/com/baidu/hugegraph/backend/store/SystemSchemaStore.java
Show resolved
Hide resolved
hugegraph-rocksdb/src/main/java/com/baidu/hugegraph/backend/store/rocksdb/RocksDBTables.java
Show resolved
Hide resolved
Change-Id: I5c9d65c4ae022cb84592e8f2aa57bd7485cd12e4
Due to the lack of activity, the current pr is marked as stale and will be closed after 180 days, any update will remove the stale label |
To updated |
Due to the lack of activity, the current pr is marked as stale and will be closed after 180 days, any update will remove the stale label |
@@ -39,11 +41,22 @@ public void registerMetaHandler(String name, MetaHandler<Session> handler) { | |||
this.dispatcher.registerMetaHandler(name, handler); | |||
} | |||
|
|||
@Override | |||
public String storedVersion() { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
storedVersion() is only implemented in system store?
@@ -540,5 +540,45 @@ public long getCounter(HugeType type) { | |||
throw new UnsupportedOperationException( | |||
"HbaseGraphStore.getCounter()"); | |||
} | |||
|
|||
public Session getSession() { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
can just use this
instead?
public void init() { | ||
super.init(); | ||
super.checkOpened(); | ||
Session session = super.getSession(); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
can use Session session = super.sessions.session();
@Override | ||
public String storedVersion() { | ||
super.checkOpened(); | ||
Session session = super.getSession(); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
ditto
String driverVersion = this.provider().driverVersion(); | ||
this.meta.writeVersion(session, driverVersion); | ||
LOG.info("Write down the backend version: {}", driverVersion); | ||
} |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
also overwrite truncate() and let it truncate other tables except the meta table
public String storedVersion() { | ||
this.checkOpened(); | ||
CassandraSessionPool.Session session = this.getSession(); | ||
return this.meta.readVersion(session); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
seems server-info can also be stored into meta table
} | ||
} | ||
|
||
public static class CassandraSystemStore extends CassandraGraphStore { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
prefer to add CassandraMetaStore extends CassandraStore
and it don't need to call registerTableManager(HugeType.VERTEX,...), since tasks data in CassandraSystemStore need to be truncate.
Change-Id: I2feabace71f266d6be6c2094c30cd19f74ab7f7d