wordcount

package
v0.0.0-...-6968735 Latest Latest
Warning

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

Go to latest
Published: Oct 2, 2019 License: MIT Imports: 15 Imported by: 0

Documentation

Index

Constants

View Source
const (
	AcceptanceJobRequestType        = uint8(0)
	UploadPreSignedURLRequestType   = uint8(1)
	DownloadPreSignedURLRequestType = uint8(2)
)
View Source
const (
	ReduceTaskName   = "REDUCE"
	MapTaskName      = "MAP"
	ReceiveTaskName  = "RECEIVE"
	SendTaskName     = "SEND"
	RetrieveTaskName = "RETRIEVE"
)

Variables

This section is empty.

Functions

func Execute

func Execute(task AFTTask) interface{}

func GetDigestAssociationArray

func GetDigestAssociationArray(localDigest string, reduceIndex int) ([]string, error)

func JobStart

func JobStart(guid string)

func SaveDigestAssociation

func SaveDigestAssociation(digest string, localDigest string) error

Types

type AFTMapTask

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

func NewAFTMapTask

func NewAFTMapTask(split string, workerGroupId int, firstReplyPredictedAsCorrectChannel chan interface{}) *AFTMapTask

func (*AFTMapTask) DoWeHaveEnoughMatchingReplyAfter

func (obj *AFTMapTask) DoWeHaveEnoughMatchingReplyAfter(lastReply interface{}) bool

func (*AFTMapTask) ExecuteRPCCallTo

func (obj *AFTMapTask) ExecuteRPCCallTo(fullRPCInternetAddress string)

func (*AFTMapTask) GetAvailableWorkerProcessesRPCInternetAddresses

func (obj *AFTMapTask) GetAvailableWorkerProcessesRPCInternetAddresses() []string

func (*AFTMapTask) GetChannelToSendFirstReply

func (obj *AFTMapTask) GetChannelToSendFirstReply() (bool, chan interface{})

func (*AFTMapTask) GetFaultToleranceLevel

func (obj *AFTMapTask) GetFaultToleranceLevel() int

func (*AFTMapTask) GetOutput

func (obj *AFTMapTask) GetOutput() interface{}

func (*AFTMapTask) GetReplyChannel

func (obj *AFTMapTask) GetReplyChannel() chan interface{}

type AFTMapTaskOutput

type AFTMapTaskOutput struct {
	IdGroup                  int
	ReplayDigest             string
	NodeIdsWithCorrectResult []int
	MappedDataSizes          map[int]int
}

type AFTReduceTask

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

func NewAFTReduceTask

func NewAFTReduceTask(targetNodeGroupId int, reduceTaskIdentifierDigest string, reduceTaskIndex int) *AFTReduceTask

func (*AFTReduceTask) DoWeHaveEnoughMatchingReplyAfter

func (obj *AFTReduceTask) DoWeHaveEnoughMatchingReplyAfter(lastReply interface{}) bool

func (*AFTReduceTask) ExecuteRPCCallTo

func (obj *AFTReduceTask) ExecuteRPCCallTo(fullRPCInternetAddress string)

func (*AFTReduceTask) GetAvailableWorkerProcessesRPCInternetAddresses

func (obj *AFTReduceTask) GetAvailableWorkerProcessesRPCInternetAddresses() []string

func (*AFTReduceTask) GetChannelToSendFirstReply

func (obj *AFTReduceTask) GetChannelToSendFirstReply() (bool, chan interface{})

func (*AFTReduceTask) GetFaultToleranceLevel

func (obj *AFTReduceTask) GetFaultToleranceLevel() int

func (*AFTReduceTask) GetOutput

func (obj *AFTReduceTask) GetOutput() interface{}

func (*AFTReduceTask) GetReplyChannel

func (obj *AFTReduceTask) GetReplyChannel() chan interface{}

type AFTReduceTaskOutput

type AFTReduceTaskOutput struct {
	IdGroup                  int
	ReplayDigest             string
	NodeIdsWithCorrectResult []int
}

type AFTTask

type AFTTask interface {
	GetReplyChannel() chan interface{}
	GetFaultToleranceLevel() int
	GetAvailableWorkerProcessesRPCInternetAddresses() []string
	DoWeHaveEnoughMatchingReplyAfter(lastReply interface{}) bool
	ExecuteRPCCallTo(fullRPCInternetAddress string)
	GetOutput() interface{}
	GetChannelToSendFirstReply() (bool, chan interface{})
}

type Map

type Map struct {
}

func (*Map) Execute

func (x *Map) Execute(input MapInput, output *MapOutput) error

type MapInput

type MapInput struct {
	Text               string
	MappingCardinality int
}

type MapOutput

type MapOutput struct {
	IdNode          int
	IdGroup         int
	ReplayDigest    string
	MappedDataSizes map[int]int

	MyInternetAddress string
	CPUUtilization    int
}

type Receive

type Receive struct {
}

func (*Receive) Execute

func (x *Receive) Execute(input ReceiveInput, output *ReceiveOutput) error

type ReceiveInput

type ReceiveInput struct {
	Data                 []byte
	ReceivedDataDigest   string
	AssociatedDataDigest string
}

type ReceiveOutput

type ReceiveOutput struct {
}

type Reduce

type Reduce struct {
}

func (*Reduce) Execute

func (x *Reduce) Execute(input ReduceInput, output *ReduceOutput) error

type ReduceInput

type ReduceInput struct {
	LocalDataDigest string
	ReduceWorkIndex int
}

type ReduceOutput

type ReduceOutput struct {
	Digest string
	NodeId int
}

type Request

type Request struct {
}

func (*Request) Execute

func (x *Request) Execute(input RequestInput, output *RequestOutput) error

type RequestInput

type RequestInput struct {
	Type             uint8
	SourceFileDigest string
}

type RequestOutput

type RequestOutput struct {
	Url string
}

type Retrieve

type Retrieve struct {
}

func (*Retrieve) Execute

func (x *Retrieve) Execute(input RetrieveInput, output *RetrieveOutput) error

type RetrieveInput

type RetrieveInput struct {
	DataDigest string
}

type RetrieveOutput

type RetrieveOutput struct {
	RawData []byte
}

type Send

type Send struct {
}

func (*Send) Execute

func (x *Send) Execute(input SendInput, output *SendOutput) error

type SendInput

type SendInput struct {
	SourceDataDigest             string
	ReceiverAssociatedDataDigest string
	WordTokenListIndex           int
	ReceiversInternetAddresses   []string
}

type SendOutput

type SendOutput struct {
	SendDataDigest string
}

Directories

Path Synopsis
DataStructures

Jump to

Keyboard shortcuts

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