???C#????MapReduce
???????????? ???????[ 2015/5/25 11:24:13 ] ???????????????
??????????
????С????????????????????????????????????????????????????MapReduce?????????????????á?
????var spit = hamlet.Split(new[] { " "?? Environment.NewLine }?? StringSplitOptions.RemoveEmptyEntries);
????var mp = new MicroMapReduce<string>(new Master<string>());
????var result1= mp.MapReduce(spit);
????С?????????????????????????????????? ????fork???????????????????????????????????????????
??????????
??????????????????????????????????????????????????????mapReduce????????? ???????????mod??consistent hashing??vitual Buckets??Range Partition?????? ????consistent hashing????н???(???c#??????Hash???)????Hadoop??Hdfs??mapreduce?????????????????洢????????????????????????????????洢???????????????????????????????????????С?????????boss??????ü?????????????????????
?????????
????public List<IEnumerable<T>> Partition(IEnumerable<T> list)
????{
????var temp =new List<IEnumerable<T>>();
????temp.Add(list);
????temp.Add(list);
????return temp;
????}
????Worker???
????С???????Master??worker????? master??????????????????????? ????worker????????????????????????master?????master?????д??????????????
public void WorkerNode(IEnumerable<T> list)
{
new Thread(() =>
{
var map = Map(list);
var reduce = Reduce(map);
master.Merge(reduce);
}).Start();
}
public class Master<T>
{
public Dictionary<T?? int> Result = new Dictionary<T?? int>();
public void Merge(Dictionary<T?? int> list)
{
foreach (var item in list)
{
lock (this)
{
if (Result.ContainsKey(item.Key))
Result[item.Key] += item.Value;
else
Result.Add(item.Key?? item.Value);
}
}
}
}
?????????????????
???????
????MapReduce???????????????????????????????????????????????????????????????????????????API??????HDFS??Hive????????????????????????????????????????????????????????????????????????????????к???????????????á??????????????????????????????????????????????hadoop????????????????????????????????????
???????????????????????漰???????????????????SPASVOС??(021-61079698-8054)?????????????????????????
??????
???????C#?е?StringC# Socket???????????????????C#?????????????????????????C#???????C#????????????Log4net??????δ????C#?????????????C#?????????????????C#???????????????C#????????????????C#7 ?е?Tuple??????C#??TypeScript - GeneratorC# ?????????細(xì)??????????C#?е???н???C#??MySQL?????????μ??Ч?????д??C#????C++??dll???C#??VS2010????е??????
???·???
??????????????????
2023/3/23 14:23:39???д?ò??????????
2023/3/22 16:17:39????????????????????Щ??
2022/6/14 16:14:27??????????????????????????
2021/10/18 15:37:44???????????????
2021/9/17 15:19:29???·???????·
2021/9/14 15:42:25?????????????
2021/5/28 17:25:47??????APP??????????
2021/5/8 17:01:11????????
?????????App Bug???????????????????????Jmeter?????????QC??????APP????????????????app?????е????????jenkins+testng+ant+webdriver??????????????JMeter????HTTP???????Selenium 2.0 WebDriver ??????