-
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
[jdbc] Assorted cleanup/fixes around batching and supporting different databases #842
Conversation
@busbey this is the changeset I was referring to earlier today in private chat. |
Also, I forgot to mention the testing I had done..
|
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.
Overall the changes look good. There are a few minor copyright things that should probably be addressed.
@@ -0,0 +1,65 @@ | |||
/** | |||
* Copyright (c) 2012 - 2016 YCSB contributors. All rights reserved. |
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 is a new file?
@@ -0,0 +1,98 @@ | |||
/** | |||
* Copyright (c) 2012 - 2016 YCSB contributors. All rights reserved. |
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 is a new file?
@@ -0,0 +1,69 @@ | |||
/** | |||
* Copyright (c) 2012 - 2016 YCSB contributors. All rights reserved. |
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.
New file?
@@ -0,0 +1,110 @@ | |||
/** | |||
* Copyright (c) 2010 - 2016 Yahoo! Inc. All rights reserved. |
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.
New file?
@@ -184,7 +184,7 @@ public Status scan(String table, String startkey, int recordcount, | |||
private void measure(String op, Status result, long intendedStartTimeNanos, | |||
long startTimeNanos, long endTimeNanos) { | |||
String measurementName = op; | |||
if (result != Status.OK) { | |||
if (result == null || !result.isOk()) { |
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.
Update copyright on changed file?
@@ -79,6 +79,14 @@ public boolean equals(Object obj) { | |||
return true; | |||
} | |||
|
|||
/** |
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.
Update copyright on changed file?
Hi @risdenk! Thanks for taking a look -- it's greatly appreciated. You're entirely right about the license headers: it was not clear to me what the copyright notice should be on new files. I just made a best guess on context. I am happy to fix with proper guidance. |
New files are usually:
An example of one that got modified would be something like this:
I'm just reciting what I've seen previously. Not sure this is set in stone. Maybe @busbey has an opinion? |
yep, those suggested copyright statements look correct. |
Add Phoenix flavor for Apache Phoenix.
Tried to simplify the distinction between using JDBC's addBatch()/executeBatch() API calls and "batching" updates via autoCommit=false and a manual commit() after a given number of updates. Breaks out flavors into their own package to reduce bloat in JdbcDBClient. Encompasses changes from Enis Soztutar.
18d87ce
to
4823a07
Compare
Just updated things with more correct-er license headers. Thanks again for the close look, @risdenk! |
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.
Changes look good to me now. Thanks @joshelser. I'll leave this open till Friday in case any other contributors have comments. If no comments and tests pass, I'll merge.
@joshelser thanks for the PR! |
Thanks for the review and merge, @risdenk ! |
A couple of things included in this PR. Happy to split them out if that is preferred. I just came across all of these in some recent testing.
UPSERT
to write data, noINSERT
)Status.BATCHED_OK
as an error (not the same asStatus.OK
)