/// <summary> /// Submits a job to the MapNoReduce system. /// /// This function will send the file size and /// number of splits to the master tracker. /// After that, the client will send it's URL /// so that he can wait for all the responses /// from the system before returning. /// </summary> /// <param name="filePath"></param> /// <param name="nSplits"></param> /// <param name="outputDir"></param> /// <param name="mapFunction"></param> /// <param name="entryURL"></param> public void Submit(string entryURL, string filePath, string outputDir, int nSplits, string mapFunction, string dllPath) { string serviceName = parseServiceName(entryURL); SetupWorkerChannel(entryURL, serviceName); this.service.OutputDir = outputDir; IList <String> file = parseFile(filePath); service.InputFile = file; int fileSize = file.Count; workerService.CalculateJobList(fileSize, nSplits); byte[] code = File.ReadAllBytes(dllPath); workerService.SubmitJob(clientURL, mapFunction, code); // ... }