HBase.NET is a powerful, object-oriented HBase client for .NET which supports ORM-style HBase reads and writes. HBase.NET uses reflection to serialize POCOs and store them in HBase appropriately. The HBase client will preform it's own connection pooling internally, and could optionally also only use a single connection to the thrift server.

The HBase.NET client currently supports the following operations:

Connection Pooling:
  • int AvailableClients { get; }
    • Returns the number of available thrift connections in the internal connection pool.
  • int BlockedRequests { get; }
    • Returns the number of connections which are currently in a blocked state.
  • int TotalClients { get; }
    • Returns the total number of connections

Atomic Operations:
  • long AtomicIncrement(string TableName, string Key, string ColumnFamily, long Value, DateTime TimeStamp, TimeInterval Interval);
    • Atomic increments a time-series cell in HBase. Note that the timestamp for time-series data in HBase is stored in the column.
  • long AtomicIncrement(string TableName, string Key, string ColumnFamily, string Column, long Value);
    • Atomic increments a specific cell in hbase.
  • void BulkAtomicIncrement(IEnumerable<IAtomicIncrement> Increments);
    • Preforms multiple atomic operations in a single batch.

Management:
  • void CreateTable(string TableName, IEnumerable<string> ColumnFamilies, CompressionType Compression);
    • Creates a table in HBase with the specified column families and compression.
  • void DeleteTable(string TableName);
    • Deletes an existing table from HBase. Note that the table must be disabled first.
  • IList<string> GetTableNames();
    • Fetches the available table names

Deletes:
  • void DeleteBulk(string TableName, IEnumerable<IHBaseDeletion> Bulk);
    • Preforms multiple deletions in a single batch.
  • void DeleteOne<POCO>(string TableName, string Key, string ColumnFamily) where POCO : class;
    • Deletes the corresponding row-column combinations in HBase for the current timestamp. Columns deleted are as specified by the available fields and properties in your POCO type.
  • void DeleteRow(string TableName, string Key);
    • Deletes an entire row in HBase, including all columns for the current timestamp.

Object-Oriented Gets:
  • IDictionary<string, POCO> GetBulk<POCO>(string TableName, IEnumerable<string> Keys, string ColumnFamily) where POCO : class;
    • Preforms multiple gets in a single batch, and returns those gets as a Dictionary representing the keys, and columns as specified by the available fields and properties in your POCO type. If your POCO type is an interface, the client uses Castle DynamicProxy to on-the-fly generate a class which implements your interface, with the underlying implementation being a hash-table.
  • POCO GetOne<POCO>(string TableName, string Key, DateTime TimeStamp, TimeInterval Interval) where POCO : class;
    • Preforms a single get operation and returns a POCO with columns as specified by the available fields and properties in your POCO type. If your POCO type is an interface, the client uses Castle DynamicProxy to on-the-fly generate a class which implements your interface, with the underlying implementation being a hash-table. This particular
  • POCO GetOne<POCO>(string TableName, string Key, string ColumnFamily) where POCO : class;
    • Preforms a single get operation and returns a POCO with columns as specified by the available fields and properties in your POCO type. If your POCO type is an interface, the client uses Castle DynamicProxy to on-the-fly generate a class which implements your interface, with the underlying implementation being a hash-table. This particular operation is a time-series operation, and the beginning of the column is specified as a timestamp.
  • IDictionary<string, IDictionary<DateTime, POCO>> GetRange<POCO>(string TableName, IEnumerable<string> Keys, DateTime StartTime, DateTime StopTime, TimeInterval Interval) where POCO : class;
    • Preforms a batch get operation and returns a nested dictionary (key/timestamp/POCO) with columns as specified by the available fields and properties in your POCO type. If your POCO type is an interface, the client uses Castle DynamicProxy to on-the-fly generate a class which implements your interface, with the underlying implementation being a hash-table.
  • IDictionary<DateTime, POCO> GetRange<POCO>(string TableName, string Key, DateTime StartTime, DateTime StopTime, TimeInterval Interval) where POCO : class;
    • Preforms a single get operation and returns a dictionary (timestamp/POCO) with columns as specified by the available fields and properties in your POCO type. If your POCO type is an interface, the client uses Castle DynamicProxy to on-the-fly generate a class which implements your interface, with the underlying implementation being a hash-table.

Cell-Based Gets:
  • IDictionary<IHBaseCellInfo, object> GetCells(string TableName, IEnumerable<IHBaseCellInfo> Cells);
    • Preforms multiple gets in a single batch and returns those as individual HBase cells for the event where you want to preform operations in a non-object oriented way. Note this method is not generic; however, the CellInfo hashcode can be used to link back to the return object.
  • IList<IHBaseClassCell<T, ColumnType>> GetCells<T, ColumnType>(string TableName, IEnumerable<IHBaseClassCell<T, ColumnType>> Cells) where T : class;
    • Preforms multiple gets in a single batch and returns those as individual HBase cells for the event where you want to preform operations in a non-object oriented way. Note this method is generic and will be called if your T is a class (not a value type). This particular method also supports special column types when the column may not be a string, for example, binary.
  • IList<IHBaseStructureCell<T, ColumnType>> GetCells<T, ColumnType>(string TableName, IEnumerable<IHBaseStructureCell<T, ColumnType>> Cells) where T : struct;
    • Preforms multiple gets in a single batch and returns those as individual HBase cells for the event where you want to preform operations in a non-object oriented way. Note this method is generic and will be called if you T is a struct (also known as a value type). This particular method also supports special column types when the column may not be a string, for example, binary.
  • IList<IHBaseClassCell<T>> GetCells<T>(string TableName, IEnumerable<IHBaseClassCell<T>> Cells) where T : class;
    • Preforms multiple gets in a single batch and returns those as individual HBase cells for the event where you want to preform operations in a non-object oriented way. Note this method is generic and will be called if your T is a class (not a value type).
  • IList<IHBaseStructureCell<T>> GetCells<T>(string TableName, IEnumerable<IHBaseStructureCell<T>> Cells) where T : struct;
    • Preforms multiple gets in a single batch and returns those as individual HBase cells for the event where you want to preform operations in a non-object oriented way. Note this method is generic and will be called if you T is a struct (also known as a value type).
  • T GetClassCell<T, ColumnNameType>(string TableName, string Key, string ColumnFamily, ColumnNameType Column) where T : class;
    • Preforms a single get and returns that individual HBas cells for the event where you want to preform operations in a non-object oriented way. Note this method is generic and will be called if your T is a class (not a value type).
  • T GetClassCell<T>(string TableName, string Key, string ColumnFamily, string Column) where T : class;
    • Preforms a single get and returns that individual HBas cells for the event where you want to preform operations in a non-object oriented way. Note this method is generic and will be called if your T is a structure(also known as a value type).
  • IList<IHBaseCell> GetRow(string TableName, string Key, IDictionary<string, string> Attributes);
    • Preforms a single get operation and returns list of HBaseCells for all of the available data in any particular row.
  • IList<IHBaseCell<ReturnType>> GetRow<ReturnType>(string TableName, string Key, IDictionary<string, string> Attributes);
    • Preforms a single get operation and returns list of value-generic HBaseCells for all of the available data in any particular row.
  • IList<IHBaseCell<ReturnType, ColumnType>> GetRow<ReturnType, ColumnType>(string TableName, string Key, IDictionary<string, string> Attributes);
    • Preforms a single get operation and returns list of value-generic and column-generic HBaseCells for all of the available data in any particular row.
  • T? GetStructureCell<T, ColumnNameType>(string TableName, string Key, string ColumnFamily, ColumnNameType Column) where T : struct;
    • Preforms a single get operation and returns a particular structure (value type). The column type is also generic for this operation.
  • T? GetStructureCell<T>(string TableName, string Key, string ColumnFamily, string Column) where T : struct;
    • Preforms a single get operation and returns a particular structure (value type).

Index Get Operations:
  • IDictionary<string, long> GetOptimizationCounts(string TableName, IEnumerable<IHBaseIndexOptimizationLookup> IndexOptimizationLookups);
    • Documentation TODO: Basic indexing functionality added to HBase client.
  • IDictionary<long, string> GetRange(string TableName, string Key, string Index, long Start, long Stop);
    • Documentation TODO: Basic indexing functionality added to HBase client.

Puts:
  • void PutBulk(string TableName, IEnumerable<IHBasePut> Bulk);
    • Preforms a bulk put operation with columns as specified by the available fields and properties in your POCO type.
  • void PutOne<POCO>(string TableName, string Key, string ColumnFamily, POCO Value) where POCO : class;
    • Preforms a single put operation with columns as specified by the available fields and properties in your POCO type.

Scans:
Note: These are in desperate need of refactoring into an object-oriented IDisposable Scan class.
  • IDictionary<string, POCO> Scan<POCO>(string TableName, string ColumnFamily, IEnumerable<string> SubStrings) where POCO : class;
  • IDictionary<string, POCO> Scan<POCO>(string TableName, string ColumnFamily, IEnumerable<string> SubStrings, IEnumerable<string> Prefixes) where POCO : class;
  • IDictionary<string, POCO> Scan<POCO>(string TableName, string ColumnFamily, IEnumerable<string> SubStrings, IEnumerable<string> Prefixes, string KeyStart, string KeyStop, string Regex) where POCO : class;
  • IDictionary<string, POCO> Scan<POCO>(string TableName, string ColumnFamily, IEnumerable<string> SubStrings, IEnumerable<string> Prefixes, string KeyStart, string KeyStop, string Regex, int? MaxResults) where POCO : class;
  • IDictionary<string, POCO> Scan<POCO>(string TableName, string ColumnFamily, IEnumerable<string> SubStrings, IEnumerable<string> Prefixes, string Regex) where POCO : class;
  • IDictionary<string, POCO> Scan<POCO>(string TableName, string ColumnFamily, string KeyStart) where POCO : class;
  • IDictionary<string, POCO> Scan<POCO>(string TableName, string ColumnFamily, string KeyStart, string KeyStop) where POCO : class;
  • IList<String> GetKeysForPrefix(String TableName, String Prefix);
    • Returns keys in a table with a particular prefix.
  • IDictionary<string, POCO> ScanByPrefix<POCO>(string TableName, string ColumnFamily, string KeyPrefix) where POCO : class;
  • IDictionary<string, POCO> ScanByPrefixesWithRegex<POCO>(string TableName, string ColumnFamily, IEnumerable<string> Prefixes, string Regex) where POCO : class;
  • IDictionary<string, POCO> ScanByRegex<POCO>(string TableName, string ColumnFamily, string KeyStart, string KeyStop, string Regex) where POCO : class;
  • IDictionary<string, POCO> ScanByRegex<POCO>(string TableName, string ColumnFamily, string KeyStart, string Regex) where POCO : class;
  • IDictionary<string, POCO> ScanByRegex<POCO>(string TableName, string ColumnFamily, string Regex) where POCO : class;

Last edited Apr 25, 2014 at 7:54 PM by thomas_rega, version 2