gohbase

package module
v0.0.0-...-765c624 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Jun 11, 2015 License: Apache-2.0 Imports: 13 Imported by: 0

README

Golang HBase client Build Status codecov.io GoDoc

This is a pure-Go client for HBase.

Current status: prototype. Working on META lookups and other basic things like that. Any help would be appreciated. Please sign the Contributor License Agreement when you send your first change for review. Please use GerritHub to send changes for review, instead of GitHub pull requests.

Documentation

Index

Constants

This section is empty.

Variables

View Source
var (

	// ErrDeadline is returned when the deadline of a request has been exceeded
	ErrDeadline = fmt.Errorf("deadline exceeded")
)

Constants

Functions

This section is empty.

Types

type Client

type Client struct {
	// contains filtered or unexported fields
}

A Client provides access to an HBase cluster.

func NewClient

func NewClient(zkquorum string) *Client

NewClient creates a new HBase client.

func (*Client) Append

func (c *Client) Append(table, rowkey string, values map[string]map[string][]byte) (*pb.MutateResponse, error)

Append atomically appends all the given values to their current values in HBase.

func (*Client) AppendWithDeadline

func (c *Client) AppendWithDeadline(table, rowkey string, values map[string]map[string][]byte, deadline *time.Time) (*pb.MutateResponse, error)

func (*Client) CheckTable

func (c *Client) CheckTable(table string) (*pb.GetResponse, error)

CheckTable returns an error if the given table name doesn't exist.

func (*Client) Delete

func (c *Client) Delete(table, rowkey string, values map[string]map[string][]byte) (*pb.MutateResponse, error)

Delete removes values from the given row of the table.

func (*Client) DeleteWithDeadline

func (c *Client) DeleteWithDeadline(table, rowkey string, values map[string]map[string][]byte, deadline *time.Time) (*pb.MutateResponse, error)

func (*Client) Get

func (c *Client) Get(table, rowkey string, families map[string][]string) (*pb.GetResponse, error)

Get returns a single row fetched from HBase.

func (*Client) GetWithDeadline

func (c *Client) GetWithDeadline(table string, rowkey string, families map[string][]string, deadline *time.Time) (*pb.GetResponse, error)

func (*Client) Increment

func (c *Client) Increment(table, rowkey string, values map[string]map[string][]byte) (*pb.MutateResponse, error)

Increment atomically increments the given values in HBase.

func (*Client) IncrementWithDeadline

func (c *Client) IncrementWithDeadline(table, rowkey string, values map[string]map[string][]byte, deadline *time.Time) (*pb.MutateResponse, error)

func (*Client) Put

func (c *Client) Put(table string, rowkey string, values map[string]map[string][]byte) (*pb.MutateResponse, error)

Put inserts or updates the values into the given row of the table.

func (*Client) PutWithDeadline

func (c *Client) PutWithDeadline(table string, rowkey string, values map[string]map[string][]byte, deadline *time.Time) (*pb.MutateResponse, error)

func (*Client) Scan

func (c *Client) Scan(table string, families map[string][]string, startRow, stopRow []byte) (*pb.ScanResponse, error)

Scan retrieves the values specified in families from the given range.

func (*Client) ScanWithDeadline

func (c *Client) ScanWithDeadline(table string, families map[string][]string, startRow, stopRow []byte, deadline *time.Time) (*pb.ScanResponse, error)

Directories

Path Synopsis
cmd
cli command
Package pb is a generated protocol buffer package.
Package pb is a generated protocol buffer package.
Package zk encapsulates our interactions with ZooKeeper.
Package zk encapsulates our interactions with ZooKeeper.

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL