hbase

package module
v0.0.0-...-d2e3d2a Latest Latest
Warning

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

Go to latest
Published: Dec 25, 2018 License: Apache-2.0 Imports: 10 Imported by: 1

README

Hbase

Hbase is a simple ORM that implements the following two functions:

  • ReadRow using row key
  • WriteRow using row key

Usage:

There is a simple example in package demo/

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type HBase

type HBase struct {
	Key   string
	Value interface{}
	Error error

	Ctx    context.Context
	Expire time.Duration
	// contains filtered or unexported fields
}

HBase

func (*HBase) Create

func (b *HBase) Create(client gohbase.Client)

func (*HBase) Find

func (b *HBase) Find(client gohbase.Client)

type HBaseTag

type HBaseTag struct {
	Family string
	Cloumn string
}

type HBaseZK

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

HBase Zookeeper

func NewHBaseZK

func NewHBaseZK() *HBaseZK

NewHBaseZK 创建 HBaseZK 对象

func (*HBaseZK) Init

func (h *HBaseZK) Init(option *HBaseZKOption) bool

Init 初始化 Hbase 对象池, 构建可读写, 以及只读的Hbase对象实例

func (*HBaseZK) ReadRow

func (h *HBaseZK) ReadRow(ctx context.Context, key string, expire time.Duration, out interface{}) *HBase

ReadRow

func (*HBaseZK) WriteRow

func (h *HBaseZK) WriteRow(ctx context.Context, key string, value interface{}) *HBase

WriteRow

type HBaseZKOption

type HBaseZKOption struct {
	Root  string
	Hosts string
}

HBaseZKOption 配置类

func NewHbaseZKOptionFromJSON

func NewHbaseZKOptionFromJSON(js *simplejson.Json, configName string) *HBaseZKOption

NewHbaseZKOptionFromJSON 创建 HbaseZKOption 配置类

Directories

Path Synopsis

Jump to

Keyboard shortcuts

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