??xml version="1.0" encoding="utf-8" standalone="yes"?>国产精品久久自在自线观看,欧美精品一区二区久久,午夜精品久久久久9999高清http://www.shnenglu.com/whspecial/category/19559.htmlzh-cnSun, 27 Oct 2013 15:52:56 GMTSun, 27 Oct 2013 15:52:56 GMT60跨机房的hadoop集群http://www.shnenglu.com/whspecial/archive/2013/10/27/203940.htmlwhspecialwhspecialSun, 27 Oct 2013 15:28:00 GMThttp://www.shnenglu.com/whspecial/archive/2013/10/27/203940.htmlhttp://www.shnenglu.com/whspecial/comments/203940.htmlhttp://www.shnenglu.com/whspecial/archive/2013/10/27/203940.html#Feedback0http://www.shnenglu.com/whspecial/comments/commentRss/203940.htmlhttp://www.shnenglu.com/whspecial/services/trackbacks/203940.html

q是来自于阿里技术嘉q华的一个分享,因ؓ(f)在百度也考虑q类似的事情Q所以听得比较有感?zhn)Q这里把相关内容整理一下?/span>

首先重版权Q还是把原链接和作者脓(chung)上:(x)

http://adc.alibabatech.org/carnival/history/schedule/2013/detail/main/286?video=0

来自于阿里吴威工E师的分?/span>

 

首先需要说明一点,跨机?/span>hadoop可能应用场景q不是很多,国内?/span>BATq种巨头也许需要,但是大部分的中小公司也许q不需要这个,也许q是个屠龙之技Q呵c(din)?/span>

把这个问题分三段来讲Q第一D|问题出现的背景,W二D|解决该问题的隄Q第三段是最l的解决Ҏ(gu)?/span>

Q一Q?nbsp;背景Q?/span>

先要看下Z么需要做一个跨机房的大集群Q?/span>

大集的优点在于数据理和授权容易(q个问题在一个多部门的大公司q是很重要的Q;跨部门的使用数据Ҏ(gu)Q无需重复拉取数据?/span>

在集达C定规模时Q单机房Q机房内的容量是有限的)(j)已经无法满集群的需求了(jin)Q要想一x逸的解决问题Q需要徏设一个跨机房?/span>hadoop集群?/span>

Q二Q技术挑战:(x)

2.1 NameNode的性能问题Q?/span>

         在管理一个巨大的hadoop集群Ӟ׃原始?/span>Namenode是单节点Q因此会(x)成ؓ(f)一个性能瓉Q遇到的性能问题主要包括两方面:(x)存储定w问题Q存储元数据Q和计算压力Q处?/span>rpchQ修改内存树(wi)时候需要全局锁)(j)问题?/span>

         其中存储定w问题可以依赖内存的垂直扩展来解决Q但是计压力却很难通过提升g来解冻I因ؓ(f)目前厂商的主要发展方向是多核Q而非提高主频Q?/span>

2.2机房之间的网l限Ӟ(x)

         机房之间的网l永q是个硬件条件的限制Q跨机房的网l传输带来了(jin)数据延时和带宽限Ӟ(x)

1Q?nbsp;延时一般是?/span>10ms之内Q?/span>hadoop上大部分q行的是ȝ作业Q基本可接受

2Q?nbsp;带宽限制的问题比较大Q因为单机房内的点对点带宽一般是?/span>1GbpsQ而机房之间的带宽在20Mbps左右Q非常有限?/span>

2.3资源l之间的理

         每个部门可以看做一个资源组Q它们可能会(x)互相使用Ҏ(gu)的数据,因此如何规划计算和存储的位置很重要Q否则会(x)在多个机房之间出现大量的数据拯?/span>

Q三Q解x案:(x)

先看下整个跨集群hadoop的架构图Q?/span>


 

重点介绍里面三点Q也是和上面三个问题相对应的:(x)

1Q?nbsp;可以看到q里d?jin)两?/span>NNQ?/span>namenodeQ,它们实际上还是属于一?/span>hadoop集群Q这是业界里的一个解x案:(x)HDFS FedarationQ它Z(jin)解决元数据节Ҏ(gu)能问题Q?/span>

2Q?nbsp;可以看到q里有一?/span>cross node节点Q它是用来在两个机房之间同步数据的,它的设计考虑C(jin)机房间的|络限制Q?/span>

3Q?nbsp;最后是groupA?/span>groupBQ这是ؓ(f)?jin)解x据出方和用方关系来用的?/span>

3.1 Federation

Federation相关资料见:(x)

http://hadoop.apache.org/docs/current/hadoop-project-dist/hadoop-hdfs/Federation.html#HDFS_Federation


Z(jin)水^扩展NamenodeQ?/span>federation使用?jin)多个互相独立?/span>namenode。它们之间互怸需要通信Q每?/span>datenode需要向全部namenode注册q发送信息?/span>

BlockPool是属于一?/span>namenode?/span>block集合Q每?/span>blockpool之间也是互相独立的?/span>

         ?/span>federation里,有一个需要关注的问题Q就是多?/span>namenode的地址如何对用戯行透明Q它采用的解x案是目录?wi)挂载的?gu)Q社区有?/span>viewFSQ应该就是ؓ(f)?jin)解册个问题?j)Q熟(zhn)?/span>linux或?/span>nfs的朋友应该都知道mountq个概念Q目录树(wi)挂蝲是q个意思?/span>

不过使用目录?wi)挂载也存在着一个问题,是各个子目录下的存储资源需要h为的介入理Q不能出C重的不均?/span>

3.2 crossNode

         机房间的|络限制要求不能出现大规模、长旉的数据拷贝,需要一个专门管理机戉K数据拯的进E,叫做crossNode。它是独立部|的一个节点,和元数据节点是分ȝ?/span>

         它能提供的功能概括来说主要包括以下三点:(x)

aQ?nbsp;Ҏ(gu)预置的跨机房文gQ进行数据拷?/span>

bQ?nbsp;处理实时的数据拷贝请?/span>

cQ?nbsp;q行跨机房的数据量控制

如何得知跨机房文件列表?

         ׃ȝd基本都是定时触发的,可以Ҏ(gu)对历史作业的分析来Ş成一个跨机房文g列表

3.3   资源l之间的理

各个资源l之间存在数据的依赖Q我们希望通过资源l管理,能实现大部分d在本机房内出数据,只有量跨机房出数据;大部分Q务读取本机房的数据副本,只有量跨机房读取数据?/span>

Z(jin)标识资源l之间的数据依赖性,定义一个资源组之间的距L念:(x)一个资源组讉K另一个资源组的数据量多Q则两者的距离近Q应该将距离接近的资源组攑֜同一个机房内?/span>

Z(jin)让计和产出可能地靠近Q用一?/span>MRProxyQ对于不同类型的d做不同处理:(x)

aQ?span style="font-size: 7pt; line-height: normal; font-family: 'Times New Roman';">            ȝ计算Q跨机房列表中的数据正在传输中(DC1->DC2Q,DC2上的 Job 被暂停调度,{待传输完毕

bQ?span style="font-size: 7pt; line-height: normal; font-family: 'Times New Roman';">            Ad-hoc查询Q?/span>DC2上的 Job 需要读DC1上的数据Q?/span>Job暂停调度Q通知 CrossNodeQ数据传输完毕后l箋调度

cQ?span style="font-size: 7pt; line-height: normal; font-family: 'Times New Roman';">             Ҏ(gu)情况Q跨机房数据 JoinQ?/span>DC1大表Q?/span>DC2表Q?/span>Job 调度?/span>DC1上,跨机房直接读?/span>DC2数据Q无需{待

 

׃是根据视频和ppt整理Qƈ没有代码或者文档,所以可能有些地方的理解有偏差,Ƣ迎来提意见~



whspecial 2013-10-27 23:28 发表评论
]]>
Dremel存储格式解析http://www.shnenglu.com/whspecial/archive/2013/08/14/202546.htmlwhspecialwhspecialWed, 14 Aug 2013 15:17:00 GMThttp://www.shnenglu.com/whspecial/archive/2013/08/14/202546.htmlhttp://www.shnenglu.com/whspecial/comments/202546.htmlhttp://www.shnenglu.com/whspecial/archive/2013/08/14/202546.html#Feedback1http://www.shnenglu.com/whspecial/comments/commentRss/202546.htmlhttp://www.shnenglu.com/whspecial/services/trackbacks/202546.html    Dremel是google推出的又一器Qpaper中宣U能够在3s内分?PB的数据,主要是面向交互式查询。这paper对嵌套类型的存储方式斚wQ思维实有些跌Q这文章主要讲讲这个,一斚w是方便后来者理解,另一斚w是让自己也整理下思\?br />

    首先Dremel使用的是列存模型Q对于基本类型列存较Ҏ(gu)做到Q但是对于嵌套类型,Dremel也能做到其拆解成基本类型ƈq行列存Q这是值得我们研究的?br />

    直观看下嵌套cd按行存储和拆解后按列存储的对比效果:(x)

    然后对于嵌套数据cdQDremel里面定义?jin)里面三U类型的字段

    1Q必d?ơ而且仅出?ơ的字段Qrequired

    2Q可能出?ơ或?ơ的字段Qoptional

    3Q可能出?ơ或者Nơ字D:(x)repeated

    下面以paper的例子来讲述吧:(x)

    其中DocId是required字段Q因此在r1,r2中必d?ơ;url字段是optional字段Q因此在r1的第三个Name里未出现Q在r1的前两个Name里出C(jin)1ơ;Backward字段是repeated字段Q因此在r1的Links里未出现Q在r2的Links里出C(jin)2ơ?br />

    理解?jin)上面这些,直接来看下Dremel是怎么来存它的吧:(x)

    上表中的每条记录都有两个属性,"r"代表repetition levelQ?d"代表definition levelQ定义如下:(x)

    repetition level:what repeated field in the field’s path the value has repeatedQ记录该字段是在哪个repeatedU别上重复的

    definition level:how many fields inpthat could be undefined (because they are optional or repeated) are actually presentQ记录该字段之上有多个optional或者repeated字段实际是有值的Q本来可以ؓ(f)null的)(j)

    看到q里Q各位可能已l在?j)里默念了(jin)?x)WTFQ别急,可以l合一个例子来看:(x)

先看repetition levelQ下面以r替代Q,以Name.Language.CodeZQ?/p>

    1)对第1个出现的|其r始终?Q因?en-us'的r?

    2)对于W?个?en'Q其上一个值是'en-us'Q它们是在LanguageU别发生的重复,Name.Language是两U的repeated字段Q因此r?

    3)对于W?个值nullQ是Z(jin)记录'en-gb'是出现在W三个Name而非W二个Name里,Ҏ(gu)占位用的。null的上一个值是'en'Q它们是在NameU别发生的重复,因此r?

    4)对于W?个?en-gb'Q其上一个值是nullQ它们也是在NameU别发生的重复,因此r?

    5)对于W?个值nullQ其上一个值是'en-gb'Q它们出现在两个不同Document里,因此r?

    ȝ下,看repetition level注意两点Q?,只比较该值和上一个|2,只需要看q两个值的重复位置上有几个repeated字段

再看definition levelQ下面以d替代Q,也以Name.Language.CodeZQ?/p>

    1)对于'en-us'Q其上的NameQLanguage都出C(jin)Q因此d?Q其实对于非null值的字段Q其上的optional或者repeated字段肯定是出C(jin)Q所以都是相同的Q只是null字段的d值有差别Q?br />

    2)对于'en'Q同理d也ؓ(f)2

    3)对于nullQ其上只出现?jin)NameQ没有出现LanguageQ因此d?

    4)对于'en-gb',d也ؓ(f)2

    5)对于最后一个nullQ其上也只出C(jin)NameQ没有出现LanguageQ因此d?


    以上只是讲了(jin)dremel怎么d嵌套cdQ至于这U存法是怎么惛_来的Q真非我辈能理解的了(jin)。。。更多内容,请参考原著paper?qing)网上解析?br />



whspecial 2013-08-14 23:17 发表评论
]]>
Orcfile文g格式解析Q?Q?/title><link>http://www.shnenglu.com/whspecial/archive/2013/08/14/202545.html</link><dc:creator>whspecial</dc:creator><author>whspecial</author><pubDate>Wed, 14 Aug 2013 15:13:00 GMT</pubDate><guid>http://www.shnenglu.com/whspecial/archive/2013/08/14/202545.html</guid><wfw:comment>http://www.shnenglu.com/whspecial/comments/202545.html</wfw:comment><comments>http://www.shnenglu.com/whspecial/archive/2013/08/14/202545.html#Feedback</comments><slash:comments>0</slash:comments><wfw:commentRss>http://www.shnenglu.com/whspecial/comments/commentRss/202545.html</wfw:commentRss><trackback:ping>http://www.shnenglu.com/whspecial/services/trackbacks/202545.html</trackback:ping><description><![CDATA[<p style="margin-right: 0px; margin-left: 0px; font-family: sans-serif; font-size: 16px; line-height: normal;">    上篇文章从整体介l了(jin)Orcfile的存储格式,接下来重点介l下Orc里用到的几种~码格式Q?/p><p style="margin-right: 0px; margin-left: 0px; font-family: sans-serif; font-size: 16px; line-height: normal;">    字典~码Q用于Stringcd的字D?br /></p><p style="margin-right: 0px; margin-left: 0px; font-family: sans-serif; font-size: 16px; line-height: normal;">    Run-Length~码Q用于intQlongQshort{类型的~码</p><p style="margin-right: 0px; margin-left: 0px; font-family: sans-serif; font-size: 16px; line-height: normal;">    Bit~码Q可以用于各U数据类?br /></p><p style="margin-right: 0px; margin-left: 0px; font-family: sans-serif; font-size: 16px; line-height: normal;"><strong>1Q字典编码:(x)</strong></p><p style="margin-right: 0px; margin-left: 0px; font-family: sans-serif; font-size: 16px; line-height: normal;">    对于Stringcd的每个字D分别保存一个字典,记录每个值在字典中的位置Q保存字典的数据l构采用一늺黑树(wi)。对于每个String字段Q最l会(x)有三个输出StreamQ分别是StringOuptut(记录字典中的?QLengthOutput(记录每个字典值的长度)QRowOutput(记录字段在字怸的位|??/p><p style="margin-right: 0px; margin-left: 0px; font-family: sans-serif; font-size: 16px; line-height: normal;">    思?Qؓ(f)什么要用红黑树(wi)Q?br /></p><p style="margin-right: 0px; margin-left: 0px; font-family: sans-serif; font-size: 16px; line-height: normal;">    因ؓ(f)U黑?wi)无论是插入Q删除,查找的性能都比较^均,都是O(logN)Q而且是^衡查找树(wi)Q最坏情况也不会(x)退化成O(N)<br /></p><p style="margin-right: 0px; margin-left: 0px; font-family: sans-serif; font-size: 16px; line-height: normal;">    思?Q其实一般存储时q会(x)使用LZO之类的压~,它们本n是一U字典压~,Z么Orc里面要自己做字典压羃Q?br /></p><p style="margin-right: 0px; margin-left: 0px; font-family: sans-serif; font-size: 16px; line-height: normal;">    因ؓ(f)LZO之类的压~窗口一般比较小QLZO默认?4KBQ,而Orc的字典压~是以整个字Dؓ(f)范围来压~的Q压~率?x)更好?br /></p><p style="margin-right: 0px; margin-left: 0px; font-family: sans-serif; font-size: 16px; line-height: normal;"><strong>2QRun-Length~码Q?/strong><br /></p><p style="margin-right: 0px; margin-left: 0px; font-family: sans-serif; font-size: 16px; line-height: normal;">    对于int,long,shortcd的字D,使用Run-Length~码。该Run-Length能够对等差数列(完全相等也属于等差数列)(j)q行压羃Q该{差数列需要满以下两个条Ӟ(x)</p><p style="margin-right: 0px; margin-left: 0px; font-family: sans-serif; font-size: 16px; line-height: normal;">    1Q至包?个元?/p><p style="margin-right: 0px; margin-left: 0px; font-family: sans-serif; font-size: 16px; line-height: normal;">    2Q差值在-128~127之间Q因为差值用1Byte来表C)(j)</p><p style="margin-right: 0px; margin-left: 0px; font-family: sans-serif; font-size: 16px; line-height: normal;">    对于不满等差数列的数字QRun-Length~码也能存储Q但是没有压~效果,Run-Length的具体存储如下:(x)</p><p style="margin-right: 0px; margin-left: 0px; font-family: sans-serif; font-size: 16px; line-height: normal;">    W一个Byte是Control ByteQ取值在-128~127之间Q其?1~-128代表后面存储着1~128个不满{差数列的数字,0~127代表后面存储着3~130个等差数列的数字Q?/p><p style="margin-right: 0px; margin-left: 0px; font-family: sans-serif; font-size: 16px; line-height: normal;">    如果Control Byte>=0Q则后面跟着一个Byte存储差|否则不存储该ByteQ?/p><p style="margin-right: 0px; margin-left: 0px; font-family: sans-serif; font-size: 16px; line-height: normal;">    如果Control Byte>=0Q则后面跟着{差数列的第一个数Q否则跟着-Control Byte个数字?/p><p style="margin-right: 0px; margin-left: 0px; font-family: sans-serif; font-size: 16px; line-height: normal;">    例子Q?/p><p style="margin-right: 0px; margin-left: 0px; font-family: sans-serif; font-size: 16px; line-height: normal;">    原始数字Q?2,12,12,12,12,10,7,13</p><p style="margin-right: 0px; margin-left: 0px; font-family: sans-serif; font-size: 16px; line-height: normal;">    l过Run-Length的数字:(x)<span style="color: #ff0000;">2</span>,<span style="color: #ffc000;">0</span>,12,<span style="color: #ff0000;">-3</span>,10,7,13</p><p style="margin-right: 0px; margin-left: 0px; font-family: sans-serif; font-size: 16px; line-height: normal;">    U色代表Control ByteQ黄色代表差|黑色代表具体的数字?br /></p><p style="margin-right: 0px; margin-left: 0px; font-family: sans-serif; font-size: 16px; line-height: normal;"><strong>3QBit~码Q?/strong></p><p style="margin-right: 0px; margin-left: 0px; font-family: sans-serif; font-size: 16px; line-height: normal;">Ҏ(gu)有类型的字段都可以采用Bit~码来表C值是否ؓ(f)null。在写Q何类型字D之前,先判断该字段值是够ؓ(f)nullQ如果ؓ(f)null则bit值存?Q否则存?Q对于ؓ(f)null的字D在实际~码时不需要存储了(jin)。经qBit~码之后Q可以对?个bitl成一个ByteQ再对其q行Run-Length~码?/p><p style="margin-right: 0px; margin-left: 0px; font-family: sans-serif; font-size: 16px; line-height: normal;">    其实除了(jin)q三U编码格式之外,Orc对于hive的复杂类型array,map,list{,其降维成基本类型来存储Q这个也是值得借鉴的,如果有空之后?x)进行分析?/p><img src ="http://www.shnenglu.com/whspecial/aggbug/202545.html" width = "1" height = "1" /><br><br><div align=right><a style="text-decoration:none;" href="http://www.shnenglu.com/whspecial/" target="_blank">whspecial</a> 2013-08-14 23:13 <a href="http://www.shnenglu.com/whspecial/archive/2013/08/14/202545.html#Feedback" target="_blank" style="text-decoration:none;">发表评论</a></div>]]></description></item><item><title>Orcfile文g格式解析Q?Q?/title><link>http://www.shnenglu.com/whspecial/archive/2013/08/14/202544.html</link><dc:creator>whspecial</dc:creator><author>whspecial</author><pubDate>Wed, 14 Aug 2013 15:12:00 GMT</pubDate><guid>http://www.shnenglu.com/whspecial/archive/2013/08/14/202544.html</guid><wfw:comment>http://www.shnenglu.com/whspecial/comments/202544.html</wfw:comment><comments>http://www.shnenglu.com/whspecial/archive/2013/08/14/202544.html#Feedback</comments><slash:comments>0</slash:comments><wfw:commentRss>http://www.shnenglu.com/whspecial/comments/commentRss/202544.html</wfw:commentRss><trackback:ping>http://www.shnenglu.com/whspecial/services/trackbacks/202544.html</trackback:ping><description><![CDATA[<p style="margin-right: 0px; margin-left: 0px; font-family: sans-serif; font-size: 16px; line-height: normal;">    Orcfile(<em>Optimized Row Columnar</em>)是hive 0.11版里引入的新的存储格式,是对之前的RCFile存储格式的优化。写q个的哥们来自于HortonWorksQ代码写的很不错Q比之前的rcfile强多?jin)(据说rcfile是个中科院的童鞋跑去facebook写的Q看来中国的计算机教育水q是有限啊。。。囧Q跑题了(jin)Q?/p><p style="margin-right: 0px; margin-left: 0px; font-family: sans-serif; font-size: 16px; line-height: normal;">    先介l下Orc的文件格式,截一张官方的图:(x)<br /></p><p style="margin-right: 0px; margin-left: 0px; font-family: sans-serif; font-size: 16px; line-height: normal;"><a target="_blank" data_ue_src="http://blog.51cto.com/attachment/201306/234709762.png"><img src="http://blog.51cto.com/attachment/201306/234709762.png" title="OrcFileLayout.png" data_ue_src="http://blog.51cto.com/attachment/201306/234709762.png" alt="" /></a></p><p style="margin-right: 0px; margin-left: 0px; font-family: sans-serif; font-size: 16px; line-height: normal;">    可以看到每个Orc文g?个或多个stripel成Q每个stripe250MB大小Q这个Stripe实际相当于之前的rcfile里的RowGroup概念Q不q大由4MB->250MBQ这样应该能提升序ȝ吞吐率。每个Stripe里有三部分组成,分别是Index Data,Row Data,Stripe FooterQ?/p><p style="margin-right: 0px; margin-left: 0px; font-family: sans-serif; font-size: 16px; line-height: normal;">    1QIndex DataQ一个轻量的indexQ默认是每隔1W行做一个烦(ch)引。这里做的烦(ch)引应该只是记录某行的各字D在Row Data中的offsetQ据说还包括每个Column的max和min|具体没细看代码?/p><p style="margin-right: 0px; margin-left: 0px; font-family: sans-serif; font-size: 16px; line-height: normal;">    2QRow DataQ存的是具体的数据,和RCfile一P先取部分行,然后对这些行按列q行存储。与RCfile不同的地方在于每个列q行?jin)编码,分成多个Stream来存储,具体如何~码在下一解析里?x)讲?/p><p style="margin-right: 0px; margin-left: 0px; font-family: sans-serif; font-size: 16px; line-height: normal;">    3QStripe FooterQ存的是各个Stream的类型,长度{信息?/p><p style="margin-right: 0px; margin-left: 0px; font-family: sans-serif; font-size: 16px; line-height: normal;">    每个文g有一个File FooterQ这里面存的是每个Stripe的行敎ͼ每个Column的数据类型信息等Q每个文件的N是一个PostScriptQ这里面记录?jin)整个文件的压羃cd以及(qing)FileFooter的长度信息等。在d文gӞ?x)seek到文件尾部读PostScriptQ从里面解析到File Footer长度Q再读FileFooterQ从里面解析到各个Stripe信息Q再d个StripeQ即从后往前读?/p><p style="margin-right: 0px; margin-left: 0px; font-family: sans-serif; font-size: 16px; line-height: normal;">    接下来看下ORcfile相对于RCfile做了(jin)哪些改进Q从Orc作者的ppt里截?jin)张图,分别解释下各行?x)<br /></p><p style="margin-right: 0px; margin-left: 0px; font-family: sans-serif; font-size: 16px; line-height: normal;"><a target="_blank" data_ue_src="http://blog.51cto.com/attachment/201306/003840639.png"><img src="http://blog.51cto.com/attachment/201306/003840639.png" title="囄1.png" width="500" height="345" border="0" hspace="0" vspace="0" data_ue_src="http://blog.51cto.com/attachment/201306/003840639.png" style="width: 500px; height: 345px;" alt="" /></a></p><p style="margin-right: 0px; margin-left: 0px; font-family: sans-serif; font-size: 16px; line-height: normal;">    Hive type model:RCfile在底层存储时不保存类型,都当做Byte来存储</p><p style="margin-right: 0px; margin-left: 0px; font-family: sans-serif; font-size: 16px; line-height: normal;">    Separtor complex columns:Orc复杂类型拆开存储</p><p style="margin-right: 0px; margin-left: 0px; font-family: sans-serif; font-size: 16px; line-height: normal;">    Splits Found QuicklyQ不很理?br /></p><p style="margin-right: 0px; margin-left: 0px; font-family: sans-serif; font-size: 16px; line-height: normal;">    Default Column group sizeQ不用解释了(jin)</p><p style="margin-right: 0px; margin-left: 0px; font-family: sans-serif; font-size: 16px; line-height: normal;">    Files per a bucketQ不很理?/p><p style="margin-right: 0px; margin-left: 0px; font-family: sans-serif; font-size: 16px; line-height: normal;">    Store minQmaxQcountQsumQ存?jin)这些便于快速地skip掉一个stripe</p><p style="margin-right: 0px; margin-left: 0px; font-family: sans-serif; font-size: 16px; line-height: normal;">    Versioned metadata:不很理解<br /></p><p style="margin-right: 0px; margin-left: 0px; font-family: sans-serif; font-size: 16px; line-height: normal;">    Run-Length Data-codingQ整数类型做Run-Length变长~码</p><p style="margin-right: 0px; margin-left: 0px; font-family: sans-serif; font-size: 16px; line-height: normal;">    Store Strings in dictionaryQStringcd做字典编?/p><p style="margin-right: 0px; margin-left: 0px; font-family: sans-serif; font-size: 16px; line-height: normal;">    Store Row CountQ每个Stripe?x)存储行?/p><p style="margin-right: 0px; margin-left: 0px; font-family: sans-serif; font-size: 16px; line-height: normal;">    Skip Compressed blocks:可以直接skip掉压~过的block</p><p style="margin-right: 0px; margin-left: 0px; font-family: sans-serif; font-size: 16px; line-height: normal;">    Store internal indexes:存储?jin)一个轻量的index</p><p style="margin-right: 0px; margin-left: 0px; font-family: sans-serif; font-size: 16px; line-height: normal;"><br /></p><p style="margin-right: 0px; margin-left: 0px; font-family: sans-serif; font-size: 16px; line-height: normal;">    整个Orc看下来,代码写的q是比较清晰明了(jin)的,而且我们也进行了(jin)试Q压~效果比RCfile提升?jin)不,有兴的朋友可以来看下,之后会(x)写W二解析,主要是讲Orc用到的几U编码格式?br /></p><div></div><img src ="http://www.shnenglu.com/whspecial/aggbug/202544.html" width = "1" height = "1" /><br><br><div align=right><a style="text-decoration:none;" href="http://www.shnenglu.com/whspecial/" target="_blank">whspecial</a> 2013-08-14 23:12 <a href="http://www.shnenglu.com/whspecial/archive/2013/08/14/202544.html#Feedback" target="_blank" style="text-decoration:none;">发表评论</a></div>]]></description></item><item><title>关于map/reduce的combinerq行时机的问?/title><link>http://www.shnenglu.com/whspecial/archive/2012/11/06/194819.html</link><dc:creator>whspecial</dc:creator><author>whspecial</author><pubDate>Tue, 06 Nov 2012 15:52:00 GMT</pubDate><guid>http://www.shnenglu.com/whspecial/archive/2012/11/06/194819.html</guid><wfw:comment>http://www.shnenglu.com/whspecial/comments/194819.html</wfw:comment><comments>http://www.shnenglu.com/whspecial/archive/2012/11/06/194819.html#Feedback</comments><slash:comments>0</slash:comments><wfw:commentRss>http://www.shnenglu.com/whspecial/comments/commentRss/194819.html</wfw:commentRss><trackback:ping>http://www.shnenglu.com/whspecial/services/trackbacks/194819.html</trackback:ping><description><![CDATA[<blockquote style="margin: 0 0 0 40px; border: none; padding: 0px;"></blockquote><span style="font-size: 12pt;">   </span><span style="font-size: 12pt; line-height: 150%; font-family: Arial, sans-serif;">map/reduce</span><span style="font-size: 12pt; line-height: 150%; font-family: 宋体;">?/span><span style="font-size: 12pt; line-height: 150%; font-family: Arial, sans-serif;">combiner</span><span style="font-size: 12pt; line-height: 150%; font-family: 宋体;">到底在什么时候运行?</span> <p align="left" style="text-indent: 21pt; line-height: 150%;"><span style="font-size: 12pt; line-height: 150%; font-family: 宋体;">在网上大多数资料中,都是?/span><span style="font-size: 12pt; line-height: 150%; font-family: Arial, sans-serif;">combiner</span><span style="font-size: 12pt; line-height: 150%; font-family: 宋体;">?/span><span style="font-size: 12pt; line-height: 150%; font-family: Arial, sans-serif;">map</span><span style="font-size: 12pt; line-height: 150%; font-family: 宋体;">端运行,发生?/span><span style="font-size: 12pt; line-height: 150%; font-family: Arial, sans-serif;">map</span><span style="font-size: 12pt; line-height: 150%; font-family: 宋体;">输出数据之后Q经q?/span><span style="font-size: 12pt; line-height: 150%; font-family: Arial, sans-serif;">combiner</span><span style="font-size: 12pt; line-height: 150%; font-family: 宋体;">再传递给</span><span style="font-size: 12pt; line-height: 150%; font-family: Arial, sans-serif;">reducer</span><span style="font-size: 12pt; line-height: 150%; font-family: 宋体;">。但是之前在工作中出现的一个问题导致我发现原来</span><span style="font-size: 12pt; line-height: 150%; font-family: Arial, sans-serif;">combiner</span><span style="font-size: 12pt; line-height: 150%; font-family: 宋体;">居然也会(x)?/span><span style="font-size: 12pt; line-height: 150%; font-family: Arial, sans-serif;">reducer</span><span style="font-size: 12pt; line-height: 150%; font-family: 宋体;">端运行,q且?x)多ơ运行?/span><span style="font-size: 12pt; line-height: 150%; font-family: Arial, sans-serif;"><br /> </span><span style="font-size: 8pt; line-height: 150%; font-family: Verdana, sans-serif;">   </span><span style="font-size: 12pt; line-height: 150%; font-family: 宋体;">在网上查?jin)之后发玎ͼq是</span><span style="font-size: 12pt; line-height: 150%; font-family: Arial, sans-serif;">hadoop-0.18</span><span style="font-size: 12pt; line-height: 150%; font-family: 宋体;">版本引入的新</span><span style="font-size: 12pt; line-height: 150%; font-family: Arial, sans-serif;">feature</span><span style="font-size: 12pt; line-height: 150%; font-family: 宋体;">Q?/span><span style="font-size: 12pt; line-height: 150%; font-family: Arial, sans-serif;"><br /> </span><span style="font-size: 8pt; line-height: 150%; font-family: Verdana, sans-serif;">   </span><span style="font-size:12.0pt;line-height:150%;font-family:"Arial","sans-serif";color:#333333;background:white;">Changed policy for running combiner. The combiner may be run multiple times as the map's output is sorted and merged. Additionally, it may be run on the reduce side as data is merged. The old semantics are available in Hadoop 0.18 if the user calls: job.setCombineOnlyOnce(true)</span><span style="font-size:12.0pt;line-height:150%;font-family:宋体;color:#333333; background:white;">?/span><span style="font-size: 12pt; line-height: 150%; font-family: Verdana, sans-serif;"><br /> </span><span style="font-size: 8pt; line-height: 150%; font-family: Verdana, sans-serif;">   </span><span style="font-size: 12pt; line-height: 150%; font-family: 宋体;">实际?/span><span style="font-size: 12pt; line-height: 150%; font-family: Arial, sans-serif;">combiner</span><span style="font-size: 12pt; line-height: 150%; font-family: 宋体;">?x)?/span><span style="font-size: 12pt; line-height: 150%; font-family: Arial, sans-serif;">mapper</span><span style="font-size: 12pt; line-height: 150%; font-family: 宋体;">端和</span><span style="font-size: 12pt; line-height: 150%; font-family: Arial, sans-serif;">reducer</span><span style="font-size: 12pt; line-height: 150%; font-family: 宋体;">端分别运q行Q看?jin)下代码Q发?/span><span style="font-size: 12pt; line-height: 150%; font-family: Arial, sans-serif;">combine</span><span style="font-size: 12pt; line-height: 150%; font-family: 宋体;">的时机在以下Q?/span><span style="font-size: 8pt; line-height: 150%; font-family: Verdana, sans-serif;"><br /> </span><span style="font-size: 12pt; line-height: 150%; font-family: Arial, sans-serif;">   1</span><span style="font-size: 12pt; line-height: 150%; font-family: 宋体;">Q?/span> <span style="font-size: 12pt; line-height: 150%; font-family: 宋体;">?/span><span style="font-size: 12pt; line-height: 150%; font-family: Arial, sans-serif;">mapper</span><span style="font-size: 12pt; line-height: 150%; font-family: 宋体;">端的</span><span style="font-size: 12pt; line-height: 150%; font-family: Arial, sans-serif;">spill</span><span style="font-size: 12pt; line-height: 150%; font-family: 宋体;">阶段Q在~存中的记录过阈值时?x)进?/span><span style="font-size: 12pt; line-height: 150%; font-family: Arial, sans-serif;">combine</span></p> <p align="left" style="margin: 2.9pt 0cm; line-height: 150%;"><span style="font-size: 12pt; line-height: 150%; font-family: Arial, sans-serif;">if (spstart != spindex) {</span></p> <p align="left" style="margin: 2.9pt 0cm; line-height: 150%;"><span style="font-size: 12pt; line-height: 150%; font-family: Arial, sans-serif;">         …</span></p> <p align="left" style="margin: 2.9pt 0cm; text-indent: 18pt; line-height: 150%;"><span style="font-size: 12pt; line-height: 150%; font-family: Arial, sans-serif;">combineAndSpill(kvIter, combineInputCounter);</span></p> <p align="left" style="margin: 2.9pt 0cm; line-height: 150%;"><span style="font-size: 12pt; line-height: 150%; font-family: Arial, sans-serif;">}</span></p> <p align="left" style="margin: 2.9pt 0cm 2.9pt 18pt; text-indent: -18pt; line-height: 150%;"><span style="font-size: 12pt; line-height: 150%; font-family: Arial, sans-serif;">2</span><span style="font-size: 12pt; line-height: 150%; font-family: 宋体;">Q?/span> <span style="font-size: 12pt; line-height: 150%; font-family: 宋体;">?/span><span style="font-size: 12pt; line-height: 150%; font-family: Arial, sans-serif;">mapper</span><span style="font-size: 12pt; line-height: 150%; font-family: 宋体;">端的</span><span style="font-size: 12pt; line-height: 150%; font-family: Arial, sans-serif;">merge</span><span style="font-size: 12pt; line-height: 150%; font-family: 宋体;">阶段Q进?/span><span style="font-size: 12pt; line-height: 150%; font-family: Arial, sans-serif;">merge</span><span style="font-size: 12pt; line-height: 150%; font-family: 宋体;">?/span><span style="font-size: 12pt; line-height: 150%; font-family: Arial, sans-serif;">spill</span><span style="font-size: 12pt; line-height: 150%; font-family: 宋体;">文g数目</span><span style="font-size: 12pt; line-height: 150%; font-family: Arial, sans-serif;">>=3</span><span style="font-size: 12pt; line-height: 150%; font-family: 宋体;">时会(x)q行</span><span style="font-size: 12pt; line-height: 150%; font-family: Arial, sans-serif;">combine</span></p> <p align="left" style="margin: 2.9pt 0cm; line-height: 150%;"><span style="font-size: 12pt; line-height: 150%; font-family: Arial, sans-serif;">if (null == combinerClass || numSpills < minSpillsForCombine) {</span></p> <p align="left" style="margin: 2.9pt 0cm; text-indent: 21pt; line-height: 150%;"><span style="font-size: 12pt; line-height: 150%; font-family: Arial, sans-serif;">Merger.writeFile(kvIter, writer, reporter);</span></p> <p align="left" style="margin: 2.9pt 0cm; line-height: 150%;"><span style="font-size: 12pt; line-height: 150%; font-family: Arial, sans-serif;">} else {</span></p> <p align="left" style="margin: 2.9pt 0cm; text-indent: 21pt; line-height: 150%;"><span style="font-size: 12pt; line-height: 150%; font-family: Arial, sans-serif;">combineCollector.setWriter(writer);</span></p> <p align="left" style="margin: 2.9pt 0cm; text-indent: 21pt; line-height: 150%;"><span style="font-size: 12pt; line-height: 150%; font-family: Arial, sans-serif;">combineAndSpill(kvIter, combineInputCounter);</span></p> <p align="left" style="margin: 2.9pt 0cm; line-height: 150%;"><span style="font-size: 12pt; line-height: 150%; font-family: Arial, sans-serif;">}</span></p> <p style="line-height:150%"><span style="font-size: 12pt; line-height: 150%; font-family: Arial, sans-serif;">3</span><span style="font-size: 12pt; line-height: 150%; font-family: 宋体;">Q?/span> <span style="font-size: 12pt; line-height: 150%; font-family: 宋体;">?/span><span style="font-size: 12pt; line-height: 150%; font-family: Arial, sans-serif;">reducer</span><span style="font-size: 12pt; line-height: 150%; font-family: 宋体;">端,一定会(x)q行</span><span style="font-size: 12pt; line-height: 150%; font-family: Arial, sans-serif;">combine</span></p><span style="font-size: 12pt; font-family: Arial; line-height: 17px; background-color: #ffffff; "><br /></span><blockquote style="margin: 0 0 0 40px; border: none; padding: 0px;"></blockquote><blockquote style="margin: 0 0 0 40px; border: none; padding: 0px;"></blockquote><div class="uea8a6c" id="isChromeWebToolbarDiv" style="display:none"></div> <div class="w0mw8ya" id="isChromeWebToolbarDiv" style="display:none"></div> <div class="0aikg0o" id="isChromeWebToolbarDiv" style="display:none"></div><img src ="http://www.shnenglu.com/whspecial/aggbug/194819.html" width = "1" height = "1" /><br><br><div align=right><a style="text-decoration:none;" href="http://www.shnenglu.com/whspecial/" target="_blank">whspecial</a> 2012-11-06 23:52 <a href="http://www.shnenglu.com/whspecial/archive/2012/11/06/194819.html#Feedback" target="_blank" style="text-decoration:none;">发表评论</a></div>]]></description></item></channel></rss> <footer> <div class="friendship-link"> <p>лǵվܻԴȤ</p> <a href="http://www.shnenglu.com/" title="精品视频久久久久">精品视频久久久久</a> <div class="friend-links"> </div> </div> </footer> <a href="http://www.abcdds.cn" target="_blank">þüۺɫۺϰҲȥ</a>| <a href="http://www.gg4493.cn" target="_blank">Ʒþþþþ99</a>| <a href="http://www.mmmj.net.cn" target="_blank">þþۺ</a>| <a href="http://www.r3665.cn" target="_blank">AVվþþƷ</a>| <a href="http://www.zhidaow.com.cn" target="_blank">þþþAVվ</a>| <a href="http://www.jobkey.com.cn" target="_blank">þþ91Ʒһ</a>| <a href="http://www.adddi.cn" target="_blank">պ޹ۺϾþþ</a>| <a href="http://www.shamba.com.cn" target="_blank">vaþþþ</a>| <a href="http://www.ozxt.cn" target="_blank">ŷ㽶þۺվ</a>| <a href="http://www.thegraces.com.cn" target="_blank">þ㽶һëƬ</a>| <a href="http://www.zjhgkjjt.com.cn" target="_blank">ӰɫۺϾþ</a>| <a href="http://www.yczu.cn" target="_blank">97þþƷƷ</a>| <a href="http://www.cnyaxin.cn" target="_blank">޹һ˾þþƷ</a>| <a href="http://www.yes365cc.cn" target="_blank">ƷۺϾþþþþ97</a>| <a href="http://www.b24193.cn" target="_blank">AVպƷþþþþþ</a>| <a href="http://www.andz77.cn" target="_blank">þèDձɫۺϾþ</a>| <a href="http://www.52shadu.cn" target="_blank">þþþþþþþþ</a>| <a href="http://www.ksjhyt.cn" target="_blank">þӰӹ</a>| <a href="http://www.dyfls.cn" target="_blank">þ޹Ʒ123</a>| <a href="http://www.kaczw3.cn" target="_blank">þþƷһԡ</a>| <a href="http://www.pynov.cn" target="_blank">ƷþþĻһ</a>| <a href="http://www.cnmango.cn" target="_blank">Ʒþþþþþþ</a>| <a href="http://www.ptrjmfv.cn" target="_blank">aþ</a>| <a href="http://www.ogpx95.cn" target="_blank">2020þþƷۺһ</a>| <a href="http://www.s9459.cn" target="_blank">޾ƷNVþþþþþþþ</a>| <a href="http://www.xyjsj88.com.cn" target="_blank">ݾƷŮ˾þþþþ</a>| <a href="http://www.84448.com.cn" target="_blank">þùۺϾƷ</a>| <a href="http://www.okfupo.cn" target="_blank">츾þþ</a>| <a href="http://www.nancanxie.cn" target="_blank">޹պŷۺϾþ</a>| <a href="http://www.csffh.cn" target="_blank">ھƷþþþþĻ</a>| <a href="http://www.xzxms.cn" target="_blank">ѹۿþþƵ</a>| <a href="http://www.qzlhscqt.cn" target="_blank">TOKYOۺϾþþƷ</a>| <a href="http://www.aygdxx.cn" target="_blank">ɫۺϾþɫ</a>| <a href="http://www.yangrendong.com.cn" target="_blank">þþƷĻ </a>| <a href="http://www.mobilepop.cn" target="_blank">777þµַ</a>| <a href="http://www.unicity642.com.cn" target="_blank">þˬƬţţ</a>| <a href="http://www.ppynw.cn" target="_blank">þ㽶߿ۿè?v</a>| <a href="http://www.lrv9.cn" target="_blank">þwww˳ɿƬ</a>| <a href="http://www.qunfazongzhan.cn" target="_blank">þþþþþþþ</a>| <a href="http://www.pygsbdg.cn" target="_blank">þù</a>| <a href="http://www.deshizhai.cn" target="_blank">ij뾫Ʒþþò </a>| <script> (function(){ var bp = document.createElement('script'); var curProtocol = window.location.protocol.split(':')[0]; if (curProtocol === 'https') { bp.src = 'https://zz.bdstatic.com/linksubmit/push.js'; } else { bp.src = 'http://push.zhanzhang.baidu.com/push.js'; } var s = document.getElementsByTagName("script")[0]; s.parentNode.insertBefore(bp, s); })(); </script> </body>