Documentation ¶
Overview ¶
Package driver wraps the hiveserver2 thrift interface in a few related interfaces for more convenient use.
Index ¶
Constants ¶
This section is empty.
Variables ¶
View Source
var (
DefaultOptions = Options{
PollIntervalSeconds: 5,
BatchSize: 10000,
ConnectTimeout: 5000,
SocketTimeout: 5000,
}
)
Functions ¶
func ParseParams ¶
ParseParams rewrites the query from using "?" placeholders to using "@pN" parameter names that SQL Server will accept.
This function and package is not subject to any API compatibility guarantee.
Types ¶
type Connection ¶
type Connection struct {
// contains filtered or unexported fields
}
func ConnectWithUser ¶
func ConnectWithUser(hostPort, username, password string, options Options) (*Connection, error)
func (*Connection) Close ¶
func (c *Connection) Close() error
Close Closes an open hive session. After using this, the connection is invalid for other use.
func (*Connection) Exec ¶
func (c *Connection) Exec(query string) (*inf.TExecuteStatementResp, error)
type Options ¶
type Options struct { PollIntervalSeconds int64 BatchSize int64 Host string Port int Username string Password string Database string MaxMessageSize int32 MaxFrameSize int32 ConnectTimeout time.Duration SocketTimeout time.Duration TLSConfig *tls.Config TBinaryStrictRead *bool TBinaryStrictWrite *bool THeaderProtocolID *thrift.THeaderProtocolID }
Options for opened Hive sessions.
type RowSet ¶
type RowSet interface { Handle(ctx context.Context) ([]byte, error) Columns() []string Next() bool Scan(dest ...interface{}) error Poll() (*Status, error) Wait() (*Status, error) }
A RowSet represents an asyncronous hive operation. You can Reattach to a previously submitted hive operation if you have a valid thrift client, and the serialized Handle() from the prior operation.
Click to show internal directories.
Click to hide internal directories.