Documentation ¶
Index ¶
- Variables
- func NewParallelScanner(c *client, rpc *hrpc.Scan, parallel int) hrpc.Scanner
- type AdminClient
- type Client
- type Option
- func EffectiveUser(user string) Option
- func FlushInterval(interval time.Duration) Option
- func RegionLookupTimeout(to time.Duration) Option
- func RegionReadTimeout(to time.Duration) Option
- func RpcQueueSize(size int) Option
- func ZookeeperRoot(root string) Option
- func ZookeeperTimeout(to time.Duration) Option
- type RPCClient
Constants ¶
This section is empty.
Variables ¶
var ( // ErrDeadline is returned when the deadline of a request has been exceeded ErrDeadline = errors.New("deadline exceeded") ErrRegionUnavailable = errors.New("region unavailable") // TableNotFound is returned when attempting to access a table that // doesn't exist on this cluster. TableNotFound = errors.New("table not found") // ErrCannotFindRegion is returned when it took too many tries to find a // region for the request. It's likely that hbase:meta has overlaps or some other // inconsistency. ErrConnotFindRegion = errors.New("cannot find region for the rpc") // ErrMetaLookupThrottled is returned when a lookup for the rpc's region // has been throttled. ErrMetaLookupThrottled = errors.New("lookup to hbase:meta has been throttled") )
Constants
Functions ¶
Types ¶
type AdminClient ¶
type AdminClient interface { CreateTable(t *hrpc.CreateTable) error DeleteTable(t *hrpc.DeleteTable) error EnableTable(t *hrpc.EnableTable) error DisableTable(t *hrpc.DisableTable) error ClusterStatus() (*pb.ClusterStatus, error) }
AdminClient to perform admistrative operations with HMaster
func NewAdminClient ¶
func NewAdminClient(zkquorum string, options ...Option) AdminClient
NewAdminClient creates an admin HBase client.
type Client ¶
type Client interface { Scan(s *hrpc.Scan) hrpc.Scanner ScanParallel(s *hrpc.Scan, parallel int) hrpc.Scanner Get(g *hrpc.Get) (*hrpc.Result, error) Put(p *hrpc.Mutate) (*hrpc.Result, error) Delete(d *hrpc.Mutate) (*hrpc.Result, error) Append(a *hrpc.Mutate) (*hrpc.Result, error) Increment(i *hrpc.Mutate) (int64, error) IncrementMulti(i *hrpc.Mutate) (map[string]map[string]int64, error) CheckAndPut(p *hrpc.Mutate, family string, qualifier string, expectedValue []byte) (bool, error) Close() }
Client a regular HBase client
type Option ¶
type Option func(*client)
func EffectiveUser ¶
EffectiveUser will return an option that will set the user used when accessing regions.
func FlushInterval ¶
FlushInterval will return an option that will set the timeout for flushing the RPC queues used in a given client
func RegionLookupTimeout ¶
RegionLookupTimeout will return an option that sets the region lookup timeout
func RegionReadTimeout ¶
RegionReadTimeout will return an option that sets the region read timeout
func RpcQueueSize ¶
RpcQueueSize will return an option that will set the size of the RPC queues used in a given client
func ZookeeperRoot ¶
ZookeeperRoot will return an option that will set the zookeeper root path used in a given client.
func ZookeeperTimeout ¶
ZookeeperTimeout will return an option that will set the zookeeper session timeout.
Source Files ¶
Directories ¶
Path | Synopsis |
---|---|
Package pb is a generated protocol buffer package.
|
Package pb is a generated protocol buffer package. |
Package region contains data structures to represent HBase regions.
|
Package region contains data structures to represent HBase regions. |
Package zk encapsulates our interactions with ZooKeeper.
|
Package zk encapsulates our interactions with ZooKeeper. |