deepak8347
deepak8347
JJanusGraph
Created by deepak8347 on 1/20/2024 in #questions
Drop the Janus Graph Schema
Hello!! Hope you are having a good day! I have corrupted the schema of my Janusgraph and now I am not able to access my graph. Is there a way to drop the schema without deleting the data. I am using Cassandra. If dropping the data of some table solves this issue, then I can drop those tables.
2 replies
JJanusGraph
Created by deepak8347 on 1/9/2024 in #questions
Deleting static Vertex Labels from the database
Hello, hope you are having a good day! I have a vertexLabel in my schema which is sort of corrupted. Whenever I call isStatic on the vertexLabel, then it fails.
java.lang.NullPointerException
at org.janusgraph.graphdb.types.VertexLabelVertex.isStatic(VertexLabelVertex.java:46)
at com.booking.apate.commons.schema.SchemaBuilder.defineVertex(SchemaBuilder.java:68)
java.lang.NullPointerException
at org.janusgraph.graphdb.types.VertexLabelVertex.isStatic(VertexLabelVertex.java:46)
at com.booking.apate.commons.schema.SchemaBuilder.defineVertex(SchemaBuilder.java:68)
I tried deleting this label by calling calling remove method of the VertexLabel, but it does not remove this label from the schema. Maybe it is not deleting because there are vertices with this labels. Can you suggest some way to remove the vertexLabel and re-insert it again ? Or Can I drop the schema and reinsert it, I suppose if I drop schema, I will also have to drop the data.
2 replies
JJanusGraph
Created by deepak8347 on 10/11/2023 in #questions
Changing the Cardinality of a Property
I have a property which was created with the default cardinality (i.e. SINGLE), but I want the cardinality of this property to be Set. What is the easiest way to make this change.
4 replies
JJanusGraph
Created by deepak8347 on 8/22/2023 in #questions
Could not acquire new ID block from storage
Hello!! Hope you are having a good day!! What I am doing ? I am using Janus graph to store my graph in a Cassandra keyspace. My keyspace would have multiple graphs, so I am creating different tables for different graphs. for eg: If I have two separate graph, then I would have two different table for edgestore, lets say one table would be graph1_edgestore and the other table would be graph2_edgestore. I am using custom storage backend to write to such tables. Currently at one point of time, I am using only one graph. What is the issue I am facing ? I am facing the following error while creating the graph instance. I have attached the complete stack trace with this post
org.janusgraph.core.JanusGraphException: Could not acquire new ID block from storage
org.janusgraph.core.JanusGraphException: Could not acquire new ID block from storage
What I have tried ? 1. I checked that the table actually exists in the database. 2. I tried adding the id.authority.conflict-avoidance-tag and id.authority.wait-time
8 replies
JJanusGraph
Created by deepak8347 on 7/25/2023 in #questions
Multiple Graphs with Embedded JanusGraph
Hello!! I am using embedded Janusgraph (embedded JanusGraph as a library inside my Java Application). I am trying to figure out if I can write two different named graphs to the same database. I am trying to use https://docs.janusgraph.org/operations/configured-graph-factory/ to create multiple graphs. I set the name of the graph in graph.graphname in my JanusGraph configuration. But I get the following error while opening the graph
Gremlin Server must be configured to use the JanusGraphManager.
Gremlin Server must be configured to use the JanusGraphManager.
But I don't use the gremlin server and I am using embedded janusgraph. Can I create multiple dynamic graphs in the same storage ?
9 replies
JJanusGraph
Created by deepak8347 on 7/24/2023 in #questions
Drop an Graph From the Database
Hello!! I want to delete the graph stored in my database so that I can recreate the new graph. I am running the following command to delete the graph
JanusGraphFactory.drop(graph);
JanusGraphFactory.drop(graph);
1. Does it clean the graph schema too ? Or I need to drop schema separately ? 2. Does it deletes the data stored in the indexes ?
5 replies
JJanusGraph
Created by deepak8347 on 7/10/2023 in #questions
Using Spark with JansuGraph on a Cassandra storage backend
Hello there!! Hope you are having an awesome day. I am trying to use OLAP query for my janusgraph setup. I am using Cassandra for storing graph, but I am using our own defined custom storage backend class. I think that graph is created without using my storage backend. Can you please help me figure out what is wrong ? I am creating the graph using the following code.
graph = org.apache.tinkerpop.gremlin.structure.util.GraphFactory.open(executorConfig.getCassandraGraphConfiguration().getJanusGraphConfig());
graph = org.apache.tinkerpop.gremlin.structure.util.GraphFactory.open(executorConfig.getCassandraGraphConfiguration().getJanusGraphConfig());
cassandra:
janusGraphConfig:
gremlin:
graph: "org.apache.tinkerpop.gremlin.hadoop.structure.HadoopGraph"
hadoop:
graphReader: "org.janusgraph.hadoop.formats.cql.CqlInputFormat"
graphWriter: "org.apache.hadoop.mapreduce.lib.output.NullOutputFormat"
jarsInDistributedCache: true
inputLocation: none
outputLocation: output
persistContext: true
janusgraphmr:
ioformat:
conf:
storage:
backend: "com.company.department.diskstorage.companycassandra.CompanyCassandraStoreManager"
cassandra:
keyspace: "janusgraph-olap"
storage:
backend: "com.company.department.diskstorage.companycassandra.CompanyCassandraStoreManager"
cassandra:
keyspace: "janusgraph-olap"
cassandra:
input:
keyspace: "janusgraph-olap"
partitioner:
class: "org.apache.cassandra.dht.Murmur3Partitioner"
widerows: true
columnfamily: "edgestore"
spark:
master: "k8s:https://kubernetes.default.svc:443"
executor.memory: 1g
serializer: "org.apache.spark.serializer.KryoSerializer"
kryo.registrator: "org.janusgraph.hadoop.serialize.JanusGraphKryoRegistrator"
query:
batch: true
batch-property-prefetch: true
fast-property: true
force-index: false
graph:
replace-instance-if-exists: true
ids:
block-size: 10000000
cassandra:
janusGraphConfig:
gremlin:
graph: "org.apache.tinkerpop.gremlin.hadoop.structure.HadoopGraph"
hadoop:
graphReader: "org.janusgraph.hadoop.formats.cql.CqlInputFormat"
graphWriter: "org.apache.hadoop.mapreduce.lib.output.NullOutputFormat"
jarsInDistributedCache: true
inputLocation: none
outputLocation: output
persistContext: true
janusgraphmr:
ioformat:
conf:
storage:
backend: "com.company.department.diskstorage.companycassandra.CompanyCassandraStoreManager"
cassandra:
keyspace: "janusgraph-olap"
storage:
backend: "com.company.department.diskstorage.companycassandra.CompanyCassandraStoreManager"
cassandra:
keyspace: "janusgraph-olap"
cassandra:
input:
keyspace: "janusgraph-olap"
partitioner:
class: "org.apache.cassandra.dht.Murmur3Partitioner"
widerows: true
columnfamily: "edgestore"
spark:
master: "k8s:https://kubernetes.default.svc:443"
executor.memory: 1g
serializer: "org.apache.spark.serializer.KryoSerializer"
kryo.registrator: "org.janusgraph.hadoop.serialize.JanusGraphKryoRegistrator"
query:
batch: true
batch-property-prefetch: true
fast-property: true
force-index: false
graph:
replace-instance-if-exists: true
ids:
block-size: 10000000
10 replies