Hi,
It should be like this https://gist.github.com/laa/75832b7fd43198578559



On Thu, Feb 6, 2014 at 4:55 PM, Andrey Yesyev <[email protected]>wrote:

> Any updates on this?
>
>
> On Wednesday, February 5, 2014 9:18:54 AM UTC-5, Andrey Yesyev wrote:
>>
>> Hi there!
>> Here is it.
>> I'm using Intellij IDEA, so all dependencies are set up in IDEA project
>> file.
>> Just in case I'm using
>>     <orderEntry type="library" name="com.tinkerpop.
>> blueprints:blueprints-core:2.4.0" level="project" />
>>     <orderEntry type="library" name="com.tinkerpop.
>> blueprints:blueprints-neo4j-graph:2.4.0" level="project" />
>>     <orderEntry type="library" 
>> name="com.orientechnologies:orientdb-client:1.6.4"
>> level="project" />
>>     <orderEntry type="library" name="junit:junit:4.9" level="project" />
>>     <orderEntry type="library" name="com.tinkerpop.
>> blueprints:blueprints-orient-graph:2.5.0-SNAPSHOT" level="project" />
>>     <orderEntry type="library" 
>> name="com.thinkaurelius.titan:titan-core:0.4.2"
>> level="project" />
>>     <orderEntry type="library" 
>> name="com.thinkaurelius.titan:titan-berkeleyje:0.4.2"
>> level="project" />
>>     <orderEntry type="library" name="com.thinkaurelius.titan:titan-es:0.4.2"
>> level="project" />
>>     <orderEntry type="library" 
>> name="com.thinkaurelius.titan:titan-cassandra:0.4.2"
>> level="project" />
>>
>> On Wednesday, February 5, 2014 3:05:20 AM UTC-5, Andrey Lomakin wrote:
>>>
>>> Hi Andrey,
>>> Could you send me your project then, I know that you described which
>>> code you changed but better to look it in one piece.
>>>
>>>
>>> On Tue, Feb 4, 2014 at 4:03 PM, Andrey Yesyev <[email protected]>wrote:
>>>
>>>> I tried to shutdown graph, but either I did it wrong or something else
>>>> going on there...
>>>> Andrey, could you please be more specific how to shutdown it according
>>>> to my code?
>>>>
>>>>
>>>> On Tuesday, February 4, 2014 6:14:48 AM UTC-5, Andrey Lomakin wrote:
>>>>
>>>>> Andrey,
>>>>> I looked through you code, you did not do graph.shutdown() before db
>>>>> drop so internal graph context is not cleared and graph db tries to check
>>>>> that schema is needed for graph database is present without db open.
>>>>> So just do graph.shutdown()  but I do suggest you to wait till
>>>>> tomorrow, we release new version of graph db relation management tool with
>>>>> much better performance.
>>>>>
>>>>>
>>>>>
>>>>> On Tue, Feb 4, 2014 at 9:05 AM, Andrey Lomakin 
>>>>> <[email protected]>wrote:
>>>>>
>>>>>>  Hi Andrey,
>>>>>> Could you wait till Tuesday, I will check it ?
>>>>>>
>>>>>>
>>>>>> On Mon, Feb 3, 2014 at 11:30 PM, Andrey Yesyev 
>>>>>> <[email protected]>wrote:
>>>>>>
>>>>>>> Hi there,
>>>>>>>
>>>>>>> I'm back with a bunch of questions again.
>>>>>>>
>>>>>>> Today I faced a strange issue.
>>>>>>> I'm running tests, trying to figure out pros and cons of OrientDB.
>>>>>>> Each test I run in a new DB, so I'm creating and dropping DBs with the 
>>>>>>> same
>>>>>>> name.
>>>>>>> Here is how I'm doing this
>>>>>>>
>>>>>>> Create DB
>>>>>>> public static void createDB()
>>>>>>>  throws IOException {
>>>>>>>
>>>>>>> if (dbUrl.startsWith("remote")) {
>>>>>>> OServerAdmin server = new OServerAdmin(dbUrl).connect(dbUser,
>>>>>>> dbPassword);
>>>>>>>  if (!server.existsDatabase("plocal")) {
>>>>>>> server.createDatabase("graph", "plocal");
>>>>>>>  }
>>>>>>> server.close();
>>>>>>> }
>>>>>>> else {
>>>>>>>  //OGraphDatabase database = new OGraphDatabase(dbUrl);
>>>>>>>                         OrientGraph database = new
>>>>>>> OrientGraph(dbUrl);
>>>>>>> if (!database.getRawGraph().exists()) {
>>>>>>>  database.getRawGraph().create();
>>>>>>> }
>>>>>>> database.getRawGraph().close();
>>>>>>>  }
>>>>>>>
>>>>>>> }
>>>>>>>
>>>>>>>
>>>>>>>
>>>>>>> Drop DB
>>>>>>>  public static void dropDB()
>>>>>>> throws IOException {
>>>>>>>
>>>>>>> if (dbUrl.startsWith("remote")) {
>>>>>>> OServerAdmin server = new OServerAdmin(dbUrl).connect(dbUser,
>>>>>>> dbPassword);
>>>>>>>  if (server.existsDatabase("plocal")) {
>>>>>>> server.dropDatabase("plocal");
>>>>>>>  }
>>>>>>> server.close();
>>>>>>>  }
>>>>>>>  else {
>>>>>>>                                                 OrientGraph database
>>>>>>> = new OrientGraph(dbUrl);
>>>>>>>  if (database.getRawGraph().exists()) {
>>>>>>> if (database.isClosed()) {
>>>>>>>  database.getRawGraph().open(dbUser, dbPassword);
>>>>>>> }
>>>>>>>  OIndexManager indexManager = database.getRawGraph().getMeta
>>>>>>> data().getIndexManager();
>>>>>>>  for (@SuppressWarnings("rawtypes") OIndex index :
>>>>>>> indexManager.getIndexes()) {
>>>>>>>  index.delete();
>>>>>>> }
>>>>>>>  database.drop();
>>>>>>> }
>>>>>>> database.getRawGraph().close();
>>>>>>>  }
>>>>>>> }
>>>>>>>
>>>>>>> Get DB
>>>>>>>
>>>>>>>     public static synchronized OrientGraph getDatabase() {
>>>>>>>                 return new 
>>>>>>> OrientGraph(OGraphDatabasePool.global().acquire(dbUrl,
>>>>>>> dbUser, dbPassword));
>>>>>>>         }
>>>>>>>
>>>>>>> I'm actually using project from this thread https://groups.google.c
>>>>>>> om/forum/#!searchin/orient-database/bemchmark/orient-databas
>>>>>>> e/VF_j5rGeffA/hzyC9PVj9lAJ . Have to say thanks to Milen Dyankov for
>>>>>>> a great job he did there.
>>>>>>> I changed it a little bit though...
>>>>>>>
>>>>>>> So, here is the problem I faced.
>>>>>>> I'm using OrientDB 1.6.4, remote connection.
>>>>>>>
>>>>>>> 1. Create DB
>>>>>>> 2. Do my tests. 4 threads simultaneously writing to DB
>>>>>>> 3. Drop DB
>>>>>>> 4. Create DB
>>>>>>> 5. Get an exception trying to create a vertex
>>>>>>> OrientVertex vertex = db.addVertex("OGraphVertex", null);
>>>>>>>
>>>>>>> com.orientechnologies.orient.enterprise.channel.binary.OResponseProcessingException:
>>>>>>>>> Exception during response processing.
>>>>>>>>
>>>>>>>>  at com.orientechnologies.orient.enterprise.channel.binary.OChan
>>>>>>>>> nelBinaryAsynchClient.throwSerializedException(OChannelBinar
>>>>>>>>> yAsynchClient.java:264)
>>>>>>>>
>>>>>>>>  at com.orientechnologies.orient.enterprise.channel.binary.OChan
>>>>>>>>> nelBinaryAsynchClient.handleStatus(OChannelBinaryAsynchClient.
>>>>>>>>> java:231)
>>>>>>>>
>>>>>>>>  at com.orientechnologies.orient.enterprise.channel.binary.OChan
>>>>>>>>> nelBinaryAsynchClient.beginResponse(OChannelBinaryAsynchClient.
>>>>>>>>> java:202)
>>>>>>>>
>>>>>>>>  at com.orientechnologies.orient.enterprise.channel.binary.OChan
>>>>>>>>> nelBinaryAsynchClient.beginResponse(OChannelBinaryAsynchClient.
>>>>>>>>> java:113)
>>>>>>>>
>>>>>>>>  at com.orientechnologies.orient.client.remote.OStorageRemote.be
>>>>>>>>> ginResponse(OStorageRemote.java:1856)
>>>>>>>>
>>>>>>>>  at com.orientechnologies.orient.client.remote.OStorageRemote.cr
>>>>>>>>> eateRecord(OStorageRemote.java:328)
>>>>>>>>
>>>>>>>>  at com.orientechnologies.orient.client.remote.OStorageRemoteThr
>>>>>>>>> ead.createRecord(OStorageRemoteThread.java:216)
>>>>>>>>
>>>>>>>>  at com.orientechnologies.orient.core.db.raw.ODatabaseRaw.save(O
>>>>>>>>> DatabaseRaw.java:265)
>>>>>>>>
>>>>>>>>  at com.orientechnologies.orient.core.db.record.ODatabaseRecordA
>>>>>>>>> bstract.executeSaveRecord(ODatabaseRecordAbstract.java:816)
>>>>>>>>
>>>>>>>>  at com.orientechnologies.orient.core.tx.OTransactionNoTx.saveRe
>>>>>>>>> cord(OTransactionNoTx.java:77)
>>>>>>>>
>>>>>>>>  at com.orientechnologies.orient.core.db.record.ODatabaseRecordT
>>>>>>>>> x.save(ODatabaseRecordTx.java:270)
>>>>>>>>
>>>>>>>>  at com.orientechnologies.orient.core.db.record.ODatabaseRecordT
>>>>>>>>> x.save(ODatabaseRecordTx.java:38)
>>>>>>>>
>>>>>>>>  at com.orientechnologies.orient.core.record.ORecordAbstract.sav
>>>>>>>>> e(ORecordAbstract.java:312)
>>>>>>>>
>>>>>>>>  at com.orientechnologies.orient.core.record.impl.ODocument.save
>>>>>>>>> (ODocument.java:1323)
>>>>>>>>
>>>>>>>>  at com.orientechnologies.orient.core.record.impl.ODocument.save
>>>>>>>>> (ODocument.java:1312)
>>>>>>>>
>>>>>>>>  at com.orientechnologies.orient.core.record.impl.ODocument.save
>>>>>>>>> (ODocument.java:1301)
>>>>>>>>
>>>>>>>>  at com.tinkerpop.blueprints.impls.orient.OrientElement.save(
>>>>>>>>> OrientElement.java:148)
>>>>>>>>
>>>>>>>>  at com.tinkerpop.blueprints.impls.orient.OrientElement.save(
>>>>>>>>> OrientElement.java:134)
>>>>>>>>
>>>>>>>>  at com.tinkerpop.blueprints.impls.orient.OrientBaseGraph.addVer
>>>>>>>>> tex(OrientBaseGraph.java:356)
>>>>>>>>
>>>>>>>>  at com.commsen.graphdbtests.orientdb.OrientdbInsertPerformanceT
>>>>>>>>> est.createVertex(OrientdbInsertPerformanceTest.java:25)
>>>>>>>>
>>>>>>>>  at com.commsen.graphdbtests.orientdb.OrientdbInsertPerformanceT
>>>>>>>>> est.doAddDocuments_(OrientdbInsertPerformanceTest.java:120)
>>>>>>>>
>>>>>>>>  at com.commsen.graphdbtests.orientdb.OrientdbInsertPerformanceT
>>>>>>>>> est.access$000(OrientdbInsertPerformanceTest.java:17)
>>>>>>>>
>>>>>>>>  at com.commsen.graphdbtests.orientdb.OrientdbInsertPerformanceT
>>>>>>>>> est$1.call(OrientdbInsertPerformanceTest.java:160)
>>>>>>>>
>>>>>>>>  at com.commsen.graphdbtests.orientdb.OrientdbInsertPerformanceT
>>>>>>>>> est$1.call(OrientdbInsertPerformanceTest.java:157)
>>>>>>>>
>>>>>>>>  at java.util.concurrent.FutureTask.run(FutureTask.java:262)
>>>>>>>>
>>>>>>>>  at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPool
>>>>>>>>> Executor.java:1145)
>>>>>>>>
>>>>>>>>  at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoo
>>>>>>>>> lExecutor.java:615)
>>>>>>>>
>>>>>>>>  at java.lang.Thread.run(Thread.java:744)
>>>>>>>>
>>>>>>>> Caused by: com.orientechnologies.orient.core.exception.
>>>>>>>>> ODatabaseException: Database 'plocal:c:/projects/GraphDBs/o
>>>>>>>>> rientdb-community-1.6.4/databases//graphdb_tests_orient' is closed
>>>>>>>>
>>>>>>>>  at com.orientechnologies.orient.core.db.record.ODatabaseRecordA
>>>>>>>>> bstract.checkOpeness(ODatabaseRecordAbstract.java:1088)
>>>>>>>>
>>>>>>>>  at com.orientechnologies.orient.core.db.record.ODatabaseRecordA
>>>>>>>>> bstract.getMetadata(ODatabaseRecordAbstract.java:556)
>>>>>>>>
>>>>>>>>  at com.orientechnologies.orient.core.db.record.ODatabaseRecordA
>>>>>>>>> bstract.getMetadata(ODatabaseRecordAbstract.java:87)
>>>>>>>>
>>>>>>>>  at com.orientechnologies.orient.core.db.ODatabaseRecordWrapperA
>>>>>>>>> bstract.getMetadata(ODatabaseRecordWrapperAbstract.java:156)
>>>>>>>>
>>>>>>>>  at com.orientechnologies.orient.core.record.ORecordSchemaAwareA
>>>>>>>>> bstract.setClassNameIfExists(ORecordSchemaAwareAbstract.java:111)
>>>>>>>>
>>>>>>>>  at com.orientechnologies.orient.core.serialization.serializer.r
>>>>>>>>> ecord.string.ORecordSerializerSchemaAware2CSV.fromString(ORe
>>>>>>>>> cordSerializerSchemaAware2CSV.java:377)
>>>>>>>>
>>>>>>>>  at com.orientechnologies.orient.core.serialization.serializer.r
>>>>>>>>> ecord.string.ORecordSerializerStringAbstract.fromStream(ORec
>>>>>>>>> ordSerializerStringAbstract.java:80)
>>>>>>>>
>>>>>>>>  at com.orientechnologies.orient.core.record.ORecordSchemaAwareA
>>>>>>>>> bstract.deserializeFields(ORecordSchemaAwareAbstract.java:150)
>>>>>>>>
>>>>>>>>  at com.orientechnologies.orient.core.record.impl.ODocument.dese
>>>>>>>>> rializeFields(ODocument.java:1371)
>>>>>>>>
>>>>>>>>  at com.orientechnologies.orient.core.record.impl.ODocument.chec
>>>>>>>>> kForFields(ODocument.java:1261)
>>>>>>>>
>>>>>>>>  at com.orientechnologies.orient.core.record.ORecordSchemaAwareA
>>>>>>>>> bstract.validate(ORecordSchemaAwareAbstract.java:58)
>>>>>>>>
>>>>>>>>  at com.orientechnologies.orient.core.db.document.ODatabaseDocum
>>>>>>>>> entTx.save(ODatabaseDocumentTx.java:265)
>>>>>>>>
>>>>>>>>  at com.orientechnologies.orient.core.db.document.ODatabaseDocum
>>>>>>>>> entTx.save(ODatabaseDocumentTx.java:227)
>>>>>>>>
>>>>>>>>  at com.orientechnologies.orient.core.db.document.ODatabaseDocum
>>>>>>>>> entTx.save(ODatabaseDocumentTx.java:45)
>>>>>>>>
>>>>>>>>  at com.orientechnologies.orient.server.network.protocol.binary.
>>>>>>>>> OBinaryNetworkProtocolAbstract.createRecord(OBinaryNetworkPr
>>>>>>>>> otocolAbstract.java:332)
>>>>>>>>
>>>>>>>>  at com.orientechnologies.orient.server.network.protocol.binary.
>>>>>>>>> ONetworkProtocolBinary.createRecord(ONetworkProtocolBinary.java:
>>>>>>>>> 1284)
>>>>>>>>
>>>>>>>>  at com.orientechnologies.orient.server.network.protocol.binary.
>>>>>>>>> ONetworkProtocolBinary.executeRequest(ONetworkProtocolBinary.java:
>>>>>>>>> 268)
>>>>>>>>
>>>>>>>>  at com.orientechnologies.orient.server.network.protocol.binary.
>>>>>>>>> OBinaryNetworkProtocolAbstract.execute(OBinaryNetworkProtoco
>>>>>>>>> lAbstract.java:125)
>>>>>>>>
>>>>>>>>  at com.orientechnologies.common.thread.OSoftThread.run(OSoftThr
>>>>>>>>> ead.java:45)
>>>>>>>>
>>>>>>>>
>>>>>>> If I call
>>>>>>>
>>>>>>> db.isClosed()
>>>>>>>
>>>>>>> it returns FALSE.
>>>>>>>
>>>>>>> Any ideas?
>>>>>>>
>>>>>>> Thanks!
>>>>>>>
>>>>>>> -Andrey
>>>>>>>
>>>>>>>
>>>>>>>
>>>>>>>
>>>>>>>  --
>>>>>>>
>>>>>>> ---
>>>>>>> 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/groups/opt_out.
>>>>>>>
>>>>>>
>>>>>>
>>>>>>
>>>>>> --
>>>>>> Best regards,
>>>>>> Andrey Lomakin.
>>>>>>
>>>>>> Orient Technologies
>>>>>> the Company behind OrientDB
>>>>>>
>>>>>>
>>>>>
>>>>>
>>>>> --
>>>>> Best regards,
>>>>> Andrey Lomakin.
>>>>>
>>>>> Orient Technologies
>>>>> the Company behind OrientDB
>>>>>
>>>>>   --
>>>>
>>>> ---
>>>> 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/groups/opt_out.
>>>>
>>>
>>>
>>>
>>> --
>>> Best regards,
>>> Andrey Lomakin.
>>>
>>> Orient Technologies
>>> the Company behind OrientDB
>>>
>>>   --
>
> ---
> 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/groups/opt_out.
>



-- 
Best regards,
Andrey Lomakin.

Orient Technologies
the Company behind OrientDB

-- 

--- 
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/groups/opt_out.

Reply via email to