Project Name | Stars | Downloads | Repos Using This | Packages Using This | Most Recent Commit | Total Releases | Latest Release | Open Issues | License | Language |
---|---|---|---|---|---|---|---|---|---|---|
Manong | 3,841 | 6 years ago | PHP | |||||||
码农周刊整理 | ||||||||||
Mybus | 363 | 8 years ago | 10 | C++ | ||||||
MySQL数据库同redis以及hbase高速全量,增量同步工具 | ||||||||||
Hbase Docker | 274 | 3 years ago | 17 | Shell | ||||||
HBase running in Docker | ||||||||||
Massive_record | 134 | 13 | 4 | 4 years ago | 10 | January 08, 2012 | 21 | Ruby | ||
HBase ruby client | ||||||||||
Phphbaseadmin | 125 | 3 years ago | 12 | other | PHP | |||||
phphbaseadmin is a hbase admin web tool,it developed using thrift interface、php CodeIgniter framework . | ||||||||||
Rhino | 59 | 10 years ago | 1 | mit | Ruby | |||||
Ruby ORM for HBase - NOTE: I haven't maintained this in years. | ||||||||||
Cloud Note | 59 | 6 years ago | Java | |||||||
基于分布式的云笔记(参考某道云笔记),数据存储在redis与hbase中 | ||||||||||
Goh | 52 | 1 | 1 | 11 years ago | June 02, 2021 | 1 | other | Go | ||
golang client of hbase (via thrift) | ||||||||||
Diver | 46 | 7 years ago | 3 | July 19, 2016 | 2 | apache-2.0 | Java | |||
A HBase driver for Erlang/Elixir using Jinterface and the Asynchbase Java client to query the database. | ||||||||||
Vagrant Hbase | 36 | 8 years ago | 8 | mit | Shell | |||||
A Vagrantfile to get up and running with Hadoop and HBase development. |
NHBaseAPI is an HBase API based completely on .NET platform. Internally it uses the interface under the Thrift protocol to communicate with HBase. As an API based completely on .NET platform, we deliberately preserve the multi-platform feature within it, which means developers can use the API on Mono platform in Linux without the need to change any NHBaseAPI codes.
Since this API is relying on the Thrift to parse the communication with remote HBase servers, the Thrift protocol version that we follow is 0.9.2. However, within the NHBaseAPI, we have completely overwritten the Thrift protocol. That is to say, that we achieved an automatic high performance realization of the Thrift protocol following the binary feature of the original Thrift. The reasons of doing such are primarily the following two:
Performance Issue The original Thrift is mainly consisted of two parts (the Network Layer and the Serialization/Deserialization). First, when realizing the Network Layer, the original Thrift protocol stack fails to realize the routine scenario of sending a complete message package to the remote server. Such defect could lead to enormous waste of performance at the server end. And second as to the Serialization, the original Thrift realized it in a way that would produce huge amounts of memory fragments in the Managed Heap, which again lead to enormous consumption of memory.
BUG There is a bug in the original Thrift realization of the Network Layer. Whenever a message is sent, the SEQID from the protocol stack would always be 0. This bug has directly caused applications to malfunction under the multithreading circumstance, unless we manually control the synchronization of the multiple threads, which would then reduce the application’s output at a significant level. Thus, when designing the interfaces, we have planned thoroughly and carefully, and have greatly lessen the pre-knowledge of using this API while satisfying routine usage. Apart from that, NHBaseAPI is also easy to use due to its inner operating mechanisms, such as automatic computing of the distribution of Region Servers, automatic reconnection, automatic load balance of multiple TCP SOCKET request, and etc.
In the current interface design, we only provide some basic functions for HBase operations, and only provide synchronous methods for these operations. However in the following versions, we will provide asynchronous methods as well. Currently we support the following basic operations.
string connectionStr = "zk=xxxxxx:2181,xxxxxx:2181,xxxxxx:2181";
IHBaseClient client = new HBaseClient(connectionStr)
A ConnectionStr may contain many settings. A simple way to initialize is to only put zk information in the ConnectionStr. Settings in the ConnectionStr:
Settings | Default | Description | Optional |
---|---|---|---|
zkTimeout | 00:00:30 | Session Timeout for remote ZooKeeper | Y |
memSegSize | 256 | Size of a single memory segment when receiving network data. Unit: Byte. Value from 64 to 1024 in times of 64. | Y |
memSegMultiples | 100000 | Size of unmanaged memory currently applied. Equals Multiples * SegmentSize | Y |
minConnection | 1 | Minimum connections maintained for the same remote TCP IP and port | Y |
maxConnection | 3 | Maximum connections maintained for the same remote TCP IP and port | Y |
allowPrintDumpInfo | false | Allow or not the printing of network errors’ details when such internal errors occurred | Y |
//Initialization Omitted
IHBaseClient client = new HBaseClient(connectionStr)
IHTable table = client.CreateTable("TableName", "cf");
//Initialization Omitted
IHBaseClient client = new HBaseClient(connectionStr)
client.DeleteTable("TableName");
//Initialization Omitted
IHBaseClient client = new HBaseClient(connectionStr)
IHTable table = client.GetTable("TableName");
string tableName = string.Format("test_thrift_table_test_{0}", DateTime.Now.Millisecond);
ColumnInfo[] columninfos = new[]
{
new ColumnInfo
{
ColumnFamily = "cf",
ColumnName = "col1",
Value = Encoding.UTF8.GetBytes("world1")
}
};
byte[] rowKey = ...;
table.Insert(rowKey, columninfos);
//Initialization Omitted
IHBaseClient client = new HBaseClient(connectionStr)
IHTable table = client.GetTable("TableName");
byte[] rowKey = ...;
RowInfo info = table.GetRow(rowKey);
//Initialization Omitted
IHBaseClient client = new HBaseClient(connectionStr)
IHTable table = client.GetTable("TableName");
byte[] rowKey = ...;
BatchMutation[] rows = new[]
{
new BatchMutation{
RowKey = Encoding.UTF8.GetBytes("rowkey1"),
Mutations = new[]
{
new Mutation{ColumnName = "cf:col1", Value = Encoding.UTF8.GetBytes("value1")}
}},
new BatchMutation{
RowKey = Encoding.UTF8.GetBytes("rowkey2"),
Mutations = new[]
{
new Mutation{ColumnName = "cf:col2", Value = Encoding.UTF8.GetBytes("value2")}
}}
};
BatchMutation[] exceptionBatchMutations;
//Batch insert data, and use out data to receive those that failed when inserting
//Use the overall return value to judge if all the data in the current batch have been successfully inserted
bool result = table.BatchInsert(out exceptionBatchMutations, rows);
//Initialization Omitted
IHBaseClient client = new HBaseClient(connectionStr)
IHTable table = client.GetTable("TableName");
byte[] startRowKey = ...;
byte[] endRowKey = ...;
//Assign a column family in the test
List<string> columnFamily = new List<string> {"cf"};
//Read data from all the columns contained in the column family
Scanner scanner = table.NewScanner(startRowKey, endRowKey, columnFamily);
RowInfo info;
while ((info = scanner.GetNext()) != null)
{
foreach (KeyValuePair<string, Cell> pair in info.Columns)
{
// pair contains the retrieved data
}
}
//Read data from a specified column in the column family
columnFamily = new List<string> {"cf:column1"};
scanner = table.NewScanner(startRowKey, endRowKey, columnFamily);
while ((info = scanner.GetNext()) != null)
{
foreach (KeyValuePair<string, Cell> pair in info.Columns)
{
// pair contains the retrieved data
}
}
We are eager and thankful to receive valuable suggestions from every developers. We will continue improving this API in the future, and will continually make more contributions for .NET open source community.