-
-
Notifications
You must be signed in to change notification settings - Fork 1.2k
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
Allow removal of configuration properties #4061
Conversation
6a0ac20
to
5ad8099
Compare
map.put("storage.hostname", "localhost,localhost"); | ||
map.put(STORAGE_HOSTS.toStringWithoutRoot(), "localhost,localhost"); | ||
ConfiguredGraphFactory.updateConfiguration(graphName, new MapConfiguration(map)); | ||
assertNull(gm.getGraph(graphName)); | ||
assertNotNull(ConfiguredGraphFactory.open(graphName)); | ||
|
||
// bogus backend will prevent the graph from being opened | ||
final Map<String, Object> map2 = graphConfig.getMap(); | ||
map2.put("storage.backend", "bogusBackend"); | ||
map2.put(STORAGE_BACKEND.toStringWithoutRoot(), "bogusBackend"); |
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.
📝 drive-by change to reuse constants
public static Map<String, Object> getConfiguration(final String configName) { | ||
public static Map<String, Object> getConfiguration(final String graphName) { | ||
final ConfigurationManagementGraph configManagementGraph = getConfigGraphManagementInstance(); | ||
return configManagementGraph.getConfiguration(configName); | ||
return configManagementGraph.getConfiguration(graphName); |
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.
📝 drive-by change: documentation mentioned graphName
but variable was called configName
.
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.
LGTM. Thank you @cdegroc !
I only have a nitpick about one of the methods you added, but that's not critical.
...graph-core/src/main/java/org/janusgraph/graphdb/management/ConfigurationManagementGraph.java
Outdated
Show resolved
Hide resolved
Signed-off-by: Clement de Groc <[email protected]>
5ad8099
to
95aefc1
Compare
I've deployed this code and tried to update an existing graph configuration. I could remove one or more configuration keys. Both |
In this PR, we add a
remove
method to remove configuration keys:ConfiguredGraphFactory
/ConfigurationManagementGraph
for ConfiguredGraphFactory configuration.JanusGraphConfiguration
/UserModifiableConfiguration
/ManagementSystem
for "global" configuration.Fixes #555
Thank you for contributing to JanusGraph!
In order to streamline the review of the contribution we ask you
to ensure the following steps have been taken:
For all changes:
master
)?For code changes:
For documentation related changes: