This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| public class MedianStdDevCombiner | |
| : JsonOutReducerCombinerBase<MedianStdDevData> | |
| { | |
| public override void Reduce(string key, | |
| IEnumerable<string> values, | |
| JsonReducerCombinerContext<MedianStdDevData> context) | |
| { | |
| var query = values | |
| .Select(int.Parse) | |
| .GroupBy(v => v) |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| public class MedianStdDevMapper : MapperBase | |
| { | |
| public override void Map(string inputLine, MapperContext context) | |
| { | |
| var parsed = XmlUtils.ParseXml(inputLine); | |
| if (parsed == null | |
| || !parsed.ContainsKey("CreationDate") | |
| || !parsed.ContainsKey("Text")) | |
| { |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| public class AverageCombiner | |
| : JsonInOutReducerCombinerBase<CountAverageData, CountAverageData> | |
| { | |
| public override void Reduce(string key, | |
| IEnumerable<CountAverageData> values, | |
| JsonReducerCombinerContext<CountAverageData> context) | |
| { | |
| float sum = 0; | |
| float count = 0; |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| public class MinMaxCountCombiner : | |
| JsonInOutReducerCombinerBase<MinMaxCountData, MinMaxCountData> | |
| { | |
| public override void Reduce(string key, | |
| IEnumerable<MinMaxCountData> values, | |
| JsonReducerCombinerContext<MinMaxCountData> context) | |
| { | |
| var data = values.ToList(); | |
| context.EmitKeyValue(key, new MinMaxCountData |
NewerOlder