Пример #1
0
        public static void runReduce()
        {
            log.Info("Running reduce...");
            StatusConfigContainer.Status = StatusType.REDUCE;
            SaveQueue.saveToFile();
            Thread thread = new Thread(new ThreadStart(ReducerRunner.reduce));

            thread.Start();
        }
Пример #2
0
        public static void saveMapResult(SendMappedData request)
        {
            foreach (var keyValue in request.listOfMapperResults)
            {
                var path = Path.Combine(MapReduceUtils.GetWorkingDirectory(), getIdOfKey(keyValue.Key) + MAPER_RESULT_EXTENSION);
                SaveQueue.append(path, keyValue.Value);
            }
            //System.IO.File.AppendAllText (path, request.value + Environment.NewLine);

            //var path = Path.Combine (MapReduceUtils.GetWorkingDirectory (), getIdOfKey (request.key) + MAPER_RESULT_EXTENSION);
            //SaveQueue.append (path, request.value);
        }
Пример #3
0
 public static void clear()
 {
     keyList        = new Dictionary <string, int> ();
     recivedEndList = new Dictionary <int, int> ();
     SaveQueue.clear();
 }