Browse Source

HUE-1995 [hbase] Column familly filtering is broken

HBase API seems to have changed. Strip colons for now.
Abraham Elmahrek 11 years ago
parent
commit
50c99be
1 changed files with 2 additions and 1 deletions
  1. 2 1
      apps/hbase/src/hbase/api.py

+ 2 - 1
apps/hbase/src/hbase/api.py

@@ -190,7 +190,8 @@ class HbaseApi(object):
       if fs:
         fs = " AND (" + fs.strip() + ")"
       filterstring = "(ColumnPaginationFilter(%i,0) AND PageFilter(%i))" % (limit, limit) + (fs or "")
-      scan = get_thrift_type('TScan')(startRow=smart_str(query['row_key']), stopRow=None, timestamp=None, columns=[smart_str(column) for column in (query['columns'] or columns)], caching=None, filterString=filterstring, batchSize=None)
+      scan_columns = [smart_str(column.strip(':')) for column in query['columns']] or [smart_str(column.strip(':')) for column in columns]
+      scan = get_thrift_type('TScan')(startRow=smart_str(query['row_key']), stopRow=None, timestamp=None, columns=scan_columns, caching=None, filterString=filterstring, batchSize=None)
       scanner = client.scannerOpenWithScan(tableName, scan, None)
       aggregate_data += client.scannerGetList(scanner, query['scan_length'])
     return aggregate_data