master

package
v0.0.0-...-d12220c Latest Latest
Warning

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

Go to latest
Published: Apr 29, 2022 License: MIT Imports: 15 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type MapTask

type MapTask struct {
	Cid     cid.Cid
	Retries int
}

type Master

type Master struct {
	Node               *core.IpfsNode
	RpcClient          *gorpc.Client
	MapFuncFilePath    string
	ReduceFuncFilePath string
	MapFuncFileCid     string
	ReduceFuncFileCid  string
	NoOfReducers       int
	MrOutputFile       string
	DataFileCid        string
	DataFileBlocks     []string

	MapStatus        Status
	BlockProviders   map[string][]string // datafileblock to peerid providers
	MapAllocation    map[string]string   // datafileblock to peerid allocated for map
	RMapAllocation   map[string]string   // reverse of map allocation
	MapOutput        map[string][]string // datafileblock to list of NoOfReducers cids for map output files
	ReduceStatus     Status
	ReduceOutput     map[int]string
	ReduceAllocation map[int]string   // number to peerid
	ReduceFileMap    map[int][]string // number to list of cids as per map output
	// contains filtered or unexported fields
}

func (*Master) GetMapStatus

func (master *Master) GetMapStatus() Status

func (*Master) GetReduceStatus

func (master *Master) GetReduceStatus() Status

func (*Master) MapHandler

func (master *Master) MapHandler(ctx context.Context, mapTask chan MapTask, wg *sync.WaitGroup)

func (*Master) ReduceHandler

func (master *Master) ReduceHandler(ctx context.Context, reduceTask chan ReduceTask, peerChan chan string, wg *sync.WaitGroup)

func (*Master) RunMapReduce

func (master *Master) RunMapReduce(ctx context.Context)

type ReduceTask

type ReduceTask struct {
	Index   int
	Retries int
}

type Status

type Status struct {
	Complete int
	Total    int
}

Jump to

Keyboard shortcuts

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