summaryrefslogtreecommitdiff
path: root/happybase/table.py
diff options
context:
space:
mode:
authorWouter Bolsterlee <uws@xs4all.nl>2013-11-08 21:36:46 +0100
committerWouter Bolsterlee <uws@xs4all.nl>2013-11-08 21:36:46 +0100
commit3f5bed951741500dbd4aff5d57ba8bf6f0fd2e1b (patch)
tree00f71d8e7a4ee7e5619348960627228725f46e65 /happybase/table.py
parentcbd53db579d31a6b9bfe6e419dd7630915728b40 (diff)
downloadhappybase-3f5bed951741500dbd4aff5d57ba8bf6f0fd2e1b.tar.gz
Compatibility fixes for HBase 0.96
HBase 0.96.0 is more strict wrt column family names without a column qualifier. In previous versions a trailing ':' character after a column family name (e.g. 'cf1:') did not make any difference compared to the version without it (e.g. 'cf1'), but from 0.96.0 this is no longer the case...
Diffstat (limited to 'happybase/table.py')
-rw-r--r--happybase/table.py5
1 files changed, 3 insertions, 2 deletions
diff --git a/happybase/table.py b/happybase/table.py
index 47a9c69..cb41b9e 100644
--- a/happybase/table.py
+++ b/happybase/table.py
@@ -50,13 +50,14 @@ class Table(object):
descriptors = self.connection.client.getColumnDescriptors(self.name)
families = dict()
for name, descriptor in descriptors.items():
- name = name[:-1] # drop trailing ':'
+ name = name.rstrip(':')
families[name] = thrift_type_to_dict(descriptor)
return families
def _column_family_names(self):
"""Retrieve the column family names for this table (internal use)"""
- return self.connection.client.getColumnDescriptors(self.name).keys()
+ names = self.connection.client.getColumnDescriptors(self.name).keys()
+ return [name.rstrip(':') for name in names]
def regions(self):
"""Retrieve the regions for this table.