-
Notifications
You must be signed in to change notification settings - Fork 2.3k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
[orientdb] OrientDB was updated to 2.2.10 and bugs fixed #848
Conversation
…DBClient (mostly releated to initialization in multithreaded loads) were fixed.
@@ -1,12 +1,12 @@ | |||
/** | |||
* Copyright (c) 2012 - 2016 YCSB contributors. All rights reserved. | |||
* | |||
* <p> |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Header was changed?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Paragraphs were added automatically I removed it.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Looks like the
got put back by mistake. These should be removed.
* orientdb.user=admin <br> | ||
* orientdb.password=admin <br> | ||
* | ||
* @author Luca Garulli |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
No author tags
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Done
* <p> | ||
* Properties to set: | ||
* <p> | ||
* orientdb.url=local:C:/temp/databases or remote:localhost:2424 <br> |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
These properties are already in the readme?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
The properties to set section should be removed since this is documented in the README. No need to document it twice.
|
||
private static final String URL_PROPERTY = "orientdb.url"; |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Looks like all the initialization code was changed? Including the property and default variables?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
No, property and default values are the same.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Sorry my comment wasn't clear. The format of the entire class changed. The changes removed all the *_PROPERTY* variables and instead inlined all the values. This makes it hard to review. It is typically better to stick with the existing code format if possible.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@risdenk I added them back
@kruthar Not sure you have time to review this, but I think you were the last to look at the OrientDB code. |
…ote storage was added.
Hi @risdenk , I have updated pull request according to your comments. |
@@ -60,12 +60,6 @@ WARNING: Creating a new database will be done safely with multiple threads on a | |||
* ```orientdb.newdb``` - Overwrite the database if it already exists. | |||
* Only effects the ```load``` phase. | |||
* Default: ```false``` | |||
* ```orientdb.intent``` - Declare an Intent to the database. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Assuming the orientdb.intent was removed in OrientDB 2.2?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@risdenk it is still present but does not have any effect and even sometimes has negative value.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Thanks for the explanation.
@Laa Saw your comments about addressing some items but not sure the changes were pushed to this branch? ie: still see the author tags |
@risdenk what do you mean , authors tags should be present or absent ? |
There should be no author tags. Attribution is based on commit username. |
@risdenk done, tags are removed |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Some minor changes remain. Mostly around fixing headers, JavaDoc, and some minor test updates.
@@ -101,12 +102,20 @@ public void insertTest() { | |||
String insertKey = "user0"; | |||
Map<String, ByteIterator> insertMap = insertRow(insertKey); | |||
|
|||
ODocument result = orientDBDictionary.get(insertKey); | |||
OPartitionedDatabasePool pool = orientDBClient.getDatabasePool(); | |||
ODatabaseDocumentTx db = pool.acquire(); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This can be a try w/ resources. Like other pool.acquire() calls.
for (int i = 0; i < NUM_FIELDS; i++) { | ||
doc.field(FIELD_PREFIX + i, preupdateString); | ||
OPartitionedDatabasePool pool = orientDBClient.getDatabasePool(); | ||
ODatabaseDocumentTx db = pool.acquire(); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This can be a try w/ resources. Like other pool.acquire() calls.
@@ -227,10 +259,11 @@ public void scanTest() { | |||
int testIndex = startIndex; | |||
|
|||
// Check each vector row to make sure we have the correct fields | |||
for (HashMap<String, ByteIterator> result: resultVector) { | |||
for (HashMap<String, ByteIterator> result : resultVector) { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
The comment a few lines above this about index starting at 1 can be removed. Change line 243 to startIndex = 0.
assertNull("Assert user1 does not exist", orientDBDictionary.get(user1)); | ||
assertNotNull("Assert user2 still exists", orientDBDictionary.get(user2)); | ||
OPartitionedDatabasePool pool = orientDBClient.getDatabasePool(); | ||
ODatabaseDocumentTx db = pool.acquire(); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This can be a try w/ resources. Like other pool.acquire() calls.
@@ -1,12 +1,12 @@ | |||
/** | |||
* Copyright (c) 2015 - 2016 YCSB contributors. All rights reserved. | |||
* | |||
* <p> |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Remove added
from header.
} | ||
|
||
/** |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This JavaDoc is unnecessary since it is documented on the base class.
@@ -217,20 +230,43 @@ public Status insert(String table, String key, HashMap<String, ByteIterator> val | |||
return Status.ERROR; | |||
} | |||
|
|||
/** |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This JavaDoc is unnecessary since it is documented on the base class.
} | ||
|
||
/** |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This JavaDoc is unnecessary since it is documented on the base class.
* <p> | ||
* Properties to set: | ||
* <p> | ||
* orientdb.url=local:C:/temp/databases or remote:localhost:2424 <br> |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
The properties to set section should be removed since this is documented in the README. No need to document it twice.
@@ -1,12 +1,12 @@ | |||
/** | |||
* Copyright (c) 2012 - 2016 YCSB contributors. All rights reserved. | |||
* | |||
* <p> |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Looks like the
got put back by mistake. These should be removed.
@risdenk sorry for delay seems all observations are fixed. |
@Laa changes look good. I'm pulling it down locally to check and waiting on CI tests to finish. Is it possible for you to squash the commits and start the single commit message with [orientdb]? |
@Laa changes and tests pass. It looks like I can squash and merge through Github. I'll do that in a few minutes. Thanks for your patience! |
Several mistakes in OrienDBClient (mostly related to initialization in multithreaded loads) were fixed.