Hi guys!
In my test graph database I'm trying to retrive list of vertices with
enabled fetching.
I do the next:
public List<Vertex> getPeopleByName(OrientGraph graph, String name) {
Iterable<Vertex> people = graph.command(
new OCommandSQL(
"select from People where name CONTAINSTEXT '"+
name +"' " // Fulltext index was already built
)
).setFetchPlan("*:-1").execute();
return Lists.newArrayList(people);
}
...
OrientGraphFactory graphFactory = new OrientGraphFactory( "
remote:localhost/ExampleDatabase", username, password);
OrientGraph graph = graphFactory.getNoTx();// also tried with getTx()
List<Vertex> people = graphDao.getPeople(graph, "Bi");
// Line 1, where I shutdown OrientDB
for (Vertex person : people) {
Iterator<Vertex> parentsIterator = person.getVertices(Direction.IN,
"parent").iterator();
if (parentsIterator.hasNext()) {
// some logic here
// and here
}
}
graph.shutdown();
...
So, enabling fetching "*:-1" I expected that all linked vertices would be
pre-loaded. But in the debug mode staying on the breakpoint an line "Line
1" when I shutdown OrientDB the next code person.getVertices(Direction.IN,
"parent") throws an exeption
com.orientechnologies.orient.core.exception.ODatabaseException: Error on
retrieving record #16:1829
...
Caused by: com.orientechnologies.common.io.OIOException: Error on
connecting to 127.0.0.1:2424/ExampleDatabase
...
Caused by: java.net.ConnectException: Connection refused: connect
I googled a little bit, found some possible causes...
I've checked if level 1 cache enabled. In orientdb-server-config.xml I have
<entry value="true" name="cache.level1.enabled"/>
<entry value="false" name="cache.level2.enabled"/>
and
OGlobalConfiguration.CACHE_LEVEL1_ENABLED.getValue()
returns true
Also I use remote connection
new OrientGraphFactory( "remote:localhost/ExampleDatabase", username,
password);
I have no ideas what is the problem.
Could someone help me to find what I'm doing wrong? Thanks in advance.
P.S. I run OrientDB on Windows 7 if it makes sense.
--
---
You received this message because you are subscribed to the Google Groups
"OrientDB" group.
To unsubscribe from this group and stop receiving emails from it, send an email
to [email protected].
For more options, visit https://groups.google.com/d/optout.