-
Notifications
You must be signed in to change notification settings - Fork 526
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 #1891
Merged
Merged
Add system schema store #1891
Changes from 5 commits
Commits
Show all changes
7 commits
Select commit
Hold shift + click to select a range
c887b6b
Add system schema store
Linary 3e332b4
fix: remove schema failed
zyxxoo 79603ae
fix: duplicate key error
zyxxoo 25c5bcb
fix: initStore schema missed
zyxxoo 7e2d3a4
chore: improve code
zyxxoo 1c9f0b4
improve code
zyxxoo 77e2d49
improve code
zyxxoo File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -74,7 +74,7 @@ | |
import com.baidu.hugegraph.backend.id.IdGenerator; | ||
import com.baidu.hugegraph.backend.query.Query; | ||
import com.baidu.hugegraph.backend.store.BackendFeatures; | ||
import com.baidu.hugegraph.backend.store.BackendStoreSystemInfo; | ||
import com.baidu.hugegraph.backend.store.BackendStoreInfo; | ||
import com.baidu.hugegraph.backend.store.raft.RaftGroupManager; | ||
import com.baidu.hugegraph.config.AuthOptions; | ||
import com.baidu.hugegraph.config.HugeConfig; | ||
|
@@ -604,15 +604,9 @@ public String backend() { | |
} | ||
|
||
@Override | ||
public String backendVersion() { | ||
this.verifyAnyPermission(); | ||
return this.hugegraph.backendVersion(); | ||
} | ||
|
||
@Override | ||
public BackendStoreSystemInfo backendStoreSystemInfo() { | ||
public BackendStoreInfo backendStoreInfo() { | ||
this.verifyAdminPermission(); | ||
return this.hugegraph.backendStoreSystemInfo(); | ||
return this.hugegraph.backendStoreInfo(); | ||
} | ||
|
||
@Override | ||
|
@@ -734,6 +728,12 @@ public void truncateBackend() { | |
} | ||
} | ||
|
||
@Override | ||
public void initSystemInfo() { | ||
this.verifyAdminPermission(); | ||
this.hugegraph.initSystemInfo(); | ||
} | ||
|
||
@Override | ||
public void createSnapshot() { | ||
this.verifyPermission(HugePermission.WRITE, ResourceType.STATUS); | ||
|
@@ -998,6 +998,12 @@ public HugeGraph graph() { | |
return this.taskScheduler.graph(); | ||
} | ||
|
||
@Override | ||
public void init() { | ||
verifyAdminPermission(); | ||
this.taskScheduler.init(); | ||
} | ||
|
||
@Override | ||
public int pendingTasks() { | ||
verifyTaskPermission(HugePermission.READ); | ||
|
@@ -1161,6 +1167,12 @@ private String currentUsername() { | |
return null; | ||
} | ||
|
||
@Override | ||
public void init() { | ||
verifyAdminPermission(); | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. ditto There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. this is inner class AuthManagerProxy, so can't use this. |
||
this.authManager.init(); | ||
} | ||
|
||
@Override | ||
public boolean close() { | ||
verifyAdminPermission(); | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
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.
this.verifyAdminPermission()
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.
this method doesn't use this, the code is in inner class TaskSchedulerProxy
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.
get it