Table of Contents | ||||
---|---|---|---|---|
|
...
Pre-requisites
1. Ensure you have the syndeia-cloud-3.4
_janusgraph_setup.zip
downloaded to (or latest service pack) downloaded to your home directory (or home directory's Downloads folder) from the download/license instructions sent out by our team.
Note: the .ZIP will pre-create a separate folder for its contents when extracted so there is no need to pre-create a separate folder for it.
2. Ensure you satisfy Janusgraph's pre-requisites, ie: have (Open|Oracle)JDK/JRE + Apache Cassandra (& optionally Elasticsearch) installed. Re. CPU, memory, HD space, etc. this will depend on how much data you expect to store, query, and graph.
3. If using a firewall, and JG will be on a separate server from SC, ensure the following port is accessible (consult your local network admin if required): TCP port 8182 (this is the port to listen to for client connections).
...
Downloading & Extracting JanusGraph
...
3. Unzip Syndeia Cloud's JanusGraph setup package in your home directory ~/
, ie: unzip syndeia-cloud-3.4.SP3_2022-07-01_janusgraph_setup.zip
-d ~/
...
5. Take ownership of the extracted folder, ie: sudo chown -R janusgraph:janusgraph /opt/janusgraph
-0.3.1-hadoop2
JanusGraph Keyspace Setup, Service Setup & Start:
6. In a new terminal session, cd into the bin dir and run the Syndeia Cloud JanusGraph setup script, ie: cd ~/syndeia-cloud-3.4_janusgraph_setup/bin; ./syndeia-cloud-3.4_janusgraph_setup.bash
. This will:
...
Tip | ||||
---|---|---|---|---|
| ||||
When completed, confirm all of the following are true before proceeding: (The tools used and the network locations used are site-dependent.)
|
...
JanusGraph Keyspace Setup, Service Setup & Start:
6. In a new terminal session, cd into the bin dir and run the Syndeia Cloud JanusGraph setup script, ie: cd ~/syndeia-cloud-3.4_janusgraph_setup/bin; ./syndeia-cloud-3.4_janusgraph_setup.bash
. This will:
- Create/update janusgraph-current
symlink to specified version, default = 0.3.1
- Create a new syndeia_admin
superuser in Cassandra with a password you specify
- Create a new syndeia_cloud_graph
and syndeia_cloud_graph_config
keyspaces
- GRANT ALL PERMISSIONS ON KEYSPACE syndeia_cloud_graph TO syndeia_admin
- GRANT ALL PERMISSIONS ON KEYSPACE syndeia_cloud_graph_config TO syndeia_admin
- Run a Groovy JanusGraph setup script to set storage params for your graph and build indexes
- Create a renamed copy of the file
as /opt/janusgraph
onf/janusgraph-cql-configurationgraph.properties-<
release_ver>/c
janusgraph-cql-configurationgraph-syndeia.properties
with:
graph.graphname=syndeia_cloud_graph_config
Add storage.username=syndeia_admin
Add storage.password=
<password_specified>storage.hostname=<
your_Cassandra_host>
- If you installed Elasticsearch on the same machine, add index.search.backend=elasticsearch
and index.search.hostname=localhost
to use Elasticsearch for search indexing
- Create a renamed copy of the file /opt/janusgraph
-<
release_ver>/
conf/gremlin-server/gremlin-server-configuration.yaml
as gremlin-server-configuration-syndeia.yaml
and set ConfigurationManagementGraph
to point to janusgraph-cql-configurationgraph-syndeia.properties
.
- Install systemd .service file for JanusGraph service
- Start JanusGraph service
Note: you may be prompted for sudo
authentication. You will also be prompted for your cassandra
account password (default = cassandra
), to set your syndeia_admin
password and the FQDN of your Cassandra host.
Avoid any all of the following special characters: \?*[]+#&.{}$
when setting your syndeia_admin
password.
Managing JanusGraph:
7. To check the status of Syndeia Cloud services, use systemctl status janusgraph
. You can verify that it started by verifying "Active: active (running)" shows up in the output:
Code Block | ||||
---|---|---|---|---|
| ||||
$ systemctl status janusgraph
● janusgraph.service
Loaded: loaded (/etc/systemd/system/janusgraph.service; enabled; vendor preset: enabled)
Active: active (running) since Wed 2019-04-17 10:21:59 EDT; 7s ago
Process: 22486 ExecStop=/bin/bash -c /opt/janusgraph-0.3.1-hadoop2/bin/janusgraph.sh stop (code=exited, status=0/SUCCESS)
Main PID: 23677 (java)
CGroup: /system.slice/janusgraph.service
└─23677 java -server -Djanusgraph.logdir=/opt/janusgraph-0.3.1-hadoop2/bin/../log -Dlog4j.configuration=conf/gremlin-server/log4j-server.properties -Xms32m -Xmx512m -javaagent:
|
8. To stop/start the Syndeia Cloud services, use sudo systemctl
<action> janusgraph
; where <action> = one of start|stop
. If the service successfully starts you should get the command prompt again.
Note: If you wish to ensure the services run on startup, run sudo systemctl enable
janusgraph
. For more information on installing the .service
files manually and configuring them to start after Cassandra, see Setting up Services to Start on Boot.
9. To view the logs for JanusGraph, use sudo journalctl -eu janusgraph
& less /opt/janusgraph-0.3.1-hadoop2/log/gremlin-server.log
. To follow the log files, you can use sudo journalctl -feu janusgraph
& tail -f /opt/janusgraph-0.3.1-hadoop2/log/gremlin-server.log
. You should see output similar to the following (abridged) text:
...
Tip | |||||||||||||
---|---|---|---|---|---|---|---|---|---|---|---|---|---|
| |||||||||||||
When completed, confirm all of the following are true before proceeding or when trying to determine if the JanusGraph service is properly configured and operating. (The tools used and the network locations used are site-dependent.)
|
...
Managing JanusGraph:
7. To check the status of JanusGraph services, use systemctl status janusgraph
. You can verify that it started by verifying "Active: active (running)" shows up in the output:
Code Block | ||||
---|---|---|---|---|
| ||||
$ systemctl status janusgraph ● janusgraph.service Loaded: loaded (/etc/systemd/system/janusgraph.service; enabled; vendor preset: enabled) Active: active (running) since Wed 2019-04-17 10:21:59 EDT; 7s ago Process: 22486 ExecStop=/bin/bash -c /opt/janusgraph-0.3.1-hadoop2/ |
...
bin/janusgraph.sh stop (code=exited, status=0/SUCCESS) Main PID: 23677 (java) CGroup: /system.slice/janusgraph.service └─23677 java -server -Djanusgraph.logdir=/opt/janusgraph-0.3.1-hadoop2/ |
...
bin/ |
...
../log |
...
Code Block | ||||
---|---|---|---|---|
| ||||
$ less /var/log/janusgraph/gremlin-server.log [...] 2987 [main] INFO com.datastax.driver.core.NettyUtil - Found Netty's native epoll transport in the classpath, using it 4827 [main] INFO com.datastax.driver.core.policies.DCAwareRoundRobinPolicy - Using data-center name 'datacenter1' for DCAwareRoundRobinPolicy (if this is incorrect, please provide the c orrect datacenter name with DCAwareRoundRobinPolicy constructor) 4835 [main] INFO com.datastax.driver.core.Cluster - New Cassandra host janusgraph.domain.com/localhost:9042 added 9043 [main] INFO org.janusgraph.graphdb.configuration.GraphDatabaseConfiguration - Set default timestamp provider MICRO 11325 -Dlog4j.configuration=conf/gremlin-server/log4j-server.properties -Xms32m -Xmx512m -javaagent: |
8. To stop/start the JanusGraph services, use sudo systemctl
<action> janusgraph
; where <action> = one of start|stop
. If the service successfully starts you should get the command prompt again.
Note: If you wish to ensure the services run on startup, run sudo systemctl enable
janusgraph
. For more information on installing the .service
files manually and configuring them to start after Cassandra, see Setting up Services to Start on Boot.
9. To view the logs for JanusGraph, use sudo journalctl -eu janusgraph
& less /opt/janusgraph-0.3.1-hadoop2/log/gremlin-server.log
. To follow the log files, you can use sudo journalctl -feu janusgraph
& tail -f /opt/janusgraph-0.3.1-hadoop2/log/gremlin-server.log
. You should see output similar to the following (abridged) text:
Note, for your convenience you may wish to create a symlink to /opt/janusgraph-0.3.1-hadoop2/log
/
from /var/log
, ie: sudo ln -nfs
/opt/janusgraph-0.3.1-hadoop2/log
/ /var/log/janusgraph
Code Block | ||||
---|---|---|---|---|
| ||||
$ less /var/log/janusgraph/gremlin-server.log [...] 2987 [main] INFO orgcom.janusgraphdatastax.graphdbdriver.configurationcore.GraphDatabaseConfigurationNettyUtil - Generated unique-instance-id=2d3877742385-janusgraph-domain-com1 11341 [main] INFO com.datastax.driver.core.ClockFactory - Using java.lang.System clock to generate timestamps. 11902Found Netty's native epoll transport in the classpath, using it 4827 [main] INFO com.datastax.driver.core.policies.DCAwareRoundRobinPolicy - Using data-center name 'datacenter1' for DCAwareRoundRobinPolicy (if this is incorrect, please provide the c correctorrect datacenter name with DCAwareRoundRobinPolicy constructor) 119024835 [main] INFO com.datastax.driver.core.Cluster - New Cassandra host janusgraph.domain.com/localhost:9042 added 122519043 [main] INFO org.janusgraph.graphdb.diskstorageconfiguration.BackendGraphDatabaseConfiguration - InitiatedSet backenddefault operationstimestamp threadprovider pool of size 8 27969MICRO 11325 [main] INFO org.janusgraph.diskstoragegraphdb.configuration.BackendGraphDatabaseConfiguration - Configuring total store cache size: 208138508 33098Generated unique-instance-id=2d3877742385-janusgraph-domain-com1 11341 [main] INFO orgcom.janusgraphdatastax.diskstoragedriver.logcore.kcvs.KCVSLogClockFactory - Loaded unidentified ReadMarker start time 2019-03-18T01:55:02.918Z into org.janusgraph.diskstorage.log.kcvs.KCVSLog$Messa gePuller@28d6290 35668Using java.lang.System clock to generate timestamps. 11902 [main] INFO orgcom.apachedatastax.tinkerpopdriver.gremlincore.serverpolicies.util.ServerGremlinExecutorDCAwareRoundRobinPolicy - InitializedUsing Gremlindata-center thread pool. Threads in pool named with pattern gremlin-* 36019 [main] INFO org.apache.tinkerpop.gremlin.server.util.ServerGremlinExecutor - Initialized GremlinExecutor and preparing GremlinScriptEngines instances. 40510name 'datacenter1' for DCAwareRoundRobinPolicy (if this is incorrect, please provide the correct datacenter name with DCAwareRoundRobinPolicy constructor) 11902 [main] INFO orgcom.apachedatastax.tinkerpopdriver.gremlin.server.util.ServerGremlinExecutorcore.Cluster - InitializedNew gremlin-groovyCassandra GremlinScriptEngine and registered metrics 40532 host janusgraph.domain.com/localhost:9042 added 12251 [main] INFO org.apachejanusgraph.tinkerpop.gremlin.server.op.OpLoader - Adding the standard OpProcessor. 40540diskstorage.Backend - Initiated backend operations thread pool of size 8 27969 [main] INFO org.apachejanusgraph.tinkerpop.gremlin.server.op.OpLoaderdiskstorage.Backend - Configuring total Addingstore thecache sessionsize: OpProcessor.208138508 4103033098 [main] INFO org.apachejanusgraph.tinkerpopdiskstorage.gremlinlog.serverkcvs.op.OpLoaderKCVSLog - AddingLoaded theunidentified traversalReadMarker OpProcessor.start 41076 [time 2019-03-18T01:55:02.918Z into org.janusgraph.diskstorage.log.kcvs.KCVSLog$Messa gePuller@28d6290 35668 [main] INFO org.apache.tinkerpop.gremlin.server.oputil.traversal.TraversalOpProcessorServerGremlinExecutor - Initialized cacheGremlin forthread TraversalOpProcessorpool. with sizeThreads 1000in andpool expirationnamed timewith ofpattern 600000gremlin-* ms36019 41097 [main] INFO org.apache.tinkerpop.gremlin.server.util.GremlinServerServerGremlinExecutor - idleConnectionTimeoutInitialized wasGremlinExecutor setand topreparing 0GremlinScriptEngines which resolves to 0 seconds when configuring this value - this feature will be d isabled 41098instances. 40510 [main] INFO org.apache.tinkerpop.gremlin.server.GremlinServerutil.ServerGremlinExecutor - keepAliveInterval was set to 0 which resolves to 0 seconds when configuring this value - this feature will be disab led 41247 Initialized gremlin-groovy GremlinScriptEngine and registered metrics 40532 [main] INFO org.apache.tinkerpop.gremlin.server.AbstractChannelizerop.OpLoader - Configured application/vnd.gremlin-v3.0+gryo with org.apache.tinkerpop.gremlin.driver.ser.GryoMessageSerializ erV3d0 41248Adding the standard OpProcessor. 40540 [main] INFO org.apache.tinkerpop.gremlin.server.AbstractChannelizerop.OpLoader - Configured application/vnd.gremlin-v3.0+gryo-stringd with org.apache.tinkerpop.gremlin.driver.ser.GryoMessage SerializerV3d0 41298Adding the session OpProcessor. 41030 [main] INFO org.apache.tinkerpop.gremlin.server.AbstractChannelizerop.OpLoader - Configured application/vnd.gremlin-v3.0+json with org.apache.tinkerpop.gremlin.driver.ser.GraphSONMessageSeri alizerV3d0 41299 Adding the traversal OpProcessor. 41076 [main] INFO org.apache.tinkerpop.gremlin.server.op.traversal.AbstractChannelizerTraversalOpProcessor - Initialized Configured application/json with org.apache.tinkerpop.gremlin.driver.ser.GraphSONMessageSerializerV3d0 41306cache for TraversalOpProcessor with size 1000 and expiration time of 600000 ms 41097 [main] INFO org.apache.tinkerpop.gremlin.server.AbstractChannelizerGremlinServer - Configured application/vnd.gremlin-v1.0+gryo with org.apache.tinkerpop.gremlin.driver.ser.GryoMessageSerializ erV1d0 41311 idleConnectionTimeout was set to 0 which resolves to 0 seconds when configuring this value - this feature will be d isabled 41098 [main] WARNINFO org.apache.tinkerpop.gremlin.server.AbstractChannelizerGremlinServer - keepAliveInterval The org.apache.tinkerpop.gremlin.driver.ser.GryoLiteMessageSerializerV1d0 serialization class is deprecated. 41314was set to 0 which resolves to 0 seconds when configuring this value - this feature will be disab led 41247 [main] INFO org.apache.tinkerpop.gremlin.server.AbstractChannelizer - Configured application/vnd.gremlin-v1v3.0+gryo-lite with org.apache.tinkerpop.gremlin.driver.ser.GryoLiteMessagGryoMessageSerializ eSerializerV1d0erV3d0 4131541248 [main] INFO org.apache.tinkerpop.gremlin.server.AbstractChannelizer - Configured application/vnd.gremlin-v1v3.0+gryo-stringd with org.apache.tinkerpop.gremlin.driver.ser.GryoMessage SerializerV1d0SerializerV3d0 4132541298 [main] INFO org.apache.tinkerpop.gremlin.server.AbstractChannelizer - Configured application/vnd.gremlin-v2v3.0+json with org.apache.tinkerpop.gremlin.driver.ser.GraphSONMessageSeri alizerGremlinV2d0alizerV3d0 4134741299 [main] INFO org.apache.tinkerpop.gremlin.server.AbstractChannelizer - Configured application/vnd.gremlin-v1.0+json with org.apache.tinkerpop.gremlin.driver.ser.GraphSONMessageSeriGraphSONMessageSerializerV3d0 alizerGremlinV1d041306 41350 [main] INFO org.apache.tinkerpop.gremlin.server.AbstractChannelizer - Configured application/json already has vnd.gremlin-v1.0+gryo with org.apache.tinkerpop.gremlin.driver.ser.GraphSONMessageSerializerV3d0GryoMessageSerializ configurederV1d0 41311 -[main] itWARN will not be replaced by org.apache.tinkerpop.gremlin.server.AbstractChannelizer - The org.apache.tinkerpop.gremlin.driver.ser.GraphSONMessageSerializerV1d0GryoLiteMessageSerializerV1d0 serialization class is deprecated. 4143741314 [gremlin-server-boss-1main] INFO org.apache.tinkerpop.gremlin.server.GremlinServerAbstractChannelizer - Gremlin Server configured with worker thread pool of 1, gremlin pool of 4 and boss thread pool of 1. 41438 [gremlin-server-boss-1Configured application/vnd.gremlin-v1.0+gryo-lite with org.apache.tinkerpop.gremlin.driver.ser.GryoLiteMessag eSerializerV1d0 41315 [main] INFO org.apache.tinkerpop.gremlin.server.GremlinServerAbstractChannelizer - Channel started at port 8182. 181192 [metrics-logger-reporter-thread-1] INFO Configured application/vnd.gremlin-v1.0+gryo-stringd with org.apache.tinkerpop.gremlin.driver.server.Settings$Slf4jReporterMetrics - type=GAUGE, name=ser.GryoMessage SerializerV1d0 41325 [main] INFO org.apache.tinkerpop.gremlin.server.GremlinServer.greAbstractChannelizer mlin-groovy.sessionless.class-cache.average-load-penalty, value=2.450843818E9 |
10. Validate correct operation and create/update an archive image to use as a new base image if the node needs to be rebuilt or if you wish to create a cluster.
Before making the image you may wish to first stop and optionally disable the service temporarily to prevent auto-start on boot, ie: sudo systemctl disable janusgraph
.
Multi-Node (Cluster) Setup Instructions
Enabling your single-node deployment for cluster operation
11. Ensure you first enable Cassandra for cluster operation.
12. Update the Janusgraph syndeia_cloud_graph
configuration via the following Groovy code; where cassandra.mydomain.com
= the FQDN of the server that you have now exposed :
Code Block | ||||
---|---|---|---|---|
| ||||
:remote connect tinkerpop.server conf/remote.yaml session
:remote console
map = new HashMap();
map.put('storage.backend', 'cql');
// should return: ==>null
map.put('storage.hostname', 'cassandra.mydomain.com');
ConfiguredGraphFactory.updateConfiguration('syndeia_cloud_graph', map); |
Adding new nodes to an existing single-node
13. Deploy another instance of your Janusgraph base image (which depending on your topology could be the same as your Cassandra base image).
14. Make any appropriate changes for the MAC address (ex: in the VM settings and/or udev, if used).
15. Setup forward & reverse DNS records on your DNS server (consult your IT admin/sysadmin if required) and set the hostname and primary DNS suffix on the machine itself (sudo hostnamectl set-hostname
<new_JanusGraph_node_FQDN> where FQDN = Fully Qualified Domain Name, ex: janusgraph2.mycompany.com
)
16. SSH to the IP (or the FQDN of the new node if DNS has already propagated).
Note: If using Fail2Ban, update the sender line in /etc/fail2ban/jail.local
to root@
<new_JanusGraph_node_FQDN>. Restart the fail2ban service (sudo systemctl restart fail2ban
)
17. Three things need to occur: you will need to change the Snitch (if not already done for Cassandra), alter the keyspace Replication Factor (RF), and run nodetool repair
on each node (see https://docs.datastax.com/en/archived/cassandra/3.x/cassandra/operations/opsChangeKSStrategy.html for a summary of the process).
...
Alter the RF: verify the Cassandra “datacenter” name (default = dc1
) from the CLI by running nodetool status
and then from Cassandra CQLSH increment the RF for your JanusGraph keyspace(s):
...
language | sql |
---|
- Configured application/vnd.gremlin-v2.0+json with org.apache.tinkerpop.gremlin.driver.ser.GraphSONMessageSeri
alizerGremlinV2d0
41347 [main] INFO org.apache.tinkerpop.gremlin.server.AbstractChannelizer - Configured application/vnd.gremlin-v1.0+json with org.apache.tinkerpop.gremlin.driver.ser.GraphSONMessageSeri
alizerGremlinV1d0
41350 [main] INFO org.apache.tinkerpop.gremlin.server.AbstractChannelizer - application/json already has org.apache.tinkerpop.gremlin.driver.ser.GraphSONMessageSerializerV3d0 configured
- it will not be replaced by org.apache.tinkerpop.gremlin.driver.ser.GraphSONMessageSerializerV1d0.
41437 [gremlin-server-boss-1] INFO org.apache.tinkerpop.gremlin.server.GremlinServer - Gremlin Server configured with worker thread pool of 1, gremlin pool of 4 and boss thread pool of
1.
41438 [gremlin-server-boss-1] INFO org.apache.tinkerpop.gremlin.server.GremlinServer - Channel started at port 8182.
181192 [metrics-logger-reporter-thread-1] INFO org.apache.tinkerpop.gremlin.server.Settings$Slf4jReporterMetrics - type=GAUGE, name=org.apache.tinkerpop.gremlin.server.GremlinServer.gre
mlin-groovy.sessionless.class-cache.average-load-penalty, value=2.450843818E9
|
10. Validate correct operation and create/update an archive image to use as a new base image if the node needs to be rebuilt or if you wish to create a cluster.
Before making the image you may wish to first stop and optionally disable the service temporarily to prevent auto-start on boot, ie: sudo systemctl disable janusgraph
.
...
Multi-Node (Cluster) Setup Instructions
Enabling your single-node deployment for cluster operation
11. If Cassandra will be on a separate server from JG, ensure you first enable Cassandra for cluster operation.
12. Update the Janusgraph syndeia_cloud_graph
configuration by running /opt/janusgraph-current/bin/gremlin.sh
and running the following Groovy code ; where cassandra.mydomain.com
= the FQDN of the Casandra server that you have now exposed :
Code Block | ||||
---|---|---|---|---|
| ||||
:remote connect tinkerpop.server conf/remote.yaml session
:remote console
map = new HashMap();
map.put('storage.backend', 'cql'); // should return: ==>null
map.put('storage.hostname', 'cassandra.mydomain.com');
ConfiguredGraphFactory.updateConfiguration('syndeia_cloud_graph', map); |
13. If Janusgraph will be on a different server than SC, please also:
13A. Update the host: localhost
entry on L1 in /opt/janusgraph-current/conf/gremlin-server/gremlin-server-configuration-syndeia.yaml
, ex:
Code Block | ||||||
---|---|---|---|---|---|---|
| ||||||
host: jg-server.domain.tld
port: 8182
[...] |
where jg-server.domain.tld
= the FQDN of your JG server
13B. Ensure port 8182 is accessible on the JG server.
...
Adding new nodes to an existing single-node
14. Deploy another instance of your Janusgraph base image (which depending on your topology could be the same as your Cassandra base image).
15. Make any appropriate changes for the MAC address (ex: in the VM settings and/or udev, if used).
16. Setup forward & reverse DNS records on your DNS server (consult your IT admin/sysadmin if required) and set the hostname and primary DNS suffix on the machine itself (sudo hostnamectl set-hostname
<new_JanusGraph_node_FQDN> where FQDN = Fully Qualified Domain Name, ex: janusgraph2.mycompany.com
)
17. SSH to the IP (or the FQDN of the new node if DNS has already propagated).
Note: If using Fail2Ban, update the sender line in /etc/fail2ban/jail.local
to root@
<new_JanusGraph_node_FQDN>. Restart the fail2ban service (sudo systemctl restart fail2ban
)
18. Three things need to occur: you will need to change the Snitch (if not already done for Cassandra), alter the keyspace Replication Factor (RF), and run nodetool repair
on each node (see https://docs.datastax.com/en/archived/cassandra/3.x/cassandra/operations/opsChangeKSStrategy.html for a summary of the process).
- Change the Snitch: see "Switching Snitches": https://docs.datastax.com/en/archived/cassandra/3.x/cassandra/operations/opsChangeKSStrategy.html
Alter the RF: verify the Cassandra “datacenter” name (default =
dc1
) from the CLI by runningnodetool status
and then from Cassandra CQLSH increment the RF for your JanusGraph keyspace(s):Code Block language sql ALTER KEYSPACE syndeia_cloud_auth WITH REPLICATION = { 'class' : 'NetworkTopologyStrategy', '<datacenter_name>' : <total_number_of_nodes> }; -- where <datacenter_name> = the name of the datacenter as shown via nodetool status, and <total_number_of_nodes> = total # of nodes (in the cluster) ALTER KEYSPACE syndeia_cloud_store WITH REPLICATION = { 'class' : 'NetworkTopologyStrategy', '<datacenter_name>' : <total_number_of_nodes> }; -- where <datacenter_name> = the name of the datacenter as shown via nodetool status, and <total_number_of_nodes> = total # of nodes (in the cluster) ALTER KEYSPACE syndeia_cloud_confluence WITH REPLICATION = { 'class' : 'NetworkTopologyStrategy', '<datacenter_name>' : <total_number_of_nodes> }; -- where <datacenter_name> = the name of the datacenter as shown via nodetool status, and <total_number_of_nodes> = total # of nodes (in the cluster) ALTER KEYSPACE syndeia_cloud_graph WITH REPLICATION = { 'class' : 'NetworkTopologyStrategy', '<datacenter_name>' : <total_number_of_nodes> }; -- where <datacenter_name> = the name of the datacenter as shown via nodetool status, and <total_number_of_nodes> = total # of nodes (in the cluster) ALTER KEYSPACE syndeia_cloud_graph_config WITH REPLICATION = { 'class' : 'NetworkTopologyStrategy', '<datacenter_name>' : <total_number_of_nodes> }; -- where <datacenter_name> = the name of the datacenter as shown via nodetool status, and <total_number_of_nodes> = total # of nodes (in the cluster)
Run
nodetool repair
: Runnodetool repair --full
<keyspace_name> on each node (for more details see https://docs.datastax.com/en/dse/5.1/cql/cql/cql_using/cqlUpdateKeyspaceRF.html)
1819. Follow "Things to Consider in a Multi-Node JanusGraph Cluster" https://docs.janusgraph.org/0.3.1/things-to-consider-in-a-multi-node-janusgraph-cluster.html
1920. Repeat steps 13 14 ~ 18 19 for each additional cluster node.
...
Validating JanusGraph Operation for 1-node (or multiple nodes)
1921. To validate JanusGraph operation, we start a Gremlin client and issue commands to check the edges and vertices in our graph To do this, perform the following steps:
1921.1. Open a new terminal window
1921.2. Go to the bin folder in JanusGraph installation and type the following command: ./gremlin.sh
. You should see output similar to the below:
Code Block | ||||
---|---|---|---|---|
| ||||
$ ./gremlin.sh \,,,/ (o o) -----oOOo-(3)-oOOo----- SLF4J: Class path contains multiple SLF4J bindings. SLF4J: Found binding in [jar:file:/opt/janusgraph-0.3.1-hadoop2/lib/slf4j-log4j12-1.7.12.jar!/org/slf4j/impl/StaticLoggerBinder.class] SLF4J: Found binding in [jar:file:/opt/janusgraph-0.3.1-hadoop2/lib/logback-classic-1.1.2.jar!/org/slf4j/impl/StaticLoggerBinder.class] SLF4J: See http://www.slf4j.org/codes.html#multiple_bindings for an explanation. SLF4J: Actual binding is of type [org.slf4j.impl.Log4jLoggerFactory] plugin activated: janusgraph.imports plugin activated: tinkerpop.server plugin activated: tinkerpop.utilities 20:19:16 WARN org.apache.hadoop.util.NativeCodeLoader - Unable to load native-hadoop library for your platform... using builtin-java classes where applicable plugin activated: tinkerpop.hadoop plugin activated: tinkerpop.spark plugin activated: tinkerpop.tinkergraph gremlin> |
1921.3. Type the following commands, substituting your appropriate values as required:
Code Block | ||||
---|---|---|---|---|
| ||||
:remote connect tinkerpop.server conf/remote.yaml session :remote console graph = ConfiguredGraphFactory.open('syndeia_cloud_graph'); // should return: ==>standardjanusgraph[cql:[cassandra.mydomain.com]] g = graph.traversal(); g.V(); g.E(); |
The last 2 commands above should not return any results since the graph (syndeia_cloud_graph
) is empty - no vertices or edges.
1921.4. Type :quit
Page break macro |
---|
...