VOOZH about

URL: https://www.nuget.org/packages/HBaseNet/

⇱ NuGet Gallery | HBaseNet 0.1.1




HBaseNet 0.1.1

dotnet add package HBaseNet --version 0.1.1
 
 
NuGet\Install-Package HBaseNet -Version 0.1.1
 
 
This command is intended to be used within the Package Manager Console in Visual Studio, as it uses the NuGet module's version of Install-Package.
<PackageReference Include="HBaseNet" Version="0.1.1" />
 
 
For projects that support PackageReference, copy this XML node into the project file to reference the package.
<PackageVersion Include="HBaseNet" Version="0.1.1" />
 
Directory.Packages.props
<PackageReference Include="HBaseNet" />
 
Project file
For projects that support Central Package Management (CPM), copy this XML node into the solution Directory.Packages.props file to version the package.
paket add HBaseNet --version 0.1.1
 
 
The NuGet Team does not provide support for this client. Please contact its maintainers for support.
#r "nuget: HBaseNet, 0.1.1"
 
 
#r directive can be used in F# Interactive and Polyglot Notebooks. Copy this into the interactive tool or source code of the script to reference the package.
#:package HBaseNet@0.1.1
 
 
#:package directive can be used in C# file-based apps starting in .NET 10 preview 4. Copy this into a .cs file before any lines of code to reference the package.
#addin nuget:?package=HBaseNet&version=0.1.1
 
Install as a Cake Addin
#tool nuget:?package=HBaseNet&version=0.1.1
 
Install as a Cake Tool
The NuGet Team does not provide support for this client. Please contact its maintainers for support.

HBaseNet

👁 NuGet Badge

This is a pure CSharp client for HBase.

Supported Versions

HBase >= 1.0

Example Usage

Create a client

var ZkQuorum = "zooKeep-host-ip";
var admin = await new AdminClient(ZkQuorum).Build();
if (admin == null) return;
var client = await new StandardClient(ZkQuorum).Build();
if (client == null) return;

Admin operation

var table = "student";
var cols = new[]
{
 new ColumnFamily("info")
 {
 Compression = Compression.GZ,
 KeepDeletedCells = KeepDeletedCells.TRUE
 },
 new ColumnFamily("special")
 {
 Compression = Compression.GZ,
 KeepDeletedCells = KeepDeletedCells.TTL,
 DataBlockEncoding = DataBlockEncoding.PREFIX
 }
};
var create = new CreateTableCall(table, cols)
{
 SplitKeys = new[] { "0", "5" }
};
var listTable = new ListTableNamesCall();
var disable = new DisableTableCall(table);
var delete = new DeleteTableCall(table);

var ct = await admin.CreateTable(create);

var tables = await admin.ListTableNames(listTable);

var dt = await admin.DisableTable(disable);

var del = await admin.DeleteTable(delete);

Generally operation

var table = "student";

// put
var rowKey = "123";
var values = new Dictionary<string, IDictionary<string,byte[]>>
{
 {
 "default", new Dictionary<string, byte[]>
 {
 {"key", "value".ToUtf8Bytes()}
 }
 }
};
var rs = await client.Put(new MutateCall(table, rowKey, values));

// scan
var sc = new ScanCall(table, "1", "")
{
 NumberOfRows = 100000
};
using var scanner = client.Scan(sc);
var scanResults = new List<Result>();
while (scanner.CanContinueNext)
{
 var per = await scanner.Next();
 if (true != per?.Any()) continue;
 scanResults.AddRange(per);
}

// get
var getResult = await client.Get(new GetCall(table, rowKey));

// delete
var delResult = await client.Delete(new MutateCall(table, rowKey, null));

Use conversion tools

public class Student
{
 public string Name { get; set; }
 public string Address { get; set; }
 public int Age { get; set; }
 public float Score { get; set; }
 public bool? IsMarried { get; set; }
 [HBaseConverter(typeof(DateTimeUnix13Converter))]
 public DateTime Create { get; set; }
 [HBaseProperty(family: "special")]
 [HBaseConverter(typeof(DateTimeUnix13Converter))]
 public DateTime? Modify { get; set; }
 [HBaseConverter(typeof(JsonStringConverter))]
 public List<string> Courses { get; set; }
}


var convertCache = new ConvertCache().BuildCache<Student>(EndianBitConverter.BigEndian);

var student = new Student
{
 Name = "Anna",
 Age = 20,
 Address = "Yuxi, China",
 Score = 99,
 IsMarried = true,
 Create = DateTime.Now,
 Courses = new List<string> { "Mathematics", "physics", "art" }
};

//object convert to values 
var values = HBaseConvert.Instance.ConvertToDictionary(student, convertCache);
 var rs = await client.Put(new MutateCall(Program.Table, rowKey, values));

//scan result convert to object of student
using var scanner = client.Scan(sc);
var scanResults = new List<Student>();
while (scanner.CanContinueNext)
{
 var per = await scanner.Next();
 if (true != per?.Any()) continue;
 var stus = HBaseConvert.Instance.ConvertToCustom<Student>(per, convertCache);
 scanResults.AddRange(stus);
} 

You can also refer to the "" project.

Product Versions Compatible and additional computed target framework versions.
.NET net5.0 net5.0 was computed.  net5.0-windows net5.0-windows was computed.  net6.0 net6.0 was computed.  net6.0-android net6.0-android was computed.  net6.0-ios net6.0-ios was computed.  net6.0-maccatalyst net6.0-maccatalyst was computed.  net6.0-macos net6.0-macos was computed.  net6.0-tvos net6.0-tvos was computed.  net6.0-windows net6.0-windows was computed.  net7.0 net7.0 was computed.  net7.0-android net7.0-android was computed.  net7.0-ios net7.0-ios was computed.  net7.0-maccatalyst net7.0-maccatalyst was computed.  net7.0-macos net7.0-macos was computed.  net7.0-tvos net7.0-tvos was computed.  net7.0-windows net7.0-windows was computed.  net8.0 net8.0 was computed.  net8.0-android net8.0-android was computed.  net8.0-browser net8.0-browser was computed.  net8.0-ios net8.0-ios was computed.  net8.0-maccatalyst net8.0-maccatalyst was computed.  net8.0-macos net8.0-macos was computed.  net8.0-tvos net8.0-tvos was computed.  net8.0-windows net8.0-windows was computed.  net9.0 net9.0 was computed.  net9.0-android net9.0-android was computed.  net9.0-browser net9.0-browser was computed.  net9.0-ios net9.0-ios was computed.  net9.0-maccatalyst net9.0-maccatalyst was computed.  net9.0-macos net9.0-macos was computed.  net9.0-tvos net9.0-tvos was computed.  net9.0-windows net9.0-windows was computed.  net10.0 net10.0 was computed.  net10.0-android net10.0-android was computed.  net10.0-browser net10.0-browser was computed.  net10.0-ios net10.0-ios was computed.  net10.0-maccatalyst net10.0-maccatalyst was computed.  net10.0-macos net10.0-macos was computed.  net10.0-tvos net10.0-tvos was computed.  net10.0-windows net10.0-windows was computed. 
.NET Core netcoreapp3.0 netcoreapp3.0 was computed.  netcoreapp3.1 netcoreapp3.1 was computed. 
.NET Standard netstandard2.1 netstandard2.1 is compatible. 
MonoAndroid monoandroid monoandroid was computed. 
MonoMac monomac monomac was computed. 
MonoTouch monotouch monotouch was computed. 
Tizen tizen60 tizen60 was computed. 
Xamarin.iOS xamarinios xamarinios was computed. 
Xamarin.Mac xamarinmac xamarinmac was computed. 
Xamarin.TVOS xamarintvos xamarintvos was computed. 
Xamarin.WatchOS xamarinwatchos xamarinwatchos was computed. 
Compatible target framework(s)
Included target framework(s) (in package)
Learn more about Target Frameworks and .NET Standard.

NuGet packages (1)

Showing the top 1 NuGet packages that depend on HBaseNet:

Package Downloads
GingerCoreNET

Package Description

GitHub repositories (1)

Showing the top 1 popular GitHub repositories that depend on HBaseNet:

Repository Stars
Ginger-Automation/Ginger
Ginger Automation IDE
Version Downloads Last Updated
0.1.1 2,399 3/26/2025
0.1.0 26,290 1/5/2021
0.1.0-rc2-final 635 8/2/2020