baichongyang baca853c99 first init hace 3 años
..
filter baca853c99 first init hace 3 años
hrpc baca853c99 first init hace 3 años
pb baca853c99 first init hace 3 años
region baca853c99 first init hace 3 años
zk baca853c99 first init hace 3 años
.travis.yml baca853c99 first init hace 3 años
AUTHORS baca853c99 first init hace 3 años
COPYING baca853c99 first init hace 3 años
Makefile baca853c99 first init hace 3 años
README.md baca853c99 first init hace 3 años
admin_client.go baca853c99 first init hace 3 años
caches.go baca853c99 first init hace 3 años
check_line_len.awk baca853c99 first init hace 3 años
client.go baca853c99 first init hace 3 años
go.mod baca853c99 first init hace 3 años
go.sum baca853c99 first init hace 3 años
rpc.go baca853c99 first init hace 3 años
scanner.go baca853c99 first init hace 3 años

README.md

Golang HBase client Build Status codecov.io GoDoc

This is a pure Go client for HBase.

Current status: beta.

Supported Versions

HBase >= 1.0

Installation

go get github.com/tsuna/gohbase

Example Usage

Create a client

client := gohbase.NewClient("localhost")

Insert a cell

// Values maps a ColumnFamily -> Qualifiers -> Values.
values := map[string]map[string][]byte{"cf": map[string][]byte{"a": []byte{0}}}
putRequest, err := hrpc.NewPutStr(context.Background(), "table", "key", values)
rsp, err := client.Put(putRequest)

Get an entire row

getRequest, err := hrpc.NewGetStr(context.Background(), "table", "row")
getRsp, err := client.Get(getRequest)

Get a specific cell

// Perform a get for the cell with key "15", column family "cf" and qualifier "a"
family := map[string][]string{"cf": []string{"a"}}
getRequest, err := hrpc.NewGetStr(context.Background(), "table", "15",
    hrpc.Families(family))
getRsp, err := client.Get(getRequest)

Get a specific cell with a filter

pFilter := filter.NewKeyOnlyFilter(true)
family := map[string][]string{"cf": []string{"a"}}
getRequest, err := hrpc.NewGetStr(context.Background(), "table", "15",
    hrpc.Families(family), hrpc.Filters(pFilter))
getRsp, err := client.Get(getRequest)

Scan with a filter

pFilter := filter.NewPrefixFilter([]byte("7"))
scanRequest, err := hrpc.NewScanStr(context.Background(), "table",
		hrpc.Filters(pFilter))
scanRsp, err := client.Scan(scanRequest)

Contributing

Any help would be appreciated. Please use Github pull requests to send changes for review. Please sign the Contributor License Agreement when you send your first change for review.

License

Copyright © 2015 The GoHBase Authors. All rights reserved. Use of this source code is governed by the Apache License 2.0 that can be found in the COPYING file.