You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
AttributeError: 'NoneType' object has no attribute 'mutateRows' #3
and I'm getting an exception on the 3rd row: batch = table.batch():
Traceback (most recent call last):
File "/indexer/sink.py", line 39, in <module>
loop.run_until_complete(write_to_hbase([]))
File "/Library/Frameworks/Python.framework/Versions/3.8/lib/python3.8/asyncio/base_events.py", line 616, in run_until_complete
return future.result()
File "/indexer/sink.py", line 23, in write_to_hbase
batch = table.batch()
File "/indexer/venv/lib/python3.8/site-packages/aiohappybase/table.py", line 569, in batch
return Batch(table=self, **kwargs)
File "/indexer/venv/lib/python3.8/site-packages/aiohappybase/batch.py", line 304, in __init__
self._mutations = MutationBatcher(table, timestamp, batch_size, wal)
File "/indexer/venv/lib/python3.8/site-packages/aiohappybase/batch.py", line 99, in __init__
mut_rows = self._table.client.mutateRows
AttributeError: 'NoneType' object has no attribute 'mutateRows'
What am I missing here?
UPDATE:
I've found that it is broken in both v1.4.0 + v1.3.0 but it DOES work in v1.2.0.
On the other hand, seems like v1.2.0 doesn't support counter_inc :(
thanks, @aiudirog.
Actually, I've tried several functions (put, get tables, inc) and none of them work.
I've reproduced it locally with HBase in docker (and in my real HBase cluster)
Aha I completely missed that you are using the thrift2 API. Yes that is currently unsupported as this codebase isn't much different than the original happybase.
I think you may be the first to actually require using it and it would be really useful to get the support included. It is probably going to be a lot of work as I recall the API being quite different.
Activity
itayB commentedon Apr 22, 2021
found it. I had to add:
after my first row :)
aiudirog commentedon Apr 22, 2021
Good catch, I'll see about making the client value an object which raises an error instead of it being None.
itayB commentedon Apr 25, 2021
It still doesn't work :(
I'm getting the following exception:
Trying to add a breakpoint and I see:
my HBase thrift runs with:
what am I missing now?
aiudirog commentedon Apr 25, 2021
My guess is that
mutateRowsincrementRows isn't available in HBase 0.94. I'll dig into this when I get a chance.Edit: the 0.94 branch shows that it should be there. I'll see if I can set up a test environment and try it out.
itayB commentedon Apr 26, 2021
thanks, @aiudirog.
Actually, I've tried several functions (put, get tables, inc) and none of them work.
I've reproduced it locally with HBase in docker (and in my real HBase cluster)
I also tried to run with the regular package (happybase) and got the same error :(
itayB commentedon Apr 26, 2021
I think that I found the issue after trying to contribute here. I ran thrift2 by:
After changing it to thrift (1) the code above is working:
Isn't thrift2 newer? is there support for thrift2? (our production HBase cluster expose Thrift2)
aiudirog commentedon Apr 26, 2021
Aha I completely missed that you are using the thrift2 API. Yes that is currently unsupported as this codebase isn't much different than the original happybase.
I think you may be the first to actually require using it and it would be really useful to get the support included. It is probably going to be a lot of work as I recall the API being quite different.
aiudirog commentedon Apr 27, 2021
While I don't use the thrift2 API at work, I would like to get it integrated. I've started a new branch on my fork here for any work: https://github.com/aiudirog/aiohappybase/tree/thrift2
The API is different enough that I think it warrants to separate implementations, but I'll have to explore it a bit before I'm 100% sure.
aiudirog commentedon Apr 27, 2021
I'm going to close this in favor of having two dedicated issues.