initial commit ?

This commit is contained in:
vfs committed 2025-04-16 16:04:51 +02:00
1 parent fa6877b02d
commit 9d4d24dc3e
4 files changed
+299 -67

No files matched your search

+53 -5
View File
@@ -15,22 +15,70 @@ import "strconv"
//
type ExampleArgs struct {
X int
X int
}
type ExampleReply struct {
Y int
Y int
}
// Add your RPC definitions here.
type JobType uint8
const (
Map JobType = iota
Reduce
)
type MapJob struct {
//Index int
InputFile string
ReducerCount int
//IntermediateFiles []string
}
type ReduceJob struct {
ReducerNumber int
IntermediateFiles []string
}
type MapResult struct {
InputFile string
IntermediateFiles []string
WorkerId int
}
type RegisterArgs struct {
// empty
}
type RegisterReply struct {
WorkerId int
}
type GetJobArgs struct {
WorkerId int
}
type GetJobReply struct {
JobType JobType
MapJob MapJob
ReduceJob ReduceJob
Finished bool
}
type FinishReply struct {
}
// Cook up a unique-ish UNIX-domain socket name
// in /var/tmp, for the coordinator.
// Can't use the current directory since
// Athena AFS doesn't support UNIX-domain sockets.
func coordinatorSock() string {
s := "/var/tmp/5840-mr-"
s += strconv.Itoa(os.Getuid())
return s
s := "/var/tmp/5840-mr-"
s += strconv.Itoa(os.Getuid())
return s
}