Documentation
¶
Overview ¶
Hive: The go thrift library for connecting to hive server.
This is just the generated Thrift-Hive and a very small connection wrapper.
Usage:
func main() {
hive.MakePool("192.168.1.17:10000")
conn, err := GetHiveConn()
if err == nil {
er, err := conn.Client.Execute("SELECT * FROM logevent")
if er == nil && err == nil {
for {
row, _, _ := conn.Client.FetchOne()
log.Println("row ", row)
}
}
}
if conn != nil {
// make sure to check connection back into pool
conn.Checkin()
}
}
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
Types ¶
type HiveConnection ¶
type HiveConnection struct {
Server string
Id int
Client *thrifthive.ThriftHiveClient
}
func GetHiveConn ¶
func GetHiveConn() (conn *HiveConnection, err error)
main entry point for checking out a connection from a list
func (*HiveConnection) Checkin ¶
func (conn *HiveConnection) Checkin()
Notes ¶
Bugs ¶
an error occured on batch mutate <nil> <nil> <nil> Cannot read. Remote side has closed. Tried to read 4 bytes, but only got 0 bytes.
Directories
¶
| Path | Synopsis |
|---|---|
|
thriftlib
|
|
|
fb303/facebook_service-remote
command
|
|
|
hive_service/thrift_hive-remote
command
|
|
Click to show internal directories.
Click to hide internal directories.