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

[foundationdb] add a new client for FoundationDB #1162

Merged
merged 1 commit into from
Jul 15, 2018
Merged

[foundationdb] add a new client for FoundationDB #1162

merged 1 commit into from
Jul 15, 2018

Conversation

dbjoa
Copy link
Contributor

@dbjoa dbjoa commented May 31, 2018

Here is a new client for FoundationDB, which is based on the API version 5.1.7.

@dbjoa
Copy link
Contributor Author

dbjoa commented May 31, 2018

In order to test the binding, you need to download the official java client from the links below and then install them manually to your local maven repo until the maven repo will be ready.

https://www.foundationdb.org/downloads/5.1.7/bindings/java/fdb-java-5.1.7.jar
https://www.foundationdb.org/downloads/5.1.7/bindings/java/fdb-java-5.1.7-javadoc.jar

$ mvn install:install-file -Dfile=fdb-java-5.1.7.jar -DgroupId=com.apple.foundationdb -DartifactId=fdb-java -Dversion=5.1.7 -Dpackaging=jar

@busbey
Copy link
Collaborator

busbey commented May 31, 2018

is there an issue filed with the foundationDB folks already about publishing to maven central or otherwise adding a repository?

@dbjoa
Copy link
Contributor Author

dbjoa commented May 31, 2018

@busbey
Yes, the issue has been filed already: apple/foundationdb#219

@busbey
Copy link
Collaborator

busbey commented May 31, 2018

thanks for the pointer! we'll block on that issue closing out then.

@busbey
Copy link
Collaborator

busbey commented Jul 11, 2018

foundation db have published client jars to maven central now. FYI, @dbjoa. I'll see if restarting the travis build is enough.

@dbjoa
Copy link
Contributor Author

dbjoa commented Jul 12, 2018

@busbey I've updated the PR.

<name>FoundationDB Binding</name>
<packaging>jar</packaging>
<repositories>
<repository>
Copy link
Collaborator

Choose a reason for hiding this comment

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

I don't think we need the snapshot repository. can we drop it?

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Thank you for the comment. I've dropped the snapshot repository from the PR.

/**
* The YCSB binding for <a href="https://www.foundationdb.org">FoundationDB</a>.
*/
package com.yahoo.ycsb.db;
Copy link
Collaborator

Choose a reason for hiding this comment

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

please put this into a dedicated package e.g. com.yahoo.ycsb.db.foundationdb

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Thank you for your suggestion. I've made the dedicated package.

logger.info("Cluster File: {}\n", clusterFile);

try {
fdb = FDB.selectAPIVersion(Integer.parseInt(apiVersion.trim()));
Copy link
Collaborator

Choose a reason for hiding this comment

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

is this the bit that needs to be protected by the synchronized block? is the db object itself threadsafe?

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Thank you for the comment. The synchronized block is not needed. I've removed it from the PR.

}
if (curInitCount == 0) {
try {
db.close();
Copy link
Collaborator

Choose a reason for hiding this comment

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

over in init() we did fdb.open once for each client thread, but here we're only doing a single close. is that correct?

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Thank you for your detailed comment. db.close() should be called for each client thread. I've updated the PR.

@dbjoa
Copy link
Contributor Author

dbjoa commented Jul 14, 2018

@busbey I've changed the PR.

<packaging>jar</packaging>
<properties>
<!-- Tests do not run on jdk9 -->
<skipJDK9Tests>true</skipJDK9Tests>
Copy link
Collaborator

Choose a reason for hiding this comment

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

Sorry for the churn, but a PR just landed that adds JDK10 and JDK11 test runs. Could you add the additional skip properties for those?

Copy link
Contributor Author

Choose a reason for hiding this comment

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

@busbey , No problem. I've added the skip properties for JDK10 and JDK11 to the updated PR.

@busbey busbey merged commit e636963 into brianfrankcooper:master Jul 15, 2018
@busbey
Copy link
Collaborator

busbey commented Jul 15, 2018

Thanks for getting this done!

@busbey busbey mentioned this pull request Jul 29, 2018
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants