-
Notifications
You must be signed in to change notification settings - Fork 163
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
counter_incs by incrementRows #89
base: master
Are you sure you want to change the base?
Conversation
|
@@ -558,6 +559,25 @@ def counter_inc(self, row, column, value=1): | |||
return self.connection.client.atomicIncrement( | |||
self.name, row, column, value) | |||
|
|||
def counter_incs(self, row, data): |
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.
Perhaps counters_inc
is a better name? And can you move it below counter_dec
for clarity?
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.
Yes, I agree and I will move it below counter_dec.
Hi, thanks for working on this. I've added a few questions/comments. Any chance you can add some tests? |
Sure, and I found some conventional problem on PEP8 styles(e.g. line break 79bytes, etc..). |
- Renaming method counter_incs to counters_inc - Add nose tests for counters_inc
- Renaming method counter_incs to counters_inc - Add nose tests for counters_inc
|
|
@wbolster Hi would you review this commit? |
@@ -183,6 +183,34 @@ def test_atomic_counters(): | |||
assert_equal(10, table.counter_dec(row, column, -7)) | |||
|
|||
|
|||
def test_multiple_counters(): |
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, tests look good.
Thanks for working on this. See comments about using a |
|
I applied eventually ;) |
|
@wbolster Hi, I wonder do you mind to merge ;) and one question would you have plan happybase version2 for thrift2 protocol |
Any progress on this, It would be great If i can increase counters in bulk. |
related: #35
I am not sure that is proper way, but at least it works.