instruction

package
v0.0.0-...-1ccce5b Latest Latest
Warning

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

Go to latest
Published: Apr 11, 2017 License: Apache-2.0 Imports: 18 Imported by: 0

Documentation

Index

Constants

View Source
const (
	Ascending  = Order(1)
	Descending = Order(-1)
)

Variables

View Source
var (
	InstructionRunner = &instructionRunner{}
)

Functions

func DoAdapterSplitReader

func DoAdapterSplitReader(reader io.Reader, writer io.Writer, adapterName, connectionId string) error

func DoBroadcast

func DoBroadcast(reader io.Reader, writers []io.Writer) error

func DoCoGroupPartitionedSorted

func DoCoGroupPartitionedSorted(leftRawChan, rightRawChan io.Reader, writer io.Writer, indexes []int) error

Top streamingly compare and get the top n items

func DoCollectPartitions

func DoCollectPartitions(readers []io.Reader, writer io.Writer) error

func DoJoinPartitionedSorted

func DoJoinPartitionedSorted(leftRawChan, rightRawChan io.Reader, writer io.Writer, indexes []int,
	isLeftOuterJoin, isRightOuterJoin bool) error

Top streamingly compare and get the top n items

func DoLocalDistinct

func DoLocalDistinct(reader io.Reader, writer io.Writer, orderBys []OrderBy) error

func DoLocalHashAndJoinWith

func DoLocalHashAndJoinWith(leftReader, rightReader io.Reader, writer io.Writer, indexes []int) error

Top streamingly compare and get the top n items

func DoLocalSort

func DoLocalSort(reader io.Reader, writer io.Writer, orderBys []OrderBy) error

func DoLocalTop

func DoLocalTop(reader io.Reader, writer io.Writer, n int, orderBys []OrderBy) error

Top streamingly compare and get the top n items

func DoMergeSortedTo

func DoMergeSortedTo(readers []io.Reader, writer io.Writer, orderBys []OrderBy) error

Top streamingly compare and get the top n items

func DoMergeTo

func DoMergeTo(readers []io.Reader, writer io.Writer) error

Top streamingly compare and get the top n items

func DoPipeAsArgs

func DoPipeAsArgs(reader io.Reader, writer io.Writer, code string) error

Top streamingly compare and get the top n items

func DoRoundRobin

func DoRoundRobin(reader io.Reader, writers []io.Writer) error

func DoScatterPartitions

func DoScatterPartitions(reader io.Reader, writers []io.Writer, indexes []int) error

Types

type AdapterSplitReader

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

func NewAdapterSplitReader

func NewAdapterSplitReader(adapterName, connectionId string) *AdapterSplitReader

func (*AdapterSplitReader) Function

func (b *AdapterSplitReader) Function() func(readers []io.Reader, writers []io.Writer, stats *Stats) error

func (*AdapterSplitReader) GetMemoryCostInMB

func (b *AdapterSplitReader) GetMemoryCostInMB(partitionSize int64) int64

func (*AdapterSplitReader) Name

func (b *AdapterSplitReader) Name() string

func (*AdapterSplitReader) SerializeToCommand

func (b *AdapterSplitReader) SerializeToCommand() *pb.Instruction

type Broadcast

type Broadcast struct {
}

func NewBroadcast

func NewBroadcast() *Broadcast

func (*Broadcast) Function

func (b *Broadcast) Function() func(readers []io.Reader, writers []io.Writer, stats *Stats) error

func (*Broadcast) GetMemoryCostInMB

func (b *Broadcast) GetMemoryCostInMB(partitionSize int64) int64

func (*Broadcast) Name

func (b *Broadcast) Name() string

func (*Broadcast) SerializeToCommand

func (b *Broadcast) SerializeToCommand() *pb.Instruction

type CoGroupPartitionedSorted

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

func NewCoGroupPartitionedSorted

func NewCoGroupPartitionedSorted(indexes []int) *CoGroupPartitionedSorted

func (*CoGroupPartitionedSorted) Function

func (b *CoGroupPartitionedSorted) Function() func(readers []io.Reader, writers []io.Writer, stats *Stats) error

func (*CoGroupPartitionedSorted) GetMemoryCostInMB

func (b *CoGroupPartitionedSorted) GetMemoryCostInMB(partitionSize int64) int64

func (*CoGroupPartitionedSorted) Name

func (b *CoGroupPartitionedSorted) Name() string

func (*CoGroupPartitionedSorted) SerializeToCommand

func (b *CoGroupPartitionedSorted) SerializeToCommand() *pb.Instruction

type CollectPartitions

type CollectPartitions struct {
}

func NewCollectPartitions

func NewCollectPartitions() *CollectPartitions

func (*CollectPartitions) Function

func (b *CollectPartitions) Function() func(readers []io.Reader, writers []io.Writer, stats *Stats) error

func (*CollectPartitions) GetMemoryCostInMB

func (b *CollectPartitions) GetMemoryCostInMB(partitionSize int64) int64

func (*CollectPartitions) Name

func (b *CollectPartitions) Name() string

func (*CollectPartitions) SerializeToCommand

func (b *CollectPartitions) SerializeToCommand() *pb.Instruction

type Instruction

type Instruction interface {
	Name() string
	Function() func(readers []io.Reader, writers []io.Writer, stats *Stats) error
	SerializeToCommand() *pb.Instruction
	GetMemoryCostInMB(partitionSize int64) int64
}

type JoinPartitionedSorted

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

func NewJoinPartitionedSorted

func NewJoinPartitionedSorted(isLeftOuterJoin bool, isRightOuterJoin bool, indexes []int) *JoinPartitionedSorted

func (*JoinPartitionedSorted) Function

func (b *JoinPartitionedSorted) Function() func(readers []io.Reader, writers []io.Writer, stats *Stats) error

func (*JoinPartitionedSorted) GetMemoryCostInMB

func (b *JoinPartitionedSorted) GetMemoryCostInMB(partitionSize int64) int64

func (*JoinPartitionedSorted) Name

func (b *JoinPartitionedSorted) Name() string

func (*JoinPartitionedSorted) SerializeToCommand

func (b *JoinPartitionedSorted) SerializeToCommand() *pb.Instruction

type LocalDistinct

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

func NewLocalDistinct

func NewLocalDistinct(orderBys []OrderBy) *LocalDistinct

func (*LocalDistinct) Function

func (b *LocalDistinct) Function() func(readers []io.Reader, writers []io.Writer, stats *Stats) error

func (*LocalDistinct) GetMemoryCostInMB

func (b *LocalDistinct) GetMemoryCostInMB(partitionSize int64) int64

func (*LocalDistinct) Name

func (b *LocalDistinct) Name() string

func (*LocalDistinct) SerializeToCommand

func (b *LocalDistinct) SerializeToCommand() *pb.Instruction

type LocalHashAndJoinWith

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

func NewLocalHashAndJoinWith

func NewLocalHashAndJoinWith(indexes []int) *LocalHashAndJoinWith

func (*LocalHashAndJoinWith) Function

func (b *LocalHashAndJoinWith) Function() func(readers []io.Reader, writers []io.Writer, stats *Stats) error

func (*LocalHashAndJoinWith) GetMemoryCostInMB

func (b *LocalHashAndJoinWith) GetMemoryCostInMB(partitionSize int64) int64

func (*LocalHashAndJoinWith) Name

func (b *LocalHashAndJoinWith) Name() string

func (*LocalHashAndJoinWith) SerializeToCommand

func (b *LocalHashAndJoinWith) SerializeToCommand() *pb.Instruction

type LocalSort

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

func NewLocalSort

func NewLocalSort(orderBys []OrderBy, memoryInMB int) *LocalSort

func (*LocalSort) Function

func (b *LocalSort) Function() func(readers []io.Reader, writers []io.Writer, stats *Stats) error

func (*LocalSort) GetMemoryCostInMB

func (b *LocalSort) GetMemoryCostInMB(partitionSize int64) int64

func (*LocalSort) Name

func (b *LocalSort) Name() string

func (*LocalSort) SerializeToCommand

func (b *LocalSort) SerializeToCommand() *pb.Instruction

type LocalTop

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

func NewLocalTop

func NewLocalTop(n int, orderBys []OrderBy) *LocalTop

func (*LocalTop) Function

func (b *LocalTop) Function() func(readers []io.Reader, writers []io.Writer, stats *Stats) error

func (*LocalTop) GetMemoryCostInMB

func (b *LocalTop) GetMemoryCostInMB(partitionSize int64) int64

func (*LocalTop) Name

func (b *LocalTop) Name() string

func (*LocalTop) SerializeToCommand

func (b *LocalTop) SerializeToCommand() *pb.Instruction

type MergeSortedTo

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

func NewMergeSortedTo

func NewMergeSortedTo(orderBys []OrderBy) *MergeSortedTo

func (*MergeSortedTo) Function

func (b *MergeSortedTo) Function() func(readers []io.Reader, writers []io.Writer, stats *Stats) error

func (*MergeSortedTo) GetMemoryCostInMB

func (b *MergeSortedTo) GetMemoryCostInMB(partitionSize int64) int64

func (*MergeSortedTo) Name

func (b *MergeSortedTo) Name() string

func (*MergeSortedTo) SerializeToCommand

func (b *MergeSortedTo) SerializeToCommand() *pb.Instruction

type MergeTo

type MergeTo struct{}

func NewMergeTo

func NewMergeTo() *MergeTo

func (*MergeTo) Function

func (b *MergeTo) Function() func(readers []io.Reader, writers []io.Writer, stats *Stats) error

func (*MergeTo) GetMemoryCostInMB

func (b *MergeTo) GetMemoryCostInMB(partitionSize int64) int64

func (*MergeTo) Name

func (b *MergeTo) Name() string

func (*MergeTo) SerializeToCommand

func (b *MergeTo) SerializeToCommand() *pb.Instruction

type Order

type Order int

type OrderBy

type OrderBy struct {
	Index int   // column index, starting from 1
	Order Order // Ascending or Descending
}

type PipeAsArgs

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

func NewPipeAsArgs

func NewPipeAsArgs(code string) *PipeAsArgs

func (*PipeAsArgs) Function

func (b *PipeAsArgs) Function() func(readers []io.Reader, writers []io.Writer, stats *Stats) error

func (*PipeAsArgs) GetMemoryCostInMB

func (b *PipeAsArgs) GetMemoryCostInMB(partitionSize int64) int64

func (*PipeAsArgs) Name

func (b *PipeAsArgs) Name() string

func (*PipeAsArgs) SerializeToCommand

func (b *PipeAsArgs) SerializeToCommand() *pb.Instruction

type RoundRobin

type RoundRobin struct {
}

func NewRoundRobin

func NewRoundRobin() *RoundRobin

func (*RoundRobin) Function

func (b *RoundRobin) Function() func(readers []io.Reader, writers []io.Writer, stats *Stats) error

func (*RoundRobin) GetMemoryCostInMB

func (b *RoundRobin) GetMemoryCostInMB(partitionSize int64) int64

func (*RoundRobin) Name

func (b *RoundRobin) Name() string

func (*RoundRobin) SerializeToCommand

func (b *RoundRobin) SerializeToCommand() *pb.Instruction

type ScatterPartitions

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

func NewScatterPartitions

func NewScatterPartitions(indexes []int) *ScatterPartitions

func (*ScatterPartitions) Function

func (b *ScatterPartitions) Function() func(readers []io.Reader, writers []io.Writer, stats *Stats) error

func (*ScatterPartitions) GetMemoryCostInMB

func (b *ScatterPartitions) GetMemoryCostInMB(partitionSize int64) int64

func (*ScatterPartitions) Name

func (b *ScatterPartitions) Name() string

func (*ScatterPartitions) SerializeToCommand

func (b *ScatterPartitions) SerializeToCommand() *pb.Instruction

type Stats

type Stats struct {
	Count int
}

Jump to

Keyboard shortcuts

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