Date   

column with both mixed and composite index

Kumar Gaurav <gkuma...@...>
 

I have one numeric column which is defined as both mixed and composite index with unique index names.

In my query how I can make sure it is not using mixed index when I do exact match. Somehow when I query it gives me elastic warning but I am doing exact match.
Any guidance is appreciated- shipmentnumber is created as both mixed and composite

g.V().has("Device","shipmentnumber",shipmentnumber).out("IS_PRODUCT").has("model",material).dedup().valueMap(BaxterConstants.PART_NUMBER);




FYI,

request [POST http://0.0.0.0:9200/janusgraphdev_bycspowneddeviceshipmentnumber/_search?scroll=60s] returned 1 warnings: [299 Elasticsearch-6.6.0-a9861f4 "Trying to create more than 500 scroll contexts will not be allowed in the next major version by default. You can change the  [search.max_open_scroll_context] setting to use a greater default value or lower the number of scrolls that you need to run in parallel." "Sun, 27 Oct 2019 19:15:46 GMT"]


Re: opening graph created using older version of janus

Florian Hockmann <f...@...>
 

Did you read the upgrade instructions, especially for version 0.3.0?

https://docs.janusgraph.org/changelog/#upgrade-instructions_1

Am Donnerstag, 24. Oktober 2019 01:46:18 UTC+2 schrieb Baskar Vangili:

I have recently upgraded to Janus 0.4. But I have few graphs which were created using V 0.2.  When I open the older graph, I get the following error.

gremlin> getTraversalSource("4baa2b25-409c-4478-82eb-b225674b4ba2").V().count()

Please create configuration for this graph using the ConfigurationManagementGraph#createConfiguration API.

Type ':help' or ':h' for help.

Display stack trace? [yN]N


Any idea how to upgrade those older graphs to 0.4.0? Otherwise, how to open the older version of the graph using newer version of janus?

I don't want to drop and recreate the graph as I will lose all the data.

Thanks for your help.


Re: remove mixed index failed

Baskar Vangili <vanb...@...>
 

yes, Mixed index can only be disabled from gremlin. you have to remove it from indexing system.

mgmt=graph.openManagement()
mgmt.updateIndex(indexname, SchemaAction.DISABLE_INDEX).get()
mgmt.commit()
graph.tx().commit()
mgmt=graph.openManagement();
mgmt.awaitGraphIndexStatus(graph, 'indexname').status(SchemaStatus.DISABLED).call()


On Friday, October 12, 2018 at 12:01:16 AM UTC-7, willam boss wrote:
External mixed indexes must be removed in the indexing system directly.
Type ':help' or ':h' for help.
Display stack trace? [yN]y
java.lang.UnsupportedOperationException: External mixed indexes must be removed in the indexing system directly.
at org.janusgraph.graphdb.database.management.ManagementSystem.updateIndex(ManagementSystem.java:747)
at org.janusgraph.core.schema.JanusGraphManagement$updateIndex$0.call(Unknown Source)


is this mean we can't remove mixed index with gremlin shell ? 


    case REMOVE_INDEX:
                if (index instanceof RelationTypeIndex) {
                    builder = graph.getBackend().buildEdgeScanJob();
                } else {
                    JanusGraphIndex graphIndex = (JanusGraphIndex) index;
                    if (graphIndex.isMixedIndex())
                        throw new UnsupportedOperationException("External mixed indexes must be removed in the indexing system directly.");
                    builder = graph.getBackend().buildGraphIndexScanJob();
                }
                builder.setFinishJob(indexId.getIndexJobFinisher());
                builder.setJobId(indexId);
                builder.setJob(new IndexRemoveJob(graph, indexId.indexName, indexId.relationTypeName));
                try {
                    future = builder.execute();
                } catch (BackendException e) {
                    throw new JanusGraphException(e);
                }
                break;

how can I change my mixed index ?


Create one Gremlin query for several request in JanusGraph

Alexander Scherbatiy <stell...@...>
 

Hello,

I am writing a small system using JanusGraph which consists of nodes and links, both of which have types and a node contains some string value and a link consists of some other nodes and links.

I am writing a small system using JanusGraph which consists of nodes and links. A node contains type and value, and a link has type and list of other nodes and links.

The requirement is that a node with the same type and value has been stored only once in JanusGraph.

I have RawNode and RawLink classes with RawAtom as a supertype to represent nodes and links as trees in memory which are not unique
and Link and Node classes with Atom supertype to represent unique nodes and links in Janus Graph.

The ordinary pattern to create a node in JanusGraph checks if there is already a node with the given type and value in JanusGraph, if so then return its id else create new one. The same is for link.

Another option that I want to check would creating and sending one Gremlin request for link retrieving be faster than creating a separate gremlin request for each link children.

Below is the full code. There are some questions that I have:

1) The code to check if node exists and create it otherwise looks like:
------------------------
GraphTraversal<Object, Vertex> addVertex = addV(LABEL_NODE)
.property(T.id, storage.getNextId())
.property(KIND, LABEL_NODE)
.property(TYPE, node.type)
.property(VALUE, node.value);

return V()
.hasLabel(LABEL_NODE)
.has(TYPE, node.type)
.has(VALUE, node.value)
.fold()
.coalesce(unfold(), addVertex);
------------------------

If I call directly 'next()' on 'addVertex' I get "UnsupportedOperationException: Graph does not support adding vertices".

To make it work I use GraphTraversal from graph in the following way:
------------------------
Vertex v = g
.inject("nothing")
.union(getOrCreateNode(node))
.next();
------------------------
Is it possible to use 'addV()' method without injection some object and calling 'union' on g?


2) A link consists of other nodes and links in JanusGraph in a definite order so I have "prop_ids" property that contains concatenated list of children ids.

To get the link children I need to get "prop_ids" property, split it and retrieve children by corresponding ids.
Is this way usually faster rather than storing edges from a parent links to children with label like "CHILD" and property "position" with values from 0 to N-1, retrieving them all and sorting by "position" property?


3) To create a link I need to check if the link exists and if not create it.

To check if the link exists I first check or create its children and then obtains their ids.
To create the link I need to reuse children ids but it is not possible to reuse the GraphTraversal from the previous step second time.
My code looks like:
------------------------
GraphTraversal<Object, Vertex> addVertex = union(getOrCreateAtoms(link))
.id()
.fold()
.as("ids")
.addV(LABEL_LINK)
.property(KIND, LABEL_LINK)
.property(TYPE, link.type)
.property(IDS, select("ids").flatMap(MAP_IDS))
.property(T.id, storage.getNextId());

return union(getOrCreateAtoms(link))
.id()
.fold()
.as("ids")
.V()
.hasLabel(LABEL_LINK)
.has(KIND, LABEL_LINK)
.has(TYPE, link.type)
.has(IDS, select("ids").flatMap(MAP_IDS))
.fold()
.coalesce(unfold(), addVertex);
------------------------

where I first get a traversal for children 'getOrCreateAtoms(link)', use union and map functions to obtain their ids as one string.
I call 'getOrCreateAtoms(link)' twice one when I check that the link already exits in JanusGraph and one to create it.
Is it possible to reuse ids obtained in the 'check' step in 'create' step?

4) My code does not work as I expected when I use a link which consists of other link.

For example the following code works as expected:
-----------------
RawLink rawLink = new RawLink("Link1",
new RawLink("Link2",
new RawNode("Node1", "value1")),
new RawLink("Link3",
new RawNode("Node2", "value2")));

Link link = tx.getLink(rawLink);
System.out.printf("storage link: %s%n", link);
-----------------

The result is 'Link[1792]: Link1([2304, 3072])' - the link with id 1792 and type 'Link1' which consists of two children with ids: [2304, 3072]
I can dump the JanusGraph and get:
-----------------
Node[2560]: Node1(value1)
Link[2304]: Link2([2560])
Node[3328]: Node2(value2)
Link[3072]: Link3([3328])
Link[1792]: Link1([2304, 3072])
-----------------
and indeed ids [2304, 3072] points to 'Link2' and 'Link3'.

Now I change type of the top link to 'Link2' in the same link request:
----------------
// Type "Link1" has been changed to "Link2"
RawLink rawLink = new RawLink("Link2",
new RawLink("Link2",
new RawNode("Node1", "value1")),
new RawLink("Link3",
new RawNode("Node2", "value2")));
----------------

The result is 'Link[2304]: Link2([2560])' - the retrieved link had type 'Link2' as expected but only one child instead of two.
Here is the JanusGraph dump:
----------------
Node[2560]: Node1(value1)
Link[2304]: Link2([2560])
Node[3328]: Node2(value2)
Link[3072]: Link3([3328])
----------------

It shows that link with id 2304 contains node with id 2560 so it is not the top link with two children. The top link with two children was not even created. For some reason the code that checks if the link exists checked only type and not ids.

To debug that I printed the gremlin request but because I use map method to retrieve ids I only see
'prop_ids=[[SelectOneStep(last,ids), LambdaFlatMapStep(lambda)]]' for prop_ids property value.

What is the right way to check which value a lambda sets for a property in Gremlin request?

Thanks,
Alexander.

The full example code:
----------------------------------
public class DataStorageSample {

private static final boolean DEBUG = false;

public static void main(String[] args) throws Exception {

try (JanusGraphStorage storage = getInMemoryStorage();
JanusGraphStorageTransaction tx = storage.tx()) {

// try to change Link1 type to Link2
final RawLink rawLink = new RawLink("Link1",
new RawLink("Link2",
new RawNode("Node1", "value1")),
new RawLink("Link3",
new RawNode("Node2", "value2")));

Link link = tx.getLink(rawLink);
System.out.printf("raw link: %s%n", rawLink);
System.out.printf("storage link: %s%n", link);

tx.dump();
tx.commit();
}
}

private static JanusGraph getInMemoryGraph() {
return JanusGraphFactory.build()
.set("storage.backend", "inmemory")
.set("graph.set-vertex-id", "true")
.open();
}

private static JanusGraphStorage getInMemoryStorage() {
return new JanusGraphStorage(getInMemoryGraph());
}

// JanusGraph Storage

static class JanusGraphStorage implements Closeable {

long currentId = 0;
final JanusGraph graph;
final IDManager idManager;

public JanusGraphStorage(JanusGraph graph) {
this.graph = graph;
this.idManager = ((StandardJanusGraph) graph).getIDManager();
}

public JanusGraphStorageTransaction tx() {
return new JanusGraphStorageTransaction(this);
}

@Override
public void close() {
graph.close();
}

public long getNextId() {
return idManager.toVertexId(++currentId);
}
}

static class JanusGraphStorageTransaction implements Closeable {

// "type" is a reserved property name in JanusGraph
static final String KIND = "prop_kind";
static final String TYPE = "prop_type";
static final String VALUE = "prop_value";
static final String IDS = "prop_ids";

static final String LABEL_NODE = "Node";
static final String LABEL_LINK = "Link";

final JanusGraphStorage storage;
final JanusGraphTransaction tx;
final GraphTraversalSource g;

public JanusGraphStorageTransaction(JanusGraphStorage storage) {
this.storage = storage;
this.tx = storage.graph.newTransaction();
this.g = tx.traversal();
}

public Node getNode(RawNode node) {
GraphTraversal<String, Vertex> traversal = g
.inject("nothing")
.union(getOrCreateNode(node));

if (DEBUG) {
System.out.printf("get node: %s%n", traversal);
}

Vertex v = traversal.next();
return new Node(id(v), node.type, node.value);
}

public Link getLink(RawLink link) {

GraphTraversal<String, Vertex> traversal = g
.inject("nothing")
.union(getOrCreateLink(link));

if (DEBUG) {
System.out.printf("get link: %s%n", traversal);
}

Vertex v = traversal.next();
return new Link(id(v), link.type, ids(v));
}

public void commit() {
tx.commit();
}

@Override
public void close() {
tx.close();
}

private GraphTraversal<Object, Vertex> getOrCreateAtom(RawAtom atom) {
if (atom instanceof RawNode) {
return getOrCreateNode((RawNode) atom);
} else if (atom instanceof RawLink) {
return getOrCreateLink((RawLink) atom);
} else {
String msg = String.format("Unknown RawAtom class: %s", atom.getClass());
throw new RuntimeException(msg);
}
}

private GraphTraversal<Object, Vertex> getOrCreateNode(RawNode node) {

GraphTraversal<Object, Vertex> addVertex = addV(LABEL_NODE)
.property(T.id, storage.getNextId())
.property(KIND, LABEL_NODE)
.property(TYPE, node.type)
.property(VALUE, node.value);

return V()
.hasLabel(LABEL_NODE)
.has(TYPE, node.type)
.has(VALUE, node.value)
.fold()
.coalesce(unfold(), addVertex);
}

private GraphTraversal<Object, Vertex> getOrCreateLink(RawLink link) {

GraphTraversal<Object, Vertex> addVertex = union(getOrCreateAtoms(link))
.id()
.fold()
.as("ids")
.addV(LABEL_LINK)
.property(KIND, LABEL_LINK)
.property(TYPE, link.type)
.property(IDS, select("ids").flatMap(MAP_IDS))
.property(T.id, storage.getNextId());

return union(getOrCreateAtoms(link))
.id()
.fold()
.as("ids")
.V()
.hasLabel(LABEL_LINK)
.has(KIND, LABEL_LINK)
.has(TYPE, link.type)
.has(IDS, select("ids").flatMap(MAP_IDS))
.fold()
.coalesce(unfold(), addVertex);
}

private GraphTraversal<Object, Vertex>[] getOrCreateAtoms(RawLink link) {
int arity = link.getArity();
GraphTraversal<Object, Vertex>[] addAtoms = new GraphTraversal[arity];

for (int i = 0; i < arity; i++) {
addAtoms[i] = getOrCreateAtom(link.atoms[i]);
}
return addAtoms;
}

public void dump() {
System.out.printf("--- Storage Dump ---%n");
Iterator<Vertex> vertices = g.V();
while (vertices.hasNext()) {
Vertex v = vertices.next();
String kind = v.property(KIND).value().toString();
String type = v.property(TYPE).value().toString();
Object id = v.id();
if (LABEL_NODE.equals(kind)) {
String value = v.property(VALUE).value().toString();
System.out.printf("%s[%s]: %s(%s)%n", kind, id, type, value);
} else {
System.out.printf("%s[%s]: %s(%s)%n", kind, id, type, Arrays.toString(ids(v)));
}
}
System.out.printf("--- ------------ ---%n");
}

static long id(Vertex v) {
return (long) v.id();
}

static long[] ids(Vertex v) {
String ids = v.property(IDS).value().toString();
return toIds(ids);
}
}

static final Function<Traverser<Object>, Iterator<String>> MAP_IDS = t -> {
ArrayList arrayList = (ArrayList) t.get();
long[] ids = new long[arrayList.size()];
for (int i = 0; i < arrayList.size(); i++) {
ids[i] = (long) arrayList.get(i);
}
List<String> list = new ArrayList<>(1);
list.add(idsToString(ids));
return list.iterator();
};

static String idsToString(long... ids) {
StringBuilder builder = new StringBuilder();
for (long id : ids) {
builder.append(id).append(':');
}
return builder.toString();
}

static long[] toIds(String str) {
String[] split = str.split(":");

long[] ids = new long[split.length];

for (int i = 0; i < split.length; i++) {
ids[i] = Long.parseLong(split[i]);
}
return ids;
}

// Raw Atoms
static class RawAtom {

final String type;

public RawAtom(String type) {
this.type = type;
}
}

static class RawNode extends RawAtom {

final String value;

public RawNode(String type, String value) {
super(type);
this.value = value;
}

@Override
public String toString() {
return String.format("%s(%s)", type, value);
}
}

static class RawLink extends RawAtom {

final RawAtom[] atoms;

public RawLink(String type, RawAtom... atoms) {
super(type);
this.atoms = atoms;
}

public int getArity() {
return atoms.length;
}

@Override
public String toString() {
return String.format("%s(%s)", type, Arrays.toString(atoms));
}
}

// Atoms in JanusGraph Storage

static class Atom {
final long id;
final String type;

public Atom(long id, String type) {
this.id = id;
this.type = type;
}
}

static class Node extends Atom {
final String value;

public Node(long id, String type, String value) {
super(id, type);
this.value = value;
}

@Override
public String toString() {
return String.format("%s(%s) - Node[%d]", type, value, id);
}
}

static class Link extends Atom {

final long[] ids;

public Link(long id, String type, long... ids) {
super(id, type);
this.ids = ids;
}

@Override
public String toString() {
return String.format("Link[%d]: %s(%s)", id, type, Arrays.toString(ids));
}
}
}
----------------------------------


Problem with remote JanusGraph failing to execute bytecode with textContains and the Lambda function

chrism <cmil...@...>
 

I am trying to execute Java code:

g.V(491552912).repeat(__.out("job")).emit().has("staff", Text.textContains('chrism"))
.sideEffect(Lambda.consumer("it is having any code here") );

having exception  returned as:

org.apache.tinkerpop.gremlin.driver.exception.ResponseException:
javax.script.ScriptException: groovy.lang.MissingMethodException: 
No signature of method: static org.apache.tinkerpop.gremlin.process.traversal.P.textContains()
 is applicable for argument types: (String) values: [chrism]"

This part of the query works well:
g.V(491552912).repeat(__.out("job")).emit().has("staff", Text.textContains('chrism'))

this lambda code is also working well, and doing the job on the server, with my closure inside,
g.V(491552912).repeat(__.out("job")).emit().sideEffect(Lambda.consumer("it is having any code here") );

they simple do not work together.... it is enough to add any lambda: function, predicate, map,... to fail 
already working query, when having fundamental request to search for text by JanusGraph extensions to Tinkerpop,...

Can you offer us some hints please?

Cheers, CM



opening graph created using older version of janus

Baskar Vangili <vanb...@...>
 

I have recently upgraded to Janus 0.4. But I have few graphs which were created using V 0.2.  When I open the older graph, I get the following error.

gremlin> getTraversalSource("4baa2b25-409c-4478-82eb-b225674b4ba2").V().count()

Please create configuration for this graph using the ConfigurationManagementGraph#createConfiguration API.

Type ':help' or ':h' for help.

Display stack trace? [yN]N


Any idea how to upgrade those older graphs to 0.4.0? Otherwise, how to open the older version of the graph using newer version of janus?

I don't want to drop and recreate the graph as I will lose all the data.

Thanks for your help.


Re: Upgraded Janus Version to 0.4 and tinkerpop gremlin-server/console version to 3.4.1

Baskar Vangili <vanb...@...>
 

Got it. Thanks!


On Saturday, October 19, 2019 at 8:26:03 AM UTC-7, Oleksandr Porunov wrote:
First of all version `0.4.0` doesn't support ES version 7. Version 0.5.0 supports ES 7 but it isn't released yet. You may build your own jars from source code to support ES version 7.
Also, I see that you are upgrading directly from "0.2.0" to "0.4.0". I personally didn't test it and would suggest to upgrade to version "0.3.0" and then "0.4.0".
See this upgrade instructions for 0.3.0: https://docs.janusgraph.org/changelog#upgrade-instructions_1
See this upgrade instructions for 0.4.0: https://docs.janusgraph.org/changelog#upgrade-instructions

On Friday, October 18, 2019 at 5:19:55 PM UTC+3, Baskar Vangili wrote:
I have upgraded janus version to 0.4.0 and tinker pop version to 3.4.1. 
Index Backend ES version: 7.3.2
Cassandra Version: 3.3.0

After the upgrade, I am getting this error. Any idea what's happening here? 

"error":"com.google.common.util.concurrent.UncheckedExecutionException: org.janusgraph.core.JanusGraphException: StorageBackend version is incompatible with current JanusGraph version: storage [0.4.0] vs. runtime [0.2.0]\n\tat com.google.common.cache.LocalCache$Segment.get(LocalCache.java:2203)\n\tat com.google.common.cache.LocalCache.get(LocalCache.java:3937)\n\tat com.google.common.cache.LocalCache.getOrLoad(LocalCache.java:3941)\n\tat com.google.common.cache.LocalCache$LocalLoadingCache.get(LocalCache.java:4824)




Re: janusgraph 0.5.0 release date

Baskar Vangili <vanb...@...>
 

Thanks, Oleksandr.  We have to include this in our product and internal process doesn't allow us to push any unreleased jars. Let me check with them. But, any idea on the release date?


On Saturday, October 19, 2019 at 8:19:47 AM UTC-7, Oleksandr Porunov wrote:
You can build your own jars from source code (master branch is 0.5.0 branch). "mvn clean install -DskipTests=true". Then you can use necessary jars in your project. Just don't include CI jars in your project.
Also, "vavr" and "high-scale-lib" may be necessary also.
For example, if you put necesary jars in "libs" folder in your project and you are using "Gradle" then you may use next dependencies:
compile group: 'io.vavr', name: 'vavr', version: '0.9.2'
compile group: 'com.github.stephenc.high-scale-lib', name: 'high-scale-lib', version: '1.1.1'
compile fileTree(dir: 'libs', include: ['*.jar'])

On Friday, October 18, 2019 at 5:19:55 PM UTC+3, Baskar Vangili wrote:
We are using Elastic Search 7.3.2 as index backend. Janusgraph latest version 0.4.0 doesn't support this version but 0.5.0 supports. When is the release date for 0.5.0? If it is far, any workaround which I can make in 0.4.0 to support ES 7.3.2?


JanusGraph, Cassandra, and concurrency

Pa S <colds...@...>
 

I just recently got done implementing a Gremlin versioned upsert pattern that implements a standard "optimistic concurrency" pattern of only updating an entry in a database if a version number in the update matches what is already in the database.  This allows a safe read/modify/write of graph vertexes in situations where more than one client may be updating the same entry.

This recipe is available in a Gist and I'd be happy to contribute to the Recipes book if someone thinks this is useful.  I plan on extending this to edges and some common vertex-edge patterns such as 'owned_by'.

This brings to mind a more fundamental question:  Can JanusGrah on top of Cassandra correctly handle simultaneous updates to the same local vertexes and edges?  And by correctly, I mean does the graph get corrupted beyond repair, or does perhaps an edge occasionally not get updated, or some other behavior?

My general use case is very similar to that of a social graph

Paul

PS: Thanks to StackExchange user Stephen Mallette for helping me out.


Re: Concurrent TimeoutException on connection to gremlin server remotely

Stephen Mallette <spmal...@...>
 

hmm, i'm not sure how the HttpGremlinEndpointHandler would log an error if it didn't get a request. nothing in TinkerPop that I can think of would issue a request to that. we don't even recommend that folks use that really. 

anyway, that aside, i'm not aware of situations where Gremlin Server will have a successful init script run only to later lose a global binding. it's actually "hard" to get rid of a reference bound to the ScriptEngine once it's in there. I guess I would try to do some debugging in the init script to try to figure out what's happening. Perhaps, verify that "g2" actually works at time of init? Like, maybe:

g =  graph2.traversal()
ctx.logger.info("found a vertex: " + g.V().limit(1).next())
globals << [g2: g,g1:graph1.traversal()]



On Tue, Oct 22, 2019 at 8:50 AM <sarthak...@...> wrote:
That's all the log I have right now. The startup looks clean to me. And this isn't a failure of a request. At least no request from client (our) side. If gremlin or hbase is sending any request, like a ping to verify connection, then I'm not sure about that.

But what could be the reason of this random behaviour? If the properties were wrong, then it shouldn't start or configure at any point. But it is just random.

--
You received this message because you are subscribed to the Google Groups "JanusGraph users" group.
To unsubscribe from this group and stop receiving emails from it, send an email to janusgra...@....
To view this discussion on the web visit https://groups.google.com/d/msgid/janusgraph-users/2253b886-1487-484d-baf3-8686b224859b%40googlegroups.com.


Re: Concurrent TimeoutException on connection to gremlin server remotely

sarthak...@...
 

That's all the log I have right now. The startup looks clean to me. And this isn't a failure of a request. At least no request from client (our) side. If gremlin or hbase is sending any request, like a ping to verify connection, then I'm not sure about that.

But what could be the reason of this random behaviour? If the properties were wrong, then it shouldn't start or configure at any point. But it is just random.


Re: can't removel an already DISABLED index and can't rebuild index with the same propertykey name

Pino Chang <17600...@...>
 

Hi ,
thank you for your useful case. This trick is sovled my issue.

Thanks again!
Pino

在 2019年10月22日星期二 UTC+8上午10:11:22,Shubhram Mohanty写道:

Hi There,

I had experienced the same issue, where I had an use case to rebuild the index. You are right on what you mentioned about the official documentation. 

So, the trick that I applied here was after REMOVE_INDEX operation, I renamed the corresponding index to something as <current_index_name>_hash_generated_key
With a precautionary check that this name doesn’t exist already in the schema.

As already mentioned in the documentation that after REMOVE_INDEX operation, janus only keeps index definition information and no data as such, there is not much wastage of memory as well.

With that said, you can easily proceed to build your index with that name again. Hope, it solves your use case.

Regards,
Shubhram



On Mon, 21 Oct 2019 at 19:39, gaming CG <17...@...> wrote:
In my work,i disabled a composite index inorder to remove it,I have confirm that the index status is DISABLE, but it can't be remove by SchamaAction.REMOVE_INDEX operation. when i check the index, it still shows up in management interface as DISABLED(official document say this is normal), but i can't rebuild index with the same propertykey name

--
You received this message because you are subscribed to the Google Groups "JanusGraph users" group.
To unsubscribe from this group and stop receiving emails from it, send an email to janusgra...@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/janusgraph-users/fce83bf8-0538-404a-ba1b-84884c26121d%40googlegroups.com.


Re: can't removel an already DISABLED index and can't rebuild index with the same propertykey name

Shubhram Mohanty <mohanty...@...>
 

Hi There,

I had experienced the same issue, where I had an use case to rebuild the index. You are right on what you mentioned about the official documentation. 

So, the trick that I applied here was after REMOVE_INDEX operation, I renamed the corresponding index to something as <current_index_name>_hash_generated_key
With a precautionary check that this name doesn’t exist already in the schema.

As already mentioned in the documentation that after REMOVE_INDEX operation, janus only keeps index definition information and no data as such, there is not much wastage of memory as well.

With that said, you can easily proceed to build your index with that name again. Hope, it solves your use case.

Regards,
Shubhram



On Mon, 21 Oct 2019 at 19:39, gaming CG <17600...@...> wrote:
In my work,i disabled a composite index inorder to remove it,I have confirm that the index status is DISABLE, but it can't be remove by SchamaAction.REMOVE_INDEX operation. when i check the index, it still shows up in management interface as DISABLED(official document say this is normal), but i can't rebuild index with the same propertykey name

--
You received this message because you are subscribed to the Google Groups "JanusGraph users" group.
To unsubscribe from this group and stop receiving emails from it, send an email to janusgra...@....
To view this discussion on the web visit https://groups.google.com/d/msgid/janusgraph-users/fce83bf8-0538-404a-ba1b-84884c26121d%40googlegroups.com.


Re: Janusgraph Hadoop Spark standalone cluster - Janusgraph job always creates constant number 513 of Spark tasks

marc.d...@...
 

Hi Dimitar,

Your spark screenshots do not show any parallelism. You state that your spark cluster only has a single worker. It seems that this worker also has only one core available (the spark.executor.cores property is not specified, so by default all available worker cores would be available to SparkGraphComputer). Without any parallelism a spark job will never be faster that an application without spark.

That being said, I do not understand why a single task takes 2 seconds. Retrieving 4 rows by average from Cassandra should rather take some 40 ms, so we are two orders of speed away from that. Apparently each task has some unexplained overhead, for setting up ........???? I would expect that the spark worker keeps its JVM, and that SparkGraphComputer keeps its classes loaded and its Cassandra connection established between tasks.

What I also do not understand is why the different 23 minute jobs are scheduled with a large delay in between. Is the underlying cloud not available? Would that also mean that the vcores used in the spark worker have a very low performance?  I would first try some simple spark jobs for a test application (no janusgraph, no cassandra) and be sure that you have a standalone spark cluster that behaves as expected: parallelism visible in the executor tab of the spark UI and no strange waiting periods between jobs of a single application.

Cheers,    Marc






Op maandag 21 oktober 2019 11:23:26 UTC+2 schreef Dimitar Tenev:

Hi Marc,

The output of nodetool gives: Number of partitions (estimate): 967 the whole output is attached as "nodetool_log.txt". 
Regarding the Spark configuration - Yes I have used the guides from the link you have provided, and "janus-spark.properties" (attached) is the graph configuration which I use for "og". I have also attached the html pages from Spark UI for the janusgraph job (Stage, Job, Environment) as spark.zip. Spark is configured with one master and one worker node, and yes the worker node output shows that the tasks are processed by it. Any help is appreciated!

Thanks,
Dimitar 

On Monday, October 21, 2019 at 10:48:00 AM UTC+3, ma...@... wrote:
Hi Dimitar,

The number 513 is probably the number of Cassandra partitions. You can inspect the number of partitions in the tables of the Cassandra cluster with:
$ nodetool tablestats <your_keyspace>

Involving SparkGraphComputer only helps for a large number of vertices (100.000+) because there is a lot of one-off overhead for instantiating the JVM's for the Spark executors. Even then, the 25 minutes you mention is excessive. Are you sure your k8s spark cluster was used? The janusgraph default is to use spark local inside your janusgraph container, see the docs for how to configure JanusGraph for a Spark standalone cluster.

HTH,     Marc


Op vrijdag 18 oktober 2019 16:19:19 UTC+2 schreef dim...@...:
Hello,

I have setup Janusgraph 0.4.0 with Hadoop 2.9.0 and Spark 2.4.4 in a K8s cluster.
I connect to Janusgraph from gremlin console and execute: 
gremlin> og
==>graphtraversalsource[hadoopgraph[cassandra3inputformat->gryooutputformat], sparkgraphcomputer]
gremlin> g.V().count()
==>1889

It takes 25min to do the count! The same time took when there were no vertices - e.g. -> 0.  Spark job shows that there were 513 tasks run! Number of task is always constant 513 no matter of the number of vertices.
I have set "spark.sql.shuffle.partitions=4" at spark job's environment, but again the number of Spark tasks was 513! My assumption is that Janusgraph somehow specifies this number of tasks when submits the job to Spark.
The questions are:
- Why Janusgraph job submitted to Spark is always palatalized to 513 tasks? 
- How to manage the number of tasks which are created for a Janusgrap job? 
- How to minimize the execution time of OLAP query for this small graph (OLTP query takes less than a second to execute)?

Thanks,
Dimitar


Re: Concurrent TimeoutException on connection to gremlin server remotely

Stephen Mallette <spmal...@...>
 

That seems to be the failure as a result of a request - is that right?  I'm wondering if there is an error at server startup when the script executes that you're missing? Or do the startup logs look clean?


On Mon, Oct 21, 2019 at 2:38 PM <sarthak...@...> wrote:
Hi Stephen,
Below is the error I get for g2

```
globals << [g2:graph2.traversal(),g1:graph1.traversal()] took 894ms
08:14:59.098 [gremlin-server-exec-2] ERROR o.a.t.g.j.DefaultGremlinScriptEngineManager - Could not create GremlinScriptEngine for gremlin-groovy
java.lang.IllegalStateException: javax.script.ScriptException: javax.script.ScriptException: groovy.lang.MissingPropertyException: No such property: g2 for class: Script12902
at org.apache.tinkerpop.gremlin.jsr223.DefaultGremlinScriptEngineManager.lambda$createGremlinScriptEngine$16(DefaultGremlinScriptEngineManager.java:464) ~[gremlin-core-3.3.3.jar:3.3.3] at java.util.stream.ForEachOps$ForEachOp$OfRef.accept(ForEachOps.java:183) ~[na:1.8.0_222] at java.util.stream.ReferencePipeline$3$1.accept(ReferencePipeline.java:193) ~[na:1.8.0_222] at java.util.ArrayList$ArrayListSpliterator.forEachRemaining(ArrayList.java:1382) ~[na:1.8.0_222] at java.util.stream.ReferencePipeline$Head.forEach(ReferencePipeline.java:647) ~[na:1.8.0_222] at java.util.stream.ReferencePipeline$7$1.accept(ReferencePipeline.java:272) ~[na:1.8.0_222] at java.util.ArrayList$ArrayListSpliterator.forEachRemaining(ArrayList.java:1382) ~[na:1.8.0_222] at java.util.stream.AbstractPipeline.copyInto(AbstractPipeline.java:482) ~[na:1.8.0_222] at java.util.stream.AbstractPipeline.wrapAndCopyInto(AbstractPipeline.java:472) ~[na:1.8.0_222] at java.util.stream.ForEachOps$ForEachOp.evaluateSequential(ForEachOps.java:150) ~[na:1.8.0_222] at java.util.stream.ForEachOps$ForEachOp$OfRef.evaluateSequential(ForEachOps.java:173) ~[na:1.8.0_222] at java.util.stream.AbstractPipeline.evaluate(AbstractPipeline.java:234) ~[na:1.8.0_222] at java.util.stream.ReferencePipeline.forEach(ReferencePipeline.java:485) ~[na:1.8.0_222] at org.apache.tinkerpop.gremlin.jsr223.DefaultGremlinScriptEngineManager.createGremlinScriptEngine(DefaultGremlinScriptEngineManager.java:450) ~[gremlin-core-3.3.3.jar:3.3.3] at org.apache.tinkerpop.gremlin.jsr223.DefaultGremlinScriptEngineManager.getEngineByName(DefaultGremlinScriptEngineManager.java:219) ~[gremlin-core-3.3.3.jar:3.3.3] at org.apache.tinkerpop.gremlin.jsr223.CachedGremlinScriptEngineManager.lambda$getEngineByName$0(CachedGremlinScriptEngineManager.java:57) [gremlin-core-3.3.3.jar:3.3.3] at java.util.concurrent.ConcurrentHashMap.computeIfAbsent(ConcurrentHashMap.java:1660) ~[na:1.8.0_222] at org.apache.tinkerpop.gremlin.jsr223.CachedGremlinScriptEngineManager.getEngineByName(CachedGremlinScriptEngineManager.java:57) [gremlin-core-3.3.3.jar:3.3.3] at org.apache.tinkerpop.gremlin.groovy.engine.GremlinExecutor.lambda$eval$0(GremlinExecutor.java:263) ~[gremlin-groovy-3.3.3.jar:3.3.3] at java.util.concurrent.FutureTask.run(FutureTask.java:266) ~[na:1.8.0_222] at java.util.concurrent.Executors$RunnableAdapter.call(Executors.java:511) ~[na:1.8.0_222] at java.util.concurrent.FutureTask.run(FutureTask.java:266) ~[na:1.8.0_222] at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1149) ~[na:1.8.0_222] at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:624) ~[na:1.8.0_222] at java.lang.Thread.run(Thread.java:748) ~[na:1.8.0_222] Caused by: javax.script.ScriptException: javax.script.ScriptException: groovy.lang.MissingPropertyException: No such property: g2 for class: Script12902 at org.apache.tinkerpop.gremlin.groovy.jsr223.GremlinGroovyScriptEngine.eval(GremlinGroovyScriptEngine.java:397) ~[gremlin-groovy-3.3.3.jar:3.3.3] at javax.script.AbstractScriptEngine.eval(AbstractScriptEngine.java:264) ~[na:1.8.0_222] at org.apache.tinkerpop.gremlin.jsr223.DefaultGremlinScriptEngineManager.lambda$createGremlinScriptEngine$16(DefaultGremlinScriptEngineManager.java:460) ~[gremlin-core-3.3.3.jar:3.3.3] ... 24 common frames omitted Caused by: javax.script.ScriptException: groovy.lang.MissingPropertyException: No such property: g2 for class: Script12902
at org.apache.tinkerpop.gremlin.groovy.jsr223.GremlinGroovyScriptEngine.eval(GremlinGroovyScriptEngine.java:713) ~[gremlin-groovy-3.3.3.jar:3.3.3] at org.apache.tinkerpop.gremlin.groovy.jsr223.GremlinGroovyScriptEngine.eval(GremlinGroovyScriptEngine.java:395) ~[gremlin-groovy-3.3.3.jar:3.3.3] ... 26 common frames omitted Caused by: groovy.lang.MissingPropertyException: No such property: g2 for class: Script12902
at org.codehaus.groovy.runtime.ScriptBytecodeAdapter.unwrap(ScriptBytecodeAdapter.java:66) ~[groovy-2.4.15-indy.jar:2.4.15] at org.codehaus.groovy.runtime.callsite.PogoGetPropertySite.getProperty(PogoGetPropertySite.java:51) ~[groovy-2.4.15-indy.jar:2.4.15] at org.codehaus.groovy.runtime.callsite.AbstractCallSite.callGroovyObjectGetProperty(AbstractCallSite.java:310) ~[groovy-2.4.15-indy.jar:2.4.15] at Script12902.run(Script12902.groovy:40) ~[na:na] at org.apache.tinkerpop.gremlin.groovy.jsr223.GremlinGroovyScriptEngine.eval(GremlinGroovyScriptEngine.java:690) ~[gremlin-groovy-3.3.3.jar:3.3.3] ... 27 common frames omitted 08:14:59.099 [gremlin-server-exec-2] WARN o.a.t.g.s.h.HttpGremlinEndpointHandler - Invalid request - responding with 500 Internal Server Error and gremlin-groovy is not an available GremlinScriptEngine java.lang.IllegalArgumentException: gremlin-groovy is not an available GremlinScriptEngine at org.apache.tinkerpop.gremlin.jsr223.CachedGremlinScriptEngineManager.registerLookUpInfo(CachedGremlinScriptEngineManager.java:95) ~[gremlin-core-3.3.3.jar:3.3.3] at org.apache.tinkerpop.gremlin.jsr223.CachedGremlinScriptEngineManager.getEngineByName(CachedGremlinScriptEngineManager.java:58) ~[gremlin-core-3.3.3.jar:3.3.3] at org.apache.tinkerpop.gremlin.groovy.engine.GremlinExecutor.lambda$eval$0(GremlinExecutor.java:263) ~[gremlin-groovy-3.3.3.jar:3.3.3] at java.util.concurrent.FutureTask.run(FutureTask.java:266) ~[na:1.8.0_222] at java.util.concurrent.Executors$RunnableAdapter.call(Executors.java:511) ~[na:1.8.0_222] at java.util.concurrent.FutureTask.run(FutureTask.java:266) ~[na:1.8.0_222] at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1149) ~[na:1.8.0_222] at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:624) ~[na:1.8.0_222] at java.lang.Thread.run(Thread.java:748) ~[na:1.8.0_222] 08:14:59.099 [gremlin-server-worker-1] DEBUG log-aggregator-encoder - [id: 0x2216578e, L:/127.0.0.1:8182 - R:/127.0.0.1:36244] WRITE: 70B ``` gremlin-server.yaml ```
graphs: {
  graph1: conf/janusgraph-hbase.properties,graph2: conf/janusgraph-insights-hbase.properties
}
```

--
You received this message because you are subscribed to the Google Groups "JanusGraph users" group.
To unsubscribe from this group and stop receiving emails from it, send an email to janusgra...@....
To view this discussion on the web visit https://groups.google.com/d/msgid/janusgraph-users/4a9dd12d-22b3-46d8-b458-084266c3a493%40googlegroups.com.


Re: Concurrent TimeoutException on connection to gremlin server remotely

sarthak...@...
 

Hi Stephen,
Below is the error I get for g2

```
globals << [g2:graph2.traversal(),g1:graph1.traversal()] took 894ms
08:14:59.098 [gremlin-server-exec-2] ERROR o.a.t.g.j.DefaultGremlinScriptEngineManager - Could not create GremlinScriptEngine for gremlin-groovy
java.lang.IllegalStateException: javax.script.ScriptException: javax.script.ScriptException: groovy.lang.MissingPropertyException: No such property: g2 for class: Script12902
at org.apache.tinkerpop.gremlin.jsr223.DefaultGremlinScriptEngineManager.lambda$createGremlinScriptEngine$16(DefaultGremlinScriptEngineManager.java:464) ~[gremlin-core-3.3.3.jar:3.3.3] at java.util.stream.ForEachOps$ForEachOp$OfRef.accept(ForEachOps.java:183) ~[na:1.8.0_222] at java.util.stream.ReferencePipeline$3$1.accept(ReferencePipeline.java:193) ~[na:1.8.0_222] at java.util.ArrayList$ArrayListSpliterator.forEachRemaining(ArrayList.java:1382) ~[na:1.8.0_222] at java.util.stream.ReferencePipeline$Head.forEach(ReferencePipeline.java:647) ~[na:1.8.0_222] at java.util.stream.ReferencePipeline$7$1.accept(ReferencePipeline.java:272) ~[na:1.8.0_222] at java.util.ArrayList$ArrayListSpliterator.forEachRemaining(ArrayList.java:1382) ~[na:1.8.0_222] at java.util.stream.AbstractPipeline.copyInto(AbstractPipeline.java:482) ~[na:1.8.0_222] at java.util.stream.AbstractPipeline.wrapAndCopyInto(AbstractPipeline.java:472) ~[na:1.8.0_222] at java.util.stream.ForEachOps$ForEachOp.evaluateSequential(ForEachOps.java:150) ~[na:1.8.0_222] at java.util.stream.ForEachOps$ForEachOp$OfRef.evaluateSequential(ForEachOps.java:173) ~[na:1.8.0_222] at java.util.stream.AbstractPipeline.evaluate(AbstractPipeline.java:234) ~[na:1.8.0_222] at java.util.stream.ReferencePipeline.forEach(ReferencePipeline.java:485) ~[na:1.8.0_222] at org.apache.tinkerpop.gremlin.jsr223.DefaultGremlinScriptEngineManager.createGremlinScriptEngine(DefaultGremlinScriptEngineManager.java:450) ~[gremlin-core-3.3.3.jar:3.3.3] at org.apache.tinkerpop.gremlin.jsr223.DefaultGremlinScriptEngineManager.getEngineByName(DefaultGremlinScriptEngineManager.java:219) ~[gremlin-core-3.3.3.jar:3.3.3] at org.apache.tinkerpop.gremlin.jsr223.CachedGremlinScriptEngineManager.lambda$getEngineByName$0(CachedGremlinScriptEngineManager.java:57) [gremlin-core-3.3.3.jar:3.3.3] at java.util.concurrent.ConcurrentHashMap.computeIfAbsent(ConcurrentHashMap.java:1660) ~[na:1.8.0_222] at org.apache.tinkerpop.gremlin.jsr223.CachedGremlinScriptEngineManager.getEngineByName(CachedGremlinScriptEngineManager.java:57) [gremlin-core-3.3.3.jar:3.3.3] at org.apache.tinkerpop.gremlin.groovy.engine.GremlinExecutor.lambda$eval$0(GremlinExecutor.java:263) ~[gremlin-groovy-3.3.3.jar:3.3.3] at java.util.concurrent.FutureTask.run(FutureTask.java:266) ~[na:1.8.0_222] at java.util.concurrent.Executors$RunnableAdapter.call(Executors.java:511) ~[na:1.8.0_222] at java.util.concurrent.FutureTask.run(FutureTask.java:266) ~[na:1.8.0_222] at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1149) ~[na:1.8.0_222] at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:624) ~[na:1.8.0_222] at java.lang.Thread.run(Thread.java:748) ~[na:1.8.0_222] Caused by: javax.script.ScriptException: javax.script.ScriptException: groovy.lang.MissingPropertyException: No such property: g2 for class: Script12902 at org.apache.tinkerpop.gremlin.groovy.jsr223.GremlinGroovyScriptEngine.eval(GremlinGroovyScriptEngine.java:397) ~[gremlin-groovy-3.3.3.jar:3.3.3] at javax.script.AbstractScriptEngine.eval(AbstractScriptEngine.java:264) ~[na:1.8.0_222] at org.apache.tinkerpop.gremlin.jsr223.DefaultGremlinScriptEngineManager.lambda$createGremlinScriptEngine$16(DefaultGremlinScriptEngineManager.java:460) ~[gremlin-core-3.3.3.jar:3.3.3] ... 24 common frames omitted Caused by: javax.script.ScriptException: groovy.lang.MissingPropertyException: No such property: g2 for class: Script12902
at org.apache.tinkerpop.gremlin.groovy.jsr223.GremlinGroovyScriptEngine.eval(GremlinGroovyScriptEngine.java:713) ~[gremlin-groovy-3.3.3.jar:3.3.3] at org.apache.tinkerpop.gremlin.groovy.jsr223.GremlinGroovyScriptEngine.eval(GremlinGroovyScriptEngine.java:395) ~[gremlin-groovy-3.3.3.jar:3.3.3] ... 26 common frames omitted Caused by: groovy.lang.MissingPropertyException: No such property: g2 for class: Script12902
at org.codehaus.groovy.runtime.ScriptBytecodeAdapter.unwrap(ScriptBytecodeAdapter.java:66) ~[groovy-2.4.15-indy.jar:2.4.15] at org.codehaus.groovy.runtime.callsite.PogoGetPropertySite.getProperty(PogoGetPropertySite.java:51) ~[groovy-2.4.15-indy.jar:2.4.15] at org.codehaus.groovy.runtime.callsite.AbstractCallSite.callGroovyObjectGetProperty(AbstractCallSite.java:310) ~[groovy-2.4.15-indy.jar:2.4.15] at Script12902.run(Script12902.groovy:40) ~[na:na] at org.apache.tinkerpop.gremlin.groovy.jsr223.GremlinGroovyScriptEngine.eval(GremlinGroovyScriptEngine.java:690) ~[gremlin-groovy-3.3.3.jar:3.3.3] ... 27 common frames omitted 08:14:59.099 [gremlin-server-exec-2] WARN o.a.t.g.s.h.HttpGremlinEndpointHandler - Invalid request - responding with 500 Internal Server Error and gremlin-groovy is not an available GremlinScriptEngine java.lang.IllegalArgumentException: gremlin-groovy is not an available GremlinScriptEngine at org.apache.tinkerpop.gremlin.jsr223.CachedGremlinScriptEngineManager.registerLookUpInfo(CachedGremlinScriptEngineManager.java:95) ~[gremlin-core-3.3.3.jar:3.3.3] at org.apache.tinkerpop.gremlin.jsr223.CachedGremlinScriptEngineManager.getEngineByName(CachedGremlinScriptEngineManager.java:58) ~[gremlin-core-3.3.3.jar:3.3.3] at org.apache.tinkerpop.gremlin.groovy.engine.GremlinExecutor.lambda$eval$0(GremlinExecutor.java:263) ~[gremlin-groovy-3.3.3.jar:3.3.3] at java.util.concurrent.FutureTask.run(FutureTask.java:266) ~[na:1.8.0_222] at java.util.concurrent.Executors$RunnableAdapter.call(Executors.java:511) ~[na:1.8.0_222] at java.util.concurrent.FutureTask.run(FutureTask.java:266) ~[na:1.8.0_222] at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1149) ~[na:1.8.0_222] at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:624) ~[na:1.8.0_222] at java.lang.Thread.run(Thread.java:748) ~[na:1.8.0_222] 08:14:59.099 [gremlin-server-worker-1] DEBUG log-aggregator-encoder - [id: 0x2216578e, L:/127.0.0.1:8182 - R:/127.0.0.1:36244] WRITE: 70B ``` gremlin-server.yaml ```
graphs: {
  graph1: conf/janusgraph-hbase.properties,graph2: conf/janusgraph-insights-hbase.properties
}
```


Re: Concurrent TimeoutException on connection to gremlin server remotely

sarthak...@...
 

Well I don't have the error message right now. I'll post it when I'll run in that scenario again but the thing is the gremlin server starts. But graph isn't initialised. i.e. g2 isn't available for querying data. And after restarting the service, with the same properties, it works fine. 

So, I couldn't understand this random behaviour. 

Also, should the value in `storage.hbase.table` name in properties file provided to gremlin-server.yaml be already created in hbase table?? 

We first start the service then insert the data in hbase which created the table and then query the results.


Re: Concurrent TimeoutException on connection to gremlin server remotely

Stephen Mallette <spmal...@...>
 

I'm reading this as a JanusGraph-hbase specific sort of question and I'm not sure what the issue might be there. When you say "g2" doesn't get initialized, do you get an error in the server startup? or is it some other kind of error?


On Mon, Oct 21, 2019 at 10:33 AM <sarthak...@...> wrote:
Ok. Got it. Thanks Stephen.

I just have another query. Maybe you can help.

So I have multiple graphs which I have defined them in my `gremlin-server.yaml`

```
graphs: {
  graph1: conf/janusgraph-hbase.properties,graph2: conf/janusgraph-insights-hbase.properties
scriptEngines: {
gremlin-groovy: {
scripts[scripts/empty-sample.groovy],
plugins: { org.janusgraph.graphdb.tinkerpop.plugin.JanusGraphGremlinPlugin: {},
org.apache.tinkerpop.gremlin.server.jsr223.GremlinServerGremlinPlugin: {},
org.apache.tinkerpop.gremlin.tinkergraph.jsr223.TinkerGraphGremlinPlugin: {},
org.apache.tinkerpop.gremlin.jsr223.ImportGremlinPlugin: {classImports: [java.lang.Math], methodImports: [java.lang.Math#*]},
org.apache.tinkerpop.gremlin.jsr223.ScriptFileGremlinPlugin: {files: [scripts/empty-sample.groovy]}}
}
}
```

And to initialise them at run time, I have mentioned these graph in my empty-sample.groovy

```
// define the default TraversalSource to bind queries to - this one will be named "g".
globals << [g2: graph2.traversal(),g1:graph1.traversal()]
```

The issue here is, sometimes this g2 doesn't get initialised at runtime.. and if I restart my server again.. it works.. The only difference between these properties file is storage.hbase.table

What could be the reason behind this random behaviour? 

--
You received this message because you are subscribed to the Google Groups "JanusGraph users" group.
To unsubscribe from this group and stop receiving emails from it, send an email to janusgra...@....
To view this discussion on the web visit https://groups.google.com/d/msgid/janusgraph-users/efad350c-7d43-44a8-a3b7-39197f2577e3%40googlegroups.com.


Re: Concurrent TimeoutException on connection to gremlin server remotely

sarthak...@...
 

Ok. Got it. Thanks Stephen.

I just have another query. Maybe you can help.

So I have multiple graphs which I have defined them in my `gremlin-server.yaml`

```
graphs: {
  graph1: conf/janusgraph-hbase.properties,graph2: conf/janusgraph-insights-hbase.properties
}
scriptEngines: {
gremlin-groovy: {
scripts: [scripts/empty-sample.groovy],
plugins: { org.janusgraph.graphdb.tinkerpop.plugin.JanusGraphGremlinPlugin: {},
org.apache.tinkerpop.gremlin.server.jsr223.GremlinServerGremlinPlugin: {},
org.apache.tinkerpop.gremlin.tinkergraph.jsr223.TinkerGraphGremlinPlugin: {},
org.apache.tinkerpop.gremlin.jsr223.ImportGremlinPlugin: {classImports: [java.lang.Math], methodImports: [java.lang.Math#*]},
org.apache.tinkerpop.gremlin.jsr223.ScriptFileGremlinPlugin: {files: [scripts/empty-sample.groovy]}}
}
}
```

And to initialise them at run time, I have mentioned these graph in my empty-sample.groovy

```
// define the default TraversalSource to bind queries to - this one will be named "g".
globals << [g2: graph2.traversal(),g1:graph1.traversal()]
```

The issue here is, sometimes this g2 doesn't get initialised at runtime.. and if I restart my server again.. it works.. The only difference between these properties file is storage.hbase.table

What could be the reason behind this random behaviour? 


Re: Concurrent TimeoutException on connection to gremlin server remotely

Stephen Mallette <spmal...@...>
 

Yeah....I think the documentation misled you a bit.


You perhaps took that "Default" written there very literally without considering the "Description" which describes that field as:

"The fully qualified classname of the client Channelizer that defines how to connect to the server."

So, "Channelizer.WebSocketChannelizer" is really just the class name, not the FQCN. There wasn't enough room to put that whole thing in that "Default" column. If you'd done:

connectionPool: { channelizer: org.apache.tinkerpop.gremlin.driver.Channelizer$WebSocketChannelizer }

it would be working. What isn't so good is that you didn't get an error message for that configuration problem.




On Mon, Oct 21, 2019 at 8:59 AM <sarthak...@...> wrote:
Hi Stephen,
Thanks for replying. I was able to solve this issue but I'm not certain how this was causing an error.

I'm connecting to `remote-objects.yaml` file from my java code. I recently added a property
```
connectionPool: {
channelizer: Channelizer.WebSocketChannelizer
}
```

After removing this, the system is again back to normal. I got this value from Doc: http://tinkerpop.apache.org/docs/3.2.9/reference/#connecting-via-remotegraph
Topic: Connecting via Java > Configuration

I am not able to understand how this value is making system unavailable even though my gremlin-server is in a working state. It's like the request doesn't even go to gremlin-server.

--
You received this message because you are subscribed to the Google Groups "JanusGraph users" group.
To unsubscribe from this group and stop receiving emails from it, send an email to janusgra...@....
To view this discussion on the web visit https://groups.google.com/d/msgid/janusgraph-users/04d4c0b3-a439-4bac-bd5e-322a28189e20%40googlegroups.com.