Date
1 - 5 of 5
keyspaces in JanusGraph
Peter Musial <pmmu...@...>
Hi All, Cassandra allows definition of multiple keyspaces. I am using nodejs w/GremlinClient module (npm install gremlin-client) to handle query execution. Although I know how to set up a keyspace, it is not clear to me how to initialize gremlin client to use a specific keyspace. Is there a programatic way of selecting a namespace, or is it only possible when loading gremlin-server with specific configuration file. Thanks, Peter |
|
Ted Wilmes <twi...@...>
Hi Peter, You can setup Janus to use a keyspace of your choose. See the config section of the docs for some relevant properties to set: http://docs.janusgraph.org/latest/config-ref.html#_storage_cassandra. --Ted On Wednesday, June 28, 2017 at 10:52:04 AM UTC-5, Peter wrote:
|
|
Jean-Baptiste Musso <jbm...@...>
Hello, Side note to your question - I suggest that you use https://www.npmjs.com/package/gremlin instead - the former is deprecated (unsure if that shows up in the log when installing). Jean-Baptiste On Wed, 28 Jun 2017 at 17:52, Peter Musial <pmmu...@...> wrote:
-- Jean-Baptiste |
|
Peter <pmmu...@...>
Thank you Jean-Baptiste. Actually I was using gremlin (not, graph-client). In the schema definition, I have something like that // load configuration from file conf = new PropertiesConfiguration('../conf/janusgraph-cassandra.properties') // set keyspace name conf.addProperty('storage.cassandra.keyspace','mykeyspace') // create graph graph = JanusGraphFactory.open(conf) That seems to work ok. However, when I am loading the client via gremlin client, there is no clear way to configure it so that 'mykeyspace' is used. client = Gremlin.createClient(port, host); So later when I pass in my queries, such as g.V(), then these are not being directed to the desired keyspace. The only way to accomplish this automatically is when gremlin server is initiated with the keyspace 'mykeyspace' being specified in a config file. Thanks, Peter On Monday, July 3, 2017 at 10:00:31 AM UTC-4, Jean-Baptiste Musso wrote:
|
|
David Pitera <piter...@...>
Hey Peter; as Ted said you can define which keyspace you connect to using the appropriate configuration property when defining your graph's .properties file. Also be aware of this PR https://github.com/JanusGraph/janusgraph/pull/392 which will allow you to create new graphs dynamically (i.e. post server start) and store/manage configurations for these graphs through the ConfigurationManagementGraph API, where the configurations for your graphs are persisted rather than stored on disk in .properties files. The PR also introduces the notion of a `Template_Configuration`, which should be useful in your case. If are _always_ connecting to one Cassandra cluster, then you can define that appropriate configuration (sans the keyspace parameter), and then call `ConfiguredGraphFactory.create("<graphName>")` to dynamically create and connect to a new graph whose keyspace would be equivalent to "<graphName>". For more specifics, about how to use the `ConfigurationManagementGraph` and `ConfiguredGraphFactory` you can look at the documentation I've written for it in that link. On Wednesday, June 28, 2017 at 11:52:04 AM UTC-4, Peter wrote:
|
|