Hey guys, im a hbase and python newbie, and im stuck with the mutateRow() command. I'm using Centos 5.5, python 2.6 & Hbase 0.90.4-cdh3u3. This is running in a virtualbox, the original image file for the VM is the one provided by Cloudera. I've downloaded the hbase-0.90.4-cdh3u3.tar.gz file from cloudera, extracted the Hbase.thrift file from there and ran: /usr/local/bin/thrift --gen py Hbase.thrift. I've moved the gen-py/hbase to myproject/hbase
Here's the code that reproduces the problem: 1. from thrift.transport import TTransport 2. from thrift.transport import TSocket 3. from thrift.transport import THttpClient 4. from thrift.protocol import TBinaryProtocol 5. 6. from hbase import Hbase 7. from hbase.ttypes import * 8. 9. socket = TSocket.TSocket('localhost', 9090) 10. transport = TTransport.TBufferedTransport(socket) 11. protocol = TBinaryProtocol.TBinaryProtocol(transport) 12. client = Hbase.Client(protocol) 13. transport.open() 14. 15. 16. m = Mutation(column='byHour:asaa', value='aaa') 17. client.mutateRow('hits','r1',m) I get this in return: *Traceback (most recent call last):* * File "test.py", line 17, in <module>* * client.mutateRow('hits_per_site','r1',m)* * File "/**somedir**/hbase/Hbase.py", line 1355, in mutateRow* * self.send_mutateRow(tableName, row, mutations)* * File "/**somedir**/hbase/Hbase.py", line 1364, in send_mutateRow* * args.write(self._oprot)* * File "/somedir/hbase/Hbase.py", line 5964, in write* * oprot.writeListBegin(TType.STRUCT, len(self.mutations))* Any ideas on what might be wrong? Am i missing something basic? Thanks a lot everybody. -- Ezequiel Golub