Exemplo n.º 1
0
func (self *DataServer) execMigration(command *proc.MasterCommand) {
	location := proc.ServerLocation(command.DstMachine)
	for _, blockStr := range command.Blocks {
		block := &proc.CatBlock{
			ID:        blockStr,
			Locations: []proc.ServerLocation{location},
		}
		go self.migrateBlock(block)
	}
}
Exemplo n.º 2
0
func Serve(index int) error {
	server := NewDataServer(proc.ServerLocation(index))
	return server.Serve()
}