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

Added missing options to RocksJava #2039

Closed
wants to merge 9 commits into from

Conversation

adamretter
Copy link
Collaborator

This adds almost all missing options to RocksJava

@facebook-github-bot
Copy link
Contributor

@siying has imported this pull request. If you are a Facebook employee, you can view this diff on Phabricator.

Copy link
Contributor

@sagar0 sagar0 left a comment

Choose a reason for hiding this comment

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

This diff is too big to review properly. (It would be great if this could be split into multiple smaller pieces). I just scrolled though most of the changes and they look fine to me, and I am ok with approving and merging.
That said, I'll leave the final action to @siying here.

* Signature: (JI)V
*/
void Java_org_rocksdb_BackupableDBOptions_setMaxBackgroundOperations(
JNIEnv* env, jobject jobj, jlong jhandle, jint max_background_operations) {
Copy link
Contributor

Choose a reason for hiding this comment

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

Nit: Should this be jmax_background_operation, to conform to the other param names in the file?

private native void setMaxBackgroundOperations(final long handle,
final int maxBackgroundOperations);
private native int maxBackgroundOperations(final long handle);
private native void setCallbackTriggerIntervalSize(final long handle,
Copy link
Contributor

Choose a reason for hiding this comment

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

Curious ... Why are some params final whereas others are non-final (in this whole file, and in a few other places)? Is it just that all the newer additions will be final going forward?

Copy link
Collaborator Author

Choose a reason for hiding this comment

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

Indeed, params will be final moving forward

import java.util.Properties;
import java.util.Random;
import java.nio.file.Paths;
import java.util.*;
Copy link
Contributor

Choose a reason for hiding this comment

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

Better to spell out individual classes instead of a * (unless there are too many, of course).

Copy link
Collaborator Author

Choose a reason for hiding this comment

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

Yup. However, IntelliJ automatically rewrites those to a .* for you once you get past a few.

Copy link
Contributor

Choose a reason for hiding this comment

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

Ah, IntelliJ! I miss some of its features in my current setup. :)

@adamretter
Copy link
Collaborator Author

@sagar0 I was careful to break the PR into distinct commits to try and make it easier to review.

@adamretter adamretter deleted the missing-options branch March 31, 2017 15:40
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.

3 participants