hive

package
v0.40.1 Latest Latest
Warning

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

Go to latest
Published: Apr 20, 2021 License: Apache-2.0 Imports: 9 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

View Source
var (
	ErrExpectedType           = errors.New("expected type")
	ErrWrongPartitionLocation = errors.New("wrong partition location")
	ErrWrongLocationExpected  = errors.New("wrong location expected")
	ErrWrongColumnExpected    = errors.New("wrong column expected")
)

Functions

func CopyOrMergeAll added in v0.40.0

func CopyOrMergeAll(ctx context.Context, fromClient, toClient *MSClient, schemaFilter, tableFilter, toBranch string) error

func FieldSchemaEqual

func FieldSchemaEqual(f1, f2 *hive_metastore.FieldSchema) bool

Types

type FSCollection

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

func NewFSCollection

func NewFSCollection(fsList []*hive_metastore.FieldSchema) *FSCollection

func (*FSCollection) CompareWith

func (p *FSCollection) CompareWith(i int, v interface{}, j int) metastore.CompareResult

func (*FSCollection) Len

func (p *FSCollection) Len() int

func (*FSCollection) Less

func (p *FSCollection) Less(i, j int) bool

func (*FSCollection) Name

func (p *FSCollection) Name(i int) string

func (*FSCollection) Swap

func (p *FSCollection) Swap(i, j int)

func (*FSCollection) Value

func (p *FSCollection) Value(i int) interface{}

type MSClient

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

func NewMSClient

func NewMSClient(ctx context.Context, addr string, secure bool) (*MSClient, error)

func (*MSClient) Close

func (c *MSClient) Close() error

func (*MSClient) Copy

func (c *MSClient) Copy(fromDB, fromTable, toDB, toTable, toBranch, serde string, toClient ThriftHiveMetastoreClient) error

func (*MSClient) CopyOrMerge

func (c *MSClient) CopyOrMerge(fromDB, fromTable, toDB, toTable, toBranch, serde string, partition []string) error

func (*MSClient) CopyOrMergeTo added in v0.40.0

func (c *MSClient) CopyOrMergeTo(fromDB, fromTable, toDB, toTable, toBranch, serde string, partition []string, toClient ThriftHiveMetastoreClient) error

func (*MSClient) CopyPartition

func (c *MSClient) CopyPartition(fromDB, fromTable, toDB, toTable, toBranch, serde string, partition []string) error

func (*MSClient) Diff

func (c *MSClient) Diff(fromDB, fromTable, toDB, toTable string) (*metastore.MetaDiff, error)

func (*MSClient) Merge

func (c *MSClient) Merge(fromDB, fromTable, toDB, toTable, toBranch, serde string, toClient ThriftHiveMetastoreClient) error

type PartitionCollection

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

func NewPartitionCollection

func NewPartitionCollection(partition []*hive_metastore.Partition) *PartitionCollection

func (*PartitionCollection) CompareWith

func (p *PartitionCollection) CompareWith(i int, v interface{}, j int) metastore.CompareResult

func (*PartitionCollection) Len

func (p *PartitionCollection) Len() int

func (*PartitionCollection) Less

func (p *PartitionCollection) Less(i, j int) bool

func (*PartitionCollection) Name

func (p *PartitionCollection) Name(i int) string

func (*PartitionCollection) Swap

func (p *PartitionCollection) Swap(i, j int)

func (*PartitionCollection) Value

func (p *PartitionCollection) Value(i int) interface{}

type ThriftHiveMetastoreClient

type ThriftHiveMetastoreClient interface {
	CreateTable(ctx context.Context, tbl *hive_metastore.Table) (err error)
	GetTable(ctx context.Context, dbname string, tableName string) (r *hive_metastore.Table, err error)
	AlterTable(ctx context.Context, dbname string, tableName string, newTable *hive_metastore.Table) (err error)
	AddPartitions(ctx context.Context, newParts []*hive_metastore.Partition) (r int32, err error)
	GetPartitions(ctx context.Context, dbName string, tableName string, maxPartitions int16) (r []*hive_metastore.Partition, err error)
	GetPartition(ctx context.Context, dbName string, tableName string, values []string) (r *hive_metastore.Partition, err error)
	AlterPartitions(ctx context.Context, dbName string, tableName string, newPartitions []*hive_metastore.Partition) (err error)
	AlterPartition(ctx context.Context, dbName string, tableName string, values *hive_metastore.Partition) (err error)
	AddPartition(ctx context.Context, newPartition *hive_metastore.Partition) (r *hive_metastore.Partition, err error)
	DropPartition(ctx context.Context, dbName string, tableName string, values []string, deleteData bool) (r bool, err error)
	GetDatabase(ctx context.Context, name string) (r *hive_metastore.Database, err error)
	GetDatabases(ctx context.Context, pattern string) (r []string, err error)
	GetAllDatabases(ctx context.Context) (r []string, err error)
	CreateDatabase(ctx context.Context, database *hive_metastore.Database) (err error)
	GetTables(ctx context.Context, dbName string, pattern string) (r []string, err error)
}

Directories

Path Synopsis
gen-go

Jump to

Keyboard shortcuts

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