hadoop-common-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From d...@apache.org
Subject svn commit: r669790 [3/3] - in /hadoop/core/trunk: docs/ src/docs/src/documentation/content/xdocs/
Date Fri, 20 Jun 2008 04:53:02 GMT
Modified: hadoop/core/trunk/docs/native_libraries.html
URL: http://svn.apache.org/viewvc/hadoop/core/trunk/docs/native_libraries.html?rev=669790&r1=669789&r2=669790&view=diff
==============================================================================
--- hadoop/core/trunk/docs/native_libraries.html (original)
+++ hadoop/core/trunk/docs/native_libraries.html Thu Jun 19 21:53:01 2008
@@ -207,6 +207,9 @@
 </li>
 </ul>
 </li>
+<li>
+<a href="#Loading+native+libraries+through+DistributedCache"> Loading native libraries
through DistributedCache </a>
+</li>
 </ul>
 </div>
   
@@ -400,6 +403,41 @@
         
 </ul>
 </div>
+    
+<a name="N1011E"></a><a name="Loading+native+libraries+through+DistributedCache"></a>
+<h2 class="h3"> Loading native libraries through DistributedCache </h2>
+<div class="section">
+<p>User can load native shared libraries through  
+      <a href="mapred_tutorial.html#DistributedCache">DistributedCache</a>
+      for <em>distributing</em> and <em>symlinking</em> the library
files</p>
+<p>Here is an example, describing how to distribute the library and
+      load it from map/reduce task. </p>
+<ol>
+      
+<li> First copy the library to the HDFS. <br>
+      
+<span class="codefrag">bin/hadoop fs -copyFromLocal mylib.so.1 /libraries/mylib.so.1</span>
+      
+</li>
+      
+<li> The job launching program should contain the following: <br>
+      
+<span class="codefrag"> DistributedCache.createSymlink(conf); </span> 
+<br>
+      
+<span class="codefrag"> DistributedCache.addCacheFile("hdfs://host:port/libraries/mylib.so.1#mylib.so",
conf);
+      </span>
+      
+</li>
+      
+<li> The map/reduce task can contain: <br>
+      
+<span class="codefrag"> System.loadLibrary("mylib.so"); </span>
+      
+</li>
+      
+</ol>
+</div>
   
 </div>
 <!--+

Modified: hadoop/core/trunk/docs/native_libraries.pdf
URL: http://svn.apache.org/viewvc/hadoop/core/trunk/docs/native_libraries.pdf?rev=669790&r1=669789&r2=669790&view=diff
==============================================================================
--- hadoop/core/trunk/docs/native_libraries.pdf (original)
+++ hadoop/core/trunk/docs/native_libraries.pdf Thu Jun 19 21:53:01 2008
@@ -5,10 +5,10 @@
 /Producer (FOP 0.20.5) >>
 endobj
 5 0 obj
-<< /Length 565 /Filter [ /ASCII85Decode /FlateDecode ]
+<< /Length 636 /Filter [ /ASCII85Decode /FlateDecode ]
  >>
 stream
-Gb!$D4`>s,&;GCXKu[`&lYg0IW^]ug7B&VO[K?ht+;%9V8_&;t@o2N&.-V;>Aq7e>*R>b=2i53%.0YAj"JX+-m:kZ*YkBb9qS44img4^k'`j-!i,(</Rs^ig_%#o:]f17r'.GGI5NbZSX$!N)hucAC3e7f\TAV+IpGp/kFA\fX=dYkph&=DZ?E[nmUh+&rEIcGV4H)fMOCQB0/fo2LabdKPh"@9-<$c=Nh^!m,?(.:)8D>H+L^[cl$:tapL9VcfHb$7hg"#ebjDD(,2TY59@a$"\)<`cZj8E0%l[R@FSic-sI24aL"Uo\i2TY9306U>A<Ked'\!e+QP=`0q6LTn9*4Y5e[oO9lPON!ua*Y,8M^0t-(>Hu5B3Y2sCe)2l<u.>Z?sNefpfgI(!Ze(/CZ]OM+;FAks-[[UbOQH_&Y;<R7,FgZ3+aFDj?m:h^M*k'KEIKkb^8k,m@YYYnfSb\T5eL=@4dn@i#pPI#Bd)]<PI<HFuI#INib_]nuWXDS=t+-`@KPHaK52pQ#gRfG@dM`-!<RtZ(eIWa^$uO>,Q,--IALe!$5[.TE~>
+Gb!$D9lHLd&;KZOMEO"UD"el.enLkYMP=(DV^;Xb4seG$AP(F%hdsXj3erfqMHkP5B,P=Rb\Q(g-GcT!$4)7i,Xm7'YC1pd).8!=#D77`'+@/V,*3e[ccoaqlf\0I>`pcrpGQC-9ZkZ"\+NLmWm:JLn-"nmVEkLWgu+tX%lqR-9N@9uf@ZgF]X<lUqn8>uc<K]$EIcGN4cIHaOCQAKW?1c>abt!4\=\16W)!&`^MO8&HPp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R
 26 0 R
 27 0 R
+28 0 R
 29 0 R
-30 0 R
+31 0 R
+32 0 R
 ]
 endobj
-23 0 obj
+25 0 obj
 << /Type /Annot
 /Subtype /Link
 /Rect [ 263.64 537.732 359.952 525.732 ]
@@ -128,7 +139,7 @@
 /H /I
 >>
 endobj
-24 0 obj
+26 0 obj
 << /Type /Annot
 /Subtype /Link
 /Rect [ 108.0 520.532 126.0 508.532 ]
@@ -139,7 +150,7 @@
 /H /I
 >>
 endobj
-25 0 obj
+27 0 obj
 << /Type /Annot
 /Subtype /Link
 /Rect [ 108.0 507.332 128.664 495.332 ]
@@ -150,7 +161,7 @@
 /H /I
 >>
 endobj
-26 0 obj
+28 0 obj
 << /Type /Annot
 /Subtype /Link
 /Rect [ 108.0 494.132 122.664 482.132 ]
@@ -161,17 +172,17 @@
 /H /I
 >>
 endobj
-27 0 obj
+29 0 obj
 << /Type /Annot
 /Subtype /Link
 /Rect [ 196.98 388.198 293.304 376.198 ]
 /C [ 0 0 0 ]
 /Border [ 0 0 0 ]
-/A 28 0 R
+/A 30 0 R
 /H /I
 >>
 endobj
-29 0 obj
+31 0 obj
 << /Type /Annot
 /Subtype /Link
 /Rect [ 140.328 374.998 187.656 362.998 ]
@@ -182,36 +193,34 @@
 /H /I
 >>
 endobj
-30 0 obj
+32 0 obj
 << /Type /Annot
 /Subtype /Link
 /Rect [ 368.316 361.798 392.988 349.798 ]
 /C [ 0 0 0 ]
 /Border [ 0 0 0 ]
-/A 31 0 R
+/A 33 0 R
 /H /I
 >>
 endobj
-32 0 obj
+34 0 obj
 << /Length 2386 /Filter [ /ASCII85Decode /FlateDecode ]
  >>
 stream
 Gau0E=``=U&:W67i'SRF:'?b'GbmuDP-fD\8WtuSB%j6]!(i9jRN`IfQBb5EHPa?!i#tbXFSnHl`9t*m4hcVW>u/a!4MtXH1p3/Ydo]<q_h:7t#Y\?AR8#6e26JmXT8sjM1T&Zal]86,m5@OWYu"(8,G$QPFH`75Ii6kQ9Ra^IHi[qZioQ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MD5Otk:PH&imb+[-&-4#i=(D#-pX<06N@_<XR\136W3CpCk.siElPMefF0(*eDtg6DqC(J$AMpBGV;A.bHKqW85LmqMB^PTn.TtmqSt_L.Uk!>36].OReX^LK;X2QS]?!Bd-PgAfq\OIPkpc~>
 endstream
 endobj
-33 0 obj
+35 0 obj
 << /Type /Page
 /Parent 1 0 R
 /MediaBox [ 0 0 612 792 ]
 /Resources 3 0 R
-/Contents 32 0 R
-/Annots 34 0 R
+/Contents 34 0 R
+/Annots 36 0 R
 >>
 endobj
-34 0 obj
+36 0 obj
 [
-35 0 R
-36 0 R
 37 0 R
 38 0 R
 39 0 R
@@ -222,9 +231,11 @@
 44 0 R
 45 0 R
 46 0 R
+47 0 R
+48 0 R
 ]
 endobj
-35 0 obj
+37 0 obj
 << /Type /Annot
 /Subtype /Link
 /Rect [ 163.332 616.466 201.336 604.466 ]
@@ -235,7 +246,7 @@
 /H /I
 >>
 endobj
-36 0 obj
+38 0 obj
 << /Type /Annot
 /Subtype /Link
 /Rect [ 224.664 616.466 275.988 604.466 ]
@@ -246,7 +257,7 @@
 /H /I
 >>
 endobj
-37 0 obj
+39 0 obj
 << /Type /Annot
 /Subtype /Link
 /Rect [ 108.0 564.866 145.332 552.866 ]
@@ -257,7 +268,7 @@
 /H /I
 >>
 endobj
-38 0 obj
+40 0 obj
 << /Type /Annot
 /Subtype /Link
 /Rect [ 148.668 564.866 181.992 552.866 ]
@@ -268,7 +279,7 @@
 /H /I
 >>
 endobj
-39 0 obj
+41 0 obj
 << /Type /Annot
 /Subtype /Link
 /Rect [ 108.0 551.666 144.0 539.666 ]
@@ -279,7 +290,7 @@
 /H /I
 >>
 endobj
-40 0 obj
+42 0 obj
 << /Type /Annot
 /Subtype /Link
 /Rect [ 108.0 538.466 143.328 526.466 ]
@@ -290,7 +301,7 @@
 /H /I
 >>
 endobj
-41 0 obj
+43 0 obj
 << /Type /Annot
 /Subtype /Link
 /Rect [ 258.648 449.732 297.648 437.732 ]
@@ -301,17 +312,17 @@
 /H /I
 >>
 endobj
-42 0 obj
+44 0 obj
 << /Type /Annot
 /Subtype /Link
 /Rect [ 190.32 410.132 286.644 398.132 ]
 /C [ 0 0 0 ]
 /Border [ 0 0 0 ]
-/A 28 0 R
+/A 30 0 R
 /H /I
 >>
 endobj
-43 0 obj
+45 0 obj
 << /Type /Annot
 /Subtype /Link
 /Rect [ 188.988 371.732 274.32 359.732 ]
@@ -322,7 +333,7 @@
 /H /I
 >>
 endobj
-44 0 obj
+46 0 obj
 << /Type /Annot
 /Subtype /Link
 /Rect [ 213.0 358.532 254.988 346.532 ]
@@ -333,7 +344,7 @@
 /H /I
 >>
 endobj
-45 0 obj
+47 0 obj
 << /Type /Annot
 /Subtype /Link
 /Rect [ 260.988 358.532 307.644 346.532 ]
@@ -344,7 +355,7 @@
 /H /I
 >>
 endobj
-46 0 obj
+48 0 obj
 << /Type /Annot
 /Subtype /Link
 /Rect [ 313.644 358.532 344.988 346.532 ]
@@ -355,111 +366,136 @@
 /H /I
 >>
 endobj
-47 0 obj
-<< /Length 798 /Filter [ /ASCII85Decode /FlateDecode ]
+49 0 obj
+<< /Length 1481 /Filter [ /ASCII85Decode /FlateDecode ]
  >>
 stream
-Gat%!9okbt&A@ZcI,$ld@iL@m4a!g&+0&ADQ<W*rPF09?_:4RJfO%u!5&@R!l7,Ee#8ob@Gr+LX/9mcjIf^&Pk5-;m&O[b%A+LYeDLI9PJV]%G$a9rO"nu0(=u1[ro.J2gFGWBIK0^RuKeUIKA4Q.fL-c;e_&^)QFRu.D;;Ztt+T$PG1o)gbfLX0oX2g%t-9\9Q7q.9Ah"1IeKFS-c216'e;)1O93^e@1m.k0T`Nki8,_]YDqp@o?mWbLKq_-ACSWbtSOrjC$=L:rM_4p)M]Qu3k`Zdcd61O;X\.`LPW9Pd'7p<m@^\PUerqJmH$TnmMHdN7RAskHXLSK[*i(^BHd7,&8-ooCY-d2Gi9?A.;$:"$N;O&IuDD]u4)s8=.aXGUGF?<>7WqAg(RC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Type /Annot
+/Subtype /Link
+/Rect [ 308.28 527.613 392.268 515.613 ]
+/C [ 0 0 0 ]
+/Border [ 0 0 0 ]
+/A << /URI (mapred_tutorial.html#DistributedCache)
+/S /URI >>
+/H /I
+>>
+endobj
+54 0 obj
 <<
  /Title (\376\377\0\61\0\40\0\120\0\165\0\162\0\160\0\157\0\163\0\145)
- /Parent 49 0 R
- /Next 51 0 R
+ /Parent 53 0 R
+ /Next 55 0 R
  /A 9 0 R
 >> endobj
-51 0 obj
+55 0 obj
 <<
  /Title (\376\377\0\62\0\40\0\103\0\157\0\155\0\160\0\157\0\156\0\145\0\156\0\164\0\163)
- /Parent 49 0 R
- /Prev 50 0 R
- /Next 52 0 R
+ /Parent 53 0 R
+ /Prev 54 0 R
+ /Next 56 0 R
  /A 11 0 R
 >> endobj
-52 0 obj
+56 0 obj
 <<
  /Title (\376\377\0\63\0\40\0\125\0\163\0\141\0\147\0\145)
- /Parent 49 0 R
- /Prev 51 0 R
- /Next 53 0 R
+ /Parent 53 0 R
+ /Prev 55 0 R
+ /Next 57 0 R
  /A 13 0 R
 >> endobj
-53 0 obj
+57 0 obj
 <<
  /Title (\376\377\0\64\0\40\0\123\0\165\0\160\0\160\0\157\0\162\0\164\0\145\0\144\0\40\0\120\0\154\0\141\0\164\0\146\0\157\0\162\0\155\0\163)
- /Parent 49 0 R
- /Prev 52 0 R
- /Next 54 0 R
+ /Parent 53 0 R
+ /Prev 56 0 R
+ /Next 58 0 R
  /A 15 0 R
 >> endobj
-54 0 obj
+58 0 obj
 <<
  /Title (\376\377\0\65\0\40\0\102\0\165\0\151\0\154\0\144\0\151\0\156\0\147\0\40\0\116\0\141\0\164\0\151\0\166\0\145\0\40\0\110\0\141\0\144\0\157\0\157\0\160\0\40\0\114\0\151\0\142\0\162\0\141\0\162\0\151\0\145\0\163)
- /Parent 49 0 R
- /First 55 0 R
- /Last 55 0 R
- /Prev 53 0 R
+ /Parent 53 0 R
+ /First 59 0 R
+ /Last 59 0 R
+ /Prev 57 0 R
+ /Next 60 0 R
  /Count -1
  /A 17 0 R
 >> endobj
-55 0 obj
+59 0 obj
 <<
  /Title (\376\377\0\65\0\56\0\61\0\40\0\116\0\157\0\164\0\145\0\163)
- /Parent 54 0 R
+ /Parent 58 0 R
  /A 19 0 R
 >> endobj
-56 0 obj
+60 0 obj
+<<
+ /Title (\376\377\0\66\0\40\0\114\0\157\0\141\0\144\0\151\0\156\0\147\0\40\0\156\0\141\0\164\0\151\0\166\0\145\0\40\0\154\0\151\0\142\0\162\0\141\0\162\0\151\0\145\0\163\0\40\0\164\0\150\0\162\0\157\0\165\0\147\0\150\0\40\0\104\0\151\0\163\0\164\0\162\0\151\0\142\0\165\0\164\0\145\0\144\0\103\0\141\0\143\0\150\0\145)
+ /Parent 53 0 R
+ /Prev 58 0 R
+ /A 21 0 R
+>> endobj
+61 0 obj
 << /Type /Font
 /Subtype /Type1
 /Name /F3
 /BaseFont /Helvetica-Bold
 /Encoding /WinAnsiEncoding >>
 endobj
-57 0 obj
+62 0 obj
 << /Type /Font
 /Subtype /Type1
 /Name /F5
 /BaseFont /Times-Roman
 /Encoding /WinAnsiEncoding >>
 endobj
-58 0 obj
+63 0 obj
 << /Type /Font
 /Subtype /Type1
 /Name /F6
 /BaseFont /Times-Italic
 /Encoding /WinAnsiEncoding >>
 endobj
-59 0 obj
+64 0 obj
 << /Type /Font
 /Subtype /Type1
 /Name /F1
 /BaseFont /Helvetica
 /Encoding /WinAnsiEncoding >>
 endobj
-60 0 obj
+65 0 obj
 << /Type /Font
 /Subtype /Type1
 /Name /F9
 /BaseFont /Courier
 /Encoding /WinAnsiEncoding >>
 endobj
-61 0 obj
+66 0 obj
 << /Type /Font
 /Subtype /Type1
 /Name /F2
 /BaseFont /Helvetica-Oblique
 /Encoding /WinAnsiEncoding >>
 endobj
-62 0 obj
+67 0 obj
 << /Type /Font
 /Subtype /Type1
 /Name /F7
@@ -469,144 +505,155 @@
 1 0 obj
 << /Type /Pages
 /Count 4
-/Kids [6 0 R 21 0 R 33 0 R 48 0 R ] >>
+/Kids [6 0 R 23 0 R 35 0 R 50 0 R ] >>
 endobj
 2 0 obj
 << /Type /Catalog
 /Pages 1 0 R
- /Outlines 49 0 R
+ /Outlines 53 0 R
  /PageMode /UseOutlines
  >>
 endobj
 3 0 obj
 << 
-/Font << /F3 56 0 R /F5 57 0 R /F1 59 0 R /F6 58 0 R /F9 60 0 R /F2 61 0 R /F7 62 0
R >> 
+/Font << /F3 61 0 R /F5 62 0 R /F1 64 0 R /F6 63 0 R /F9 65 0 R /F2 66 0 R /F7 67 0
R >> 
 /ProcSet [ /PDF /ImageC /Text ] >> 
 endobj
 9 0 obj
 <<
 /S /GoTo
-/D [21 0 R /XYZ 85.0 659.0 null]
+/D [23 0 R /XYZ 85.0 659.0 null]
 >>
 endobj
 11 0 obj
 <<
 /S /GoTo
-/D [21 0 R /XYZ 85.0 567.066 null]
+/D [23 0 R /XYZ 85.0 567.066 null]
 >>
 endobj
 13 0 obj
 <<
 /S /GoTo
-/D [21 0 R /XYZ 85.0 434.732 null]
+/D [23 0 R /XYZ 85.0 434.732 null]
 >>
 endobj
 15 0 obj
 <<
 /S /GoTo
-/D [33 0 R /XYZ 85.0 659.0 null]
+/D [35 0 R /XYZ 85.0 659.0 null]
 >>
 endobj
 17 0 obj
 <<
 /S /GoTo
-/D [33 0 R /XYZ 85.0 479.066 null]
+/D [35 0 R /XYZ 85.0 479.066 null]
 >>
 endobj
 19 0 obj
 <<
 /S /GoTo
-/D [48 0 R /XYZ 85.0 659.0 null]
+/D [50 0 R /XYZ 85.0 659.0 null]
 >>
 endobj
-28 0 obj
+21 0 obj
+<<
+/S /GoTo
+/D [50 0 R /XYZ 85.0 556.947 null]
+>>
+endobj
+30 0 obj
 <<
 /S /GoTo
 /D [null /XYZ 0.0 0.0 null]
 >>
 endobj
-31 0 obj
+33 0 obj
 <<
 /S /GoTo
 /D [null /XYZ 0.0 0.0 null]
 >>
 endobj
-49 0 obj
+53 0 obj
 <<
- /First 50 0 R
- /Last 54 0 R
+ /First 54 0 R
+ /Last 60 0 R
 >> endobj
 xref
-0 63
+0 68
 0000000000 65535 f 
-0000013162 00000 n 
-0000013241 00000 n 
-0000013333 00000 n 
+0000014689 00000 n 
+0000014768 00000 n 
+0000014860 00000 n 
 0000000015 00000 n 
 0000000071 00000 n 
-0000000727 00000 n 
-0000000847 00000 n 
-0000000907 00000 n 
-0000013478 00000 n 
-0000001042 00000 n 
-0000013541 00000 n 
-0000001179 00000 n 
-0000013607 00000 n 
-0000001316 00000 n 
-0000013673 00000 n 
-0000001451 00000 n 
-0000013737 00000 n 
-0000001588 00000 n 
-0000013803 00000 n 
-0000001725 00000 n 
-0000004045 00000 n 
-0000004168 00000 n 
-0000004237 00000 n 
-0000004445 00000 n 
-0000004615 00000 n 
-0000004787 00000 n 
-0000004979 00000 n 
-0000013867 00000 n 
-0000005117 00000 n 
-0000005323 00000 n 
-0000013926 00000 n 
-0000005462 00000 n 
-0000007941 00000 n 
-0000008064 00000 n 
-0000008168 00000 n 
-0000008344 00000 n 
-0000008525 00000 n 
-0000008704 00000 n 
-0000008883 00000 n 
-0000009055 00000 n 
-0000009229 00000 n 
-0000009418 00000 n 
-0000009556 00000 n 
-0000009728 00000 n 
-0000009917 00000 n 
-0000010108 00000 n 
-0000010298 00000 n 
-0000011188 00000 n 
-0000013985 00000 n 
-0000011296 00000 n 
-0000011429 00000 n 
-0000011595 00000 n 
-0000011731 00000 n 
-0000011950 00000 n 
-0000012271 00000 n 
-0000012389 00000 n 
-0000012502 00000 n 
-0000012612 00000 n 
-0000012723 00000 n 
-0000012831 00000 n 
-0000012937 00000 n 
-0000013053 00000 n 
+0000000798 00000 n 
+0000000918 00000 n 
+0000000985 00000 n 
+0000015005 00000 n 
+0000001120 00000 n 
+0000015068 00000 n 
+0000001257 00000 n 
+0000015134 00000 n 
+0000001394 00000 n 
+0000015200 00000 n 
+0000001529 00000 n 
+0000015264 00000 n 
+0000001666 00000 n 
+0000015330 00000 n 
+0000001803 00000 n 
+0000015394 00000 n 
+0000001940 00000 n 
+0000004260 00000 n 
+0000004383 00000 n 
+0000004452 00000 n 
+0000004660 00000 n 
+0000004830 00000 n 
+0000005002 00000 n 
+0000005194 00000 n 
+0000015460 00000 n 
+0000005332 00000 n 
+0000005538 00000 n 
+0000015519 00000 n 
+0000005677 00000 n 
+0000008156 00000 n 
+0000008279 00000 n 
+0000008383 00000 n 
+0000008559 00000 n 
+0000008740 00000 n 
+0000008919 00000 n 
+0000009098 00000 n 
+0000009270 00000 n 
+0000009444 00000 n 
+0000009633 00000 n 
+0000009771 00000 n 
+0000009943 00000 n 
+0000010132 00000 n 
+0000010323 00000 n 
+0000010513 00000 n 
+0000012087 00000 n 
+0000012210 00000 n 
+0000012237 00000 n 
+0000015578 00000 n 
+0000012427 00000 n 
+0000012560 00000 n 
+0000012726 00000 n 
+0000012862 00000 n 
+0000013081 00000 n 
+0000013416 00000 n 
+0000013534 00000 n 
+0000013916 00000 n 
+0000014029 00000 n 
+0000014139 00000 n 
+0000014250 00000 n 
+0000014358 00000 n 
+0000014464 00000 n 
+0000014580 00000 n 
 trailer
 <<
-/Size 63
+/Size 68
 /Root 2 0 R
 /Info 4 0 R
 >>
 startxref
-14036
+15629
 %%EOF

Modified: hadoop/core/trunk/src/docs/src/documentation/content/xdocs/mapred_tutorial.xml
URL: http://svn.apache.org/viewvc/hadoop/core/trunk/src/docs/src/documentation/content/xdocs/mapred_tutorial.xml?rev=669790&r1=669789&r2=669790&view=diff
==============================================================================
--- hadoop/core/trunk/src/docs/src/documentation/content/xdocs/mapred_tutorial.xml (original)
+++ hadoop/core/trunk/src/docs/src/documentation/content/xdocs/mapred_tutorial.xml Thu Jun
19 21:53:01 2008
@@ -1182,24 +1182,18 @@
         <code>${HADOOP_LOG_DIR}/userlogs</code></p>
         
         <p>The <a href="#DistributedCache">DistributedCache</a> can also
be used
-        as a rudimentary software distribution mechanism for use in the map 
-        and/or reduce tasks. It can be used to distribute both jars and 
-        native libraries. The 
-        <a href="ext:api/org/apache/hadoop/filecache/distributedcache/addarchivetoclasspath">
-        DistributedCache.addArchiveToClassPath(Path, Configuration)</a> or 
-        <a href="ext:api/org/apache/hadoop/filecache/distributedcache/addfiletoclasspath">
-        DistributedCache.addFileToClassPath(Path, Configuration)</a> api can 
-        be used to cache files/jars and also add them to the <em>classpath</em>

-        of child-jvm. Similarly the facility provided by the 
-        <code>DistributedCache</code> where-in it symlinks the cached files into
-        the working directory of the task can be used to distribute native 
-        libraries and load them. The underlying detail is that child-jvm always 
-        has its <em>current working directory</em> added to the
+        to distribute both jars and native libraries for use in the map 
+        and/or reduce tasks. The child-jvm always has its 
+        <em>current working directory</em> added to the
         <code>java.library.path</code> and <code>LD_LIBRARY_PATH</code>.

-        And hence the cached libraries can be 
-        loaded via <a href="http://java.sun.com/j2se/1.5.0/docs/api/java/lang/System.html#loadLibrary(java.lang.String)">
-        System.loadLibrary</a> or <a href="http://java.sun.com/j2se/1.5.0/docs/api/java/lang/System.html#load(java.lang.String)">
-        System.load</a>.</p>
+        And hence the cached libraries can be loaded via 
+        <a href="http://java.sun.com/j2se/1.5.0/docs/api/java/lang/System.html#loadLibrary(java.lang.String)">
+        System.loadLibrary</a> or 
+        <a href="http://java.sun.com/j2se/1.5.0/docs/api/java/lang/System.html#load(java.lang.String)">
+        System.load</a>. More details on how to load shared libraries through 
+        distributed cache are documented at 
+        <a href="native_libraries.html#Loading+native+libraries+through+DistributedCache">
+        native_libraries.html</a></p>
       </section>
       
       <section>
@@ -1507,13 +1501,54 @@
           <p><code>DistributedCache</code> can be used to distribute simple,

           read-only data/text files and more complex types such as archives and
           jars. Archives (zip, tar, tgz and tar.gz files) are 
-          <em>un-archived</em> at the slave nodes.
-          Optionally users can also direct the <code>DistributedCache</code>
to 
-          <em>symlink</em> the cached file(s) into the <code>current working

+          <em>un-archived</em> at the slave nodes. Files 
+          have <em>execution permissions</em> set. </p>
+          
+          <p>The files/archives can be distributed by setting the property
+          <code>mapred.cache.{files|archives}</code>. If more than one 
+          file/archive has to be distributed, they can be added as comma
+          separated paths. The properties can also be set by APIs 
+          <a href="ext:api/org/apache/hadoop/filecache/distributedcache/addcachefile">
+          DistributedCache.addCacheFile(URI,conf)</a>/ 
+          <a href="ext:api/org/apache/hadoop/filecache/distributedcache/addcachearchive">
+          DistributedCache.addCacheArchive(URI,conf)</a> and
+          <a href="ext:api/org/apache/hadoop/filecache/distributedcache/setcachefiles">
+          DistributedCache.setCacheFiles(URIs,conf)</a>/
+          <a href="ext:api/org/apache/hadoop/filecache/distributedcache/setcachearchives">
+          DistributedCache.setCacheArchives(URIs,conf)</a> 
+          where URI is of the form
+          <code>hdfs://host:port/absolute-path#link-name</code>.
+          In Streaming, the files can be distributed through command line
+          option <code>-cacheFile/-cacheArchive</code>.</p>
+          
+          <p>Optionally users can also direct the <code>DistributedCache</code>
+          to <em>symlink</em> the cached file(s) into the <code>current
working 
           directory</code> of the task via the 
           <a href="ext:api/org/apache/hadoop/filecache/distributedcache/createsymlink">
-          DistributedCache.createSymlink(Configuration)</a> api. Files 
-          have <em>execution permissions</em> set.</p>
+          DistributedCache.createSymlink(Configuration)</a> api. Or by setting
+          the configuration property <code>mapred.create.symlink</code>
+          as <code>yes</code>. The DistributedCache will use the 
+          <code>fragment</code> of the URI as the name of the symlink. 
+          For example, the URI 
+          <code>hdfs://namenode:port/lib.so.1#lib.so</code>
+          will have the symlink name as <code>lib.so</code> in task's cwd
+          for the file <code>lib.so.1</code> in distributed cache.</p>
+         
+          <p>The <code>DistributedCache</code> can also be used as a 
+          rudimentary software distribution mechanism for use in the
+          map and/or reduce tasks. It can be used to distribute both
+          jars and native libraries. The 
+          <a href="ext:api/org/apache/hadoop/filecache/distributedcache/addarchivetoclasspath">
+          DistributedCache.addArchiveToClassPath(Path, Configuration)</a> or 
+          <a href="ext:api/org/apache/hadoop/filecache/distributedcache/addfiletoclasspath">
+          DistributedCache.addFileToClassPath(Path, Configuration)</a> api 
+          can be used to cache files/jars and also add them to the 
+          <em>classpath</em> of child-jvm. The same can be done by setting
+          the configuration properties 
+          <code>mapred.job.classpath.{files|archives}</code>. Similarly the
+          cached files that are symlinked into the working directory of the
+          task can be used to distribute native libraries and load them.</p>
+          
         </section>
         
         <section>
@@ -1628,27 +1663,10 @@
           <section>
           <title> How to distribute script file: </title>
           <p>
-          To distribute  the debug script file, first copy the file to the dfs.
-          The file can be distributed by setting the property 
-          "mapred.cache.files" with value "path"#"script-name". 
-          If more than one file has to be distributed, the files can be added
-          as comma separated paths. This property can also be set by APIs
-          <a href="ext:api/org/apache/hadoop/filecache/distributedcache/addcachefile">
-          DistributedCache.addCacheFile(URI,conf) </a> and
-          <a href="ext:api/org/apache/hadoop/filecache/distributedcache/setcachefiles">
-          DistributedCache.setCacheFiles(URIs,conf) </a> where URI is of 
-          the form "hdfs://host:port/'absolutepath'#'script-name'". 
-          For Streaming, the file can be added through 
-          command line option -cacheFile.
-          </p>
-          
-          <p>
-          The files has to be symlinked in the current working directory of 
-          of the task. To create symlink for the file, the property 
-          "mapred.create.symlink" is set to "yes". This can also be set by
-          <a href="ext:api/org/apache/hadoop/filecache/distributedcache/createsymlink">
-          DistributedCache.createSymLink(Configuration) </a> api.
-          </p>
+          The user has to use 
+          <a href="mapred_tutorial.html#DistributedCache">DistributedCache</a>
+          mechanism to <em>distribute</em> and <em>symlink</em> the
+          debug script file.</p>
           </section>
           <section>
           <title> How to submit script: </title>

Modified: hadoop/core/trunk/src/docs/src/documentation/content/xdocs/native_libraries.xml
URL: http://svn.apache.org/viewvc/hadoop/core/trunk/src/docs/src/documentation/content/xdocs/native_libraries.xml?rev=669790&r1=669789&r2=669790&view=diff
==============================================================================
--- hadoop/core/trunk/src/docs/src/documentation/content/xdocs/native_libraries.xml (original)
+++ hadoop/core/trunk/src/docs/src/documentation/content/xdocs/native_libraries.xml Thu Jun
19 21:53:01 2008
@@ -185,6 +185,28 @@
         </ul>
       </section>
     </section>
+    <section>
+      <title> Loading native libraries through DistributedCache </title>
+      <p>User can load native shared libraries through  
+      <a href="mapred_tutorial.html#DistributedCache">DistributedCache</a>
+      for <em>distributing</em> and <em>symlinking</em> the library
files</p>
+      
+      <p>Here is an example, describing how to distribute the library and
+      load it from map/reduce task. </p>
+      <ol>
+      <li> First copy the library to the HDFS. <br/>
+      <code>bin/hadoop fs -copyFromLocal mylib.so.1 /libraries/mylib.so.1</code>
+      </li>
+      <li> The job launching program should contain the following: <br/>
+      <code> DistributedCache.createSymlink(conf); </code> <br/>
+      <code> DistributedCache.addCacheFile("hdfs://host:port/libraries/mylib.so.1#mylib.so",
conf);
+      </code>
+      </li>
+      <li> The map/reduce task can contain: <br/>
+      <code> System.loadLibrary("mylib.so"); </code>
+      </li>
+      </ol>
+    </section>
   </body>
   
 </document>

Modified: hadoop/core/trunk/src/docs/src/documentation/content/xdocs/site.xml
URL: http://svn.apache.org/viewvc/hadoop/core/trunk/src/docs/src/documentation/content/xdocs/site.xml?rev=669790&r1=669789&r2=669790&view=diff
==============================================================================
--- hadoop/core/trunk/src/docs/src/documentation/content/xdocs/site.xml (original)
+++ hadoop/core/trunk/src/docs/src/documentation/content/xdocs/site.xml Thu Jun 19 21:53:01
2008
@@ -104,7 +104,9 @@
                 <addarchivetoclasspath href="#addArchiveToClassPath(org.apache.hadoop.fs.Path,%20org.apache.hadoop.conf.Configuration)"
/>
                 <addfiletoclasspath href="#addFileToClassPath(org.apache.hadoop.fs.Path,%20org.apache.hadoop.conf.Configuration)"
/>
                 <addcachefile href="#addCacheFile(java.net.URI,%20org.apache.hadoop.conf.Configuration)"
/>
+                <addcachearchive href="#addCacheArchive(java.net.URI,%20org.apache.hadoop.conf.Configuration)"
/>
                 <setcachefiles href="#setCacheFiles(java.net.URI[],%20org.apache.hadoop.conf.Configuration)"
/>
+                <setcachearchives href="#setCacheArchives(java.net.URI[],%20org.apache.hadoop.conf.Configuration)"
/>
                 <createsymlink href="#createSymlink(org.apache.hadoop.conf.Configuration)"
/>
               </distributedcache>  
             </filecache>



Mime
View raw message