Pure-Go HBase client
Branch: master
Clone or download
Permalink
Type Name Latest commit message Commit time
Failed to load latest commit information.
filter pb: move protobuf files out of internal Mar 30, 2017
hrpc hrpc: add non-Str mutate instantiators Sep 19, 2018
pb pb: Remove unnecessary .proto files. Jun 27, 2017
region gohbase/region: use sync pool for multi Oct 3, 2018
test gohbase/hrpc, gohbase/region: don't return error from ToProto Sep 7, 2017
zk using recommended lowercase reference to logrus (#73) Nov 6, 2017
.travis.yml Fix golint import path Feb 1, 2019
AUTHORS AUTHORS: Add Arista as an organization. Jun 28, 2017
COPYING Initial commit. May 4, 2015
Makefile Makefile: exclude test/mock/ directory from coverage Jul 10, 2017
README.md README: set status of the project to beta Jun 9, 2017
admin_client.go gohbase: check if procedure finished with exception Jan 6, 2018
caches.go using recommended lowercase reference to logrus (#73) Nov 6, 2017
check_line_len.awk Enforce a reasonable line-length limit on the code (100 cols). Aug 9, 2015
client.go region: if flushinterval=0, flush multi right away when no new rpcs Aug 9, 2018
discovery_test.go gohbase/*: use regionserver address as is from meta Jun 29, 2017
install_ci.sh travis: fix builds Nov 2, 2016
integration_test.go gohbase: modify behavior of scanner.Next() May 24, 2018
metacache_test.go gohbase/*: use regionserver address as is from meta Jun 29, 2017
rpc.go gohbase: close meta lookup scanner automatically Jun 20, 2018
rpc_test.go gohbase: revert meta lookup throttling yet again May 29, 2018
scanner.go gohbase, hrpc: replace NewCloseFromID with CloseScanner option Jun 20, 2018
scanner_test.go gohbase, hrpc: replace NewCloseFromID with CloseScanner option Jun 20, 2018
table_test.go gohbase: fix Errorf formatting Nov 6, 2017

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.