Documentation
¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
var ( // ErrShortWrite is used when the writer thread only succeeds in writing // part of its buffer to the socket, and not all of the buffer was sent ErrShortWrite = fmt.Errorf("short write occurred while writing to socket") )
Functions ¶
func Compare ¶
Compare compares two region names. We can't just use bytes.Compare() because it doesn't play nicely with the way META keys are built as the first region has an empty start key. Let's assume we know about those 2 regions in our cache:
.META.,,1 tableA,,1273018455182
We're given an RPC to execute on "tableA", row "\x00" (1 byte row key containing a 0). If we use Compare() to sort the entries in the cache, when we search for the entry right before "tableA,\000,:" we'll erroneously find ".META.,,1" instead of the entry for first region of "tableA".
Since this scheme breaks natural ordering, we need this comparator to implement a special version of comparison to handle this scenario.
func CompareGeneric ¶
func CompareGeneric(a, b interface{}) int
CompareGeneric is the same thing as Compare but for interface{}.
Types ¶
type Client ¶
type Client struct {
// contains filtered or unexported fields
}
Client manages a connection to a RegionServer.