Skip to content
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

Merged
merged 6 commits into from
Oct 31, 2016

Conversation

andrii0lomakin
Copy link
Contributor

Several mistakes in OrienDBClient (mostly related to initialization in multithreaded loads) were fixed.

…DBClient (mostly releated to initialization in multithreaded loads) were fixed.
@@ -1,12 +1,12 @@
/**
* Copyright (c) 2012 - 2016 YCSB contributors. All rights reserved.
*
* <p>
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Header was changed?

Copy link
Contributor Author

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.

Copy link
Collaborator

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
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

No author tags

Copy link
Contributor Author

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>
Copy link
Collaborator

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?

Copy link
Collaborator

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";
Copy link
Collaborator

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?

Copy link
Contributor Author

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.

Copy link
Collaborator

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.

Copy link
Contributor Author

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

@risdenk
Copy link
Collaborator

risdenk commented Sep 27, 2016

@kruthar Not sure you have time to review this, but I think you were the last to look at the OrientDB code.

@andrii0lomakin
Copy link
Contributor Author

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.
Copy link
Collaborator

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?

Copy link
Contributor Author

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.

Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thanks for the explanation.

@risdenk
Copy link
Collaborator

risdenk commented Sep 28, 2016

@Laa Saw your comments about addressing some items but not sure the changes were pushed to this branch? ie: still see the author tags

@andrii0lomakin
Copy link
Contributor Author

@risdenk what do you mean , authors tags should be present or absent ?

@risdenk
Copy link
Collaborator

risdenk commented Sep 28, 2016

There should be no author tags. Attribution is based on commit username.

@andrii0lomakin
Copy link
Contributor Author

@risdenk done, tags are removed

Copy link
Collaborator

@risdenk risdenk left a 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();
Copy link
Collaborator

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();
Copy link
Collaborator

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) {
Copy link
Collaborator

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();
Copy link
Collaborator

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>
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Remove added

from header.

}

/**
Copy link
Collaborator

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;
}

/**
Copy link
Collaborator

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.

}

/**
Copy link
Collaborator

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>
Copy link
Collaborator

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>
Copy link
Collaborator

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.

@andrii0lomakin
Copy link
Contributor Author

@risdenk sorry for delay seems all observations are fixed.

@risdenk
Copy link
Collaborator

risdenk commented Oct 31, 2016

@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]?

@risdenk
Copy link
Collaborator

risdenk commented Oct 31, 2016

@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!

@risdenk risdenk changed the title OrientDB version was updated till 2.2.10, mistakes are fixed [orientdb] OrientDB was updated to 2.2.10 and bugs fixed Oct 31, 2016
@risdenk risdenk merged commit 70f4362 into brianfrankcooper:master Oct 31, 2016
@risdenk risdenk mentioned this pull request Nov 15, 2016
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants