gio

package
v0.0.0-...-ce87e18 Latest Latest
Warning

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

Go to latest
Published: Apr 19, 2018 License: Apache-2.0 Imports: 16 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

View Source
var (
	HasInitalized bool
)

Functions

func Emit

func Emit(anyObject ...interface{}) error

Emit encode and write a row of data to os.Stdout

func Init

func Init()

Init determines whether the driver program will execute the mapper/reducer or not. If the command line invokes the mapper or reducer, execute it and exit. This function will invoke flag.Parse() first.

func ToBytes

func ToBytes(val interface{}) []byte

func ToFloat64

func ToFloat64(val interface{}) float64

func ToInt64

func ToInt64(val interface{}) int64

func ToString

func ToString(val interface{}) string

func TsEmit

func TsEmit(ts int64, anyObject ...interface{}) error

TsEmit encode and write a row of data to os.Stdout with ts in milliseconds epoch time

func TsEmitKV

func TsEmitKV(ts int64, keys, values []interface{}) error

Types

type Mapper

type Mapper func([]interface{}) error

type MapperId

type MapperId string

func RegisterMapper

func RegisterMapper(fn Mapper) MapperId

RegisterMapper register a mapper function to process a command

type Reducer

type Reducer func(x, y interface{}) (interface{}, error)

type ReducerId

type ReducerId string

func RegisterReducer

func RegisterReducer(fn Reducer) ReducerId

Directories

Path Synopsis

Jump to

Keyboard shortcuts

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