thrift-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Sanilpnair" <>
Subject Methods to improve the performance of Thrift (C#) query for Hbase
Date Wed, 15 Jan 2014 14:31:17 GMT
Hi All,

I started Thrift coding (with c# and Hbase) recently. I need to fetch
realtime data from the Hbase using Thrift, my problem is that "performance
issue" with scanner - filter queries.

Please let me know the performance enhancement methods while using thrift
with c#. Sample code is given below:

string TableName="testtable";
Dictionary<byte[], byte[]> attributes = new Dictionary<byte[], byte[]>(); 
TScan scanFilter = new TScan();
scanFilter.FilterString =
ToByteArray("((RowFilter(<=,'binary:1053_1371222000')) AND
(RowFilter(>=,'binary:1053_1371217740'))) OR
(RowFilter(<=,'binary:1055_1371222000')) AND

var scanner = _client.scannerOpenWithScan(ToByteArray(TableName),
scanFilter, attributes);
for (var entry = _client.scannerGet(scanner); entry.Count > 0; entry =

            foreach (var rowResult in entry)
        		string rowkey =
                	Console.Write("{0} => ", rowkey);


I tried scannerGetList also, single condition on filter is faster!

My question is that:

1) how many ways we can improve the performance(optimization) of Thrift
query to hbase. 
2) how to cache the Thrift query response on Hbase. Can we force to cache
response on Hbase using thrift query(I couldn't find any additional
properties or attributes on Thrift scan/filter queries)
3) Is Thrift load balancing? how to manage load balancing of Thrift server
on Master node.

I am looking forward to hearing from you, hope you can help me.


View raw message