gio

package
v0.0.0-...-404dc1e Latest Latest
Warning

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

Go to latest
Published: Aug 10, 2017 License: Apache-2.0 Imports: 9 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 ProcessMapper

func ProcessMapper(f Mapper) (err error)

func ProcessReducer

func ProcessReducer(f Reducer, keyPositions []int) (err error)

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

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

Jump to

Keyboard shortcuts

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