Documentation ¶
Index ¶
- Constants
- func HashCode(value interface{}) int64
- func MaxInt64(a, b int64) int64
- func MinInt64(a, b int64) int64
- func ParseOptions()
- func Range(start, end int) []interface{}
- type AccumulateFunc
- type Accumulator
- type AccumulatorParam
- type AtomicInt
- type BufferEncoder
- type CombinerCreator
- type CombinerMerger
- type Context
- func (c *Context) Accumulator(initValue int) Accumulator
- func (c *Context) AccumulatorWithParam(initValue interface{}, param AccumulatorParam) Accumulator
- func (c *Context) Data(d []interface{}) RDD
- func (c *Context) Data_N(d []interface{}, numPartitions int) RDD
- func (c *Context) Stop()
- func (c *Context) String() string
- func (c *Context) TextFile(pathname string) RDD
- func (c *Context) Union(rdds []RDD) RDD
- type EncodeBox
- type FilterFunc
- type FlatMapperFunc
- type IndexedVector
- func (v IndexedVector) Copy() IndexedVector
- func (v IndexedVector) Cosine(o IndexedVector) float64
- func (v IndexedVector) Divide(d float64) IndexedVector
- func (v IndexedVector) Dot(o IndexedVector) float64
- func (v IndexedVector) EulaDistance(o IndexedVector) float64
- func (v IndexedVector) Keys() []interface{}
- func (v IndexedVector) Magnitude() float64
- func (v IndexedVector) Minus(o IndexedVector) IndexedVector
- func (v IndexedVector) Multiply(m float64) IndexedVector
- func (v IndexedVector) NormL2() float64
- func (v IndexedVector) Plus(o IndexedVector) IndexedVector
- func (v IndexedVector) RandomFeature(feature interface{})
- func (v IndexedVector) RandomLimitedFeature(feature interface{}, minValue, maxValue float64)
- func (v IndexedVector) RandomNormFeature(feature interface{}, dev, mean float64)
- func (v IndexedVector) String() string
- func (v IndexedVector) Sum() float64
- type KeyGroups
- type KeyLessFunc
- type KeyValue
- type LoopFunc
- type MapperFunc
- type ParkSorter
- type PartitionMapperFunc
- type Partitioner
- type RDD
- type ReducerFn
- type ReducerFunc
- type Scheduler
- type Split
- type ValueMerger
- type Vector
- func (v Vector) Cosine(o Vector) float64
- func (v Vector) Divide(d float64) Vector
- func (v Vector) Dot(o Vector) float64
- func (v Vector) EulaDistance(o Vector) float64
- func (v Vector) Magnitude() float64
- func (v Vector) Minus(o Vector) Vector
- func (v Vector) Multiply(m float64) Vector
- func (v Vector) NormL2() float64
- func (v Vector) Plus(o Vector) Vector
- func (v Vector) String() string
- func (v Vector) Sum() float64
- type Yielder
Constants ¶
View Source
const DEFAULT_FILE_SPLIT_SIZE = 64 * 1024 * 1024 // 64MB Split Size
////////////////////////////////////////////////////////////////////// TextFileRDD Impl //////////////////////////////////////////////////////////////////////
View Source
const ENCODE_BUFFER_SIZE = 10000
View Source
const SHUFFLE_MAGIC_ID = 9999
////////////////////////////////////////////////////////////////////// ShuffledRDD Impl //////////////////////////////////////////////////////////////////////
Variables ¶
This section is empty.
Functions ¶
func ParseOptions ¶
func ParseOptions()
Types ¶
type AccumulateFunc ¶
type AccumulateFunc func(x, y interface{}) interface{}
type Accumulator ¶
type Accumulator interface { Add(interface{}) Value() interface{} }
type AccumulatorParam ¶
type AccumulatorParam interface {
AddFunc() AccumulateFunc
}
var IntAccumulatorParam AccumulatorParam
var ListAccumulatorParam AccumulatorParam
type BufferEncoder ¶
type BufferEncoder struct {
// contains filtered or unexported fields
}
func NewBufferEncoder ¶
func NewBufferEncoder(size int) *BufferEncoder
type CombinerCreator ¶
type CombinerCreator func(interface{}) []interface{}
We need the []interface{} type for the gob to work
type CombinerMerger ¶
type CombinerMerger func([]interface{}, []interface{}) []interface{}
type Context ¶
type Context struct {
// contains filtered or unexported fields
}
func NewContext ¶
func (*Context) Accumulator ¶
func (c *Context) Accumulator(initValue int) Accumulator
func (*Context) AccumulatorWithParam ¶
func (c *Context) AccumulatorWithParam(initValue interface{}, param AccumulatorParam) Accumulator
type FilterFunc ¶
type FilterFunc func(interface{}) bool
type FlatMapperFunc ¶
type FlatMapperFunc func(interface{}) []interface{}
type IndexedVector ¶
type IndexedVector map[interface{}]float64
func (IndexedVector) Copy ¶
func (v IndexedVector) Copy() IndexedVector
func (IndexedVector) Cosine ¶
func (v IndexedVector) Cosine(o IndexedVector) float64
func (IndexedVector) Divide ¶
func (v IndexedVector) Divide(d float64) IndexedVector
func (IndexedVector) Dot ¶
func (v IndexedVector) Dot(o IndexedVector) float64
func (IndexedVector) EulaDistance ¶
func (v IndexedVector) EulaDistance(o IndexedVector) float64
func (IndexedVector) Keys ¶
func (v IndexedVector) Keys() []interface{}
func (IndexedVector) Magnitude ¶
func (v IndexedVector) Magnitude() float64
func (IndexedVector) Minus ¶
func (v IndexedVector) Minus(o IndexedVector) IndexedVector
func (IndexedVector) Multiply ¶
func (v IndexedVector) Multiply(m float64) IndexedVector
func (IndexedVector) NormL2 ¶
func (v IndexedVector) NormL2() float64
func (IndexedVector) Plus ¶
func (v IndexedVector) Plus(o IndexedVector) IndexedVector
func (IndexedVector) RandomFeature ¶
func (v IndexedVector) RandomFeature(feature interface{})
func (IndexedVector) RandomLimitedFeature ¶
func (v IndexedVector) RandomLimitedFeature(feature interface{}, minValue, maxValue float64)
func (IndexedVector) RandomNormFeature ¶
func (v IndexedVector) RandomNormFeature(feature interface{}, dev, mean float64)
func (IndexedVector) String ¶
func (v IndexedVector) String() string
func (IndexedVector) Sum ¶
func (v IndexedVector) Sum() float64
type KeyLessFunc ¶
type KeyLessFunc func(x, y interface{}) bool
type MapperFunc ¶
type MapperFunc func(interface{}) interface{}
type ParkSorter ¶
type ParkSorter struct {
// contains filtered or unexported fields
}
func NewParkSorter ¶
func NewParkSorter(values []interface{}, fn KeyLessFunc) *ParkSorter
func (*ParkSorter) Len ¶
func (s *ParkSorter) Len() int
func (*ParkSorter) Less ¶
func (s *ParkSorter) Less(i, j int) bool
func (*ParkSorter) Swap ¶
func (s *ParkSorter) Swap(i, j int)
type PartitionMapperFunc ¶
type Partitioner ¶
type Partitioner interface {
// contains filtered or unexported methods
}
type RDD ¶
type RDD interface { Map(f MapperFunc) RDD MapPartition(f PartitionMapperFunc) RDD FlatMap(f FlatMapperFunc) RDD Filter(f FilterFunc) RDD Sample(fraction float64, seed int64, withReplacement bool) RDD GroupByKey() RDD SortByKey(fn KeyLessFunc, reverse bool) RDD SortByValue(fn KeyLessFunc, reverse bool) RDD PartitionByKey() RDD ReduceByKey(fn ReducerFunc) RDD Distinct() RDD Union(other RDD) RDD Join(other RDD) RDD LeftOuterJoin(other RDD) RDD RightOuterJoin(other RDD) RDD GroupWith(other RDD) RDD Cartesian(other RDD) RDD GroupByKey_N(numPartitions int) RDD SortByKey_N(fn KeyLessFunc, reverse bool, numPartitions int) RDD SortByValue_N(fn KeyLessFunc, reverse bool, numPartitions int) RDD PartitionByKey_N(numPartitions int) RDD ReduceByKey_N(fn ReducerFunc, numPartitions int) RDD Distinct_N(numPartitions int) RDD Join_N(other RDD, numPartitions int) RDD LeftOuterJoin_N(other RDD, numPartitions int) RDD RightOuterJoin_N(other RDD, numPartitions int) RDD GroupWith_N(other RDD, numPartitions int) RDD Reduce(fn ReducerFunc) interface{} CountByKey() map[interface{}]int64 CountByValue() map[interface{}]int64 Take(n int64) []interface{} Collect() []interface{} CollectAsMap() map[interface{}]interface{} Count() int64 Foreach(fn LoopFunc) Foreach0(fn LoopFunc) SaveAsTextFile(pathname string) Cache() RDD Persist() RDD // contains filtered or unexported methods }
type ReducerFunc ¶
type ReducerFunc func(interface{}, interface{}) interface{}
type Scheduler ¶
type Scheduler interface {
// contains filtered or unexported methods
}
//////////////////////////////////////////////////// DAGScheduler base impl ////////////////////////////////////////////////////
type ValueMerger ¶
type ValueMerger func([]interface{}, interface{}) []interface{}
type Vector ¶
type Vector []float64
func NewRandomLimitedVector ¶
func NewRandomNormVector ¶
func NewRandomVector ¶
func NewSameValueVector ¶
func (Vector) EulaDistance ¶
Source Files ¶
Click to show internal directories.
Click to hide internal directories.