source: proiecte/HadoopJUnit/hadoop-0.20.1/docs/api/org/apache/hadoop/filecache/DistributedCache.html @ 120

Last change on this file since 120 was 120, checked in by (none), 14 years ago

Added the mail files for the Hadoop JUNit Project

  • Property svn:executable set to *
File size: 69.5 KB
Line 
1<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd">
2<!--NewPage-->
3<HTML>
4<HEAD>
5<!-- Generated by javadoc (build 1.6.0_07) on Tue Sep 01 20:56:50 UTC 2009 -->
6<TITLE>
7DistributedCache (Hadoop 0.20.1 API)
8</TITLE>
9
10<META NAME="date" CONTENT="2009-09-01">
11
12<LINK REL ="stylesheet" TYPE="text/css" HREF="../../../../stylesheet.css" TITLE="Style">
13
14<SCRIPT type="text/javascript">
15function windowTitle()
16{
17    if (location.href.indexOf('is-external=true') == -1) {
18        parent.document.title="DistributedCache (Hadoop 0.20.1 API)";
19    }
20}
21</SCRIPT>
22<NOSCRIPT>
23</NOSCRIPT>
24
25</HEAD>
26
27<BODY BGCOLOR="white" onload="windowTitle();">
28<HR>
29
30
31<!-- ========= START OF TOP NAVBAR ======= -->
32<A NAME="navbar_top"><!-- --></A>
33<A HREF="#skip-navbar_top" title="Skip navigation links"></A>
34<TABLE BORDER="0" WIDTH="100%" CELLPADDING="1" CELLSPACING="0" SUMMARY="">
35<TR>
36<TD COLSPAN=2 BGCOLOR="#EEEEFF" CLASS="NavBarCell1">
37<A NAME="navbar_top_firstrow"><!-- --></A>
38<TABLE BORDER="0" CELLPADDING="0" CELLSPACING="3" SUMMARY="">
39  <TR ALIGN="center" VALIGN="top">
40  <TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1">    <A HREF="../../../../overview-summary.html"><FONT CLASS="NavBarFont1"><B>Overview</B></FONT></A>&nbsp;</TD>
41  <TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1">    <A HREF="package-summary.html"><FONT CLASS="NavBarFont1"><B>Package</B></FONT></A>&nbsp;</TD>
42  <TD BGCOLOR="#FFFFFF" CLASS="NavBarCell1Rev"> &nbsp;<FONT CLASS="NavBarFont1Rev"><B>Class</B></FONT>&nbsp;</TD>
43  <TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1">    <A HREF="class-use/DistributedCache.html"><FONT CLASS="NavBarFont1"><B>Use</B></FONT></A>&nbsp;</TD>
44  <TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1">    <A HREF="package-tree.html"><FONT CLASS="NavBarFont1"><B>Tree</B></FONT></A>&nbsp;</TD>
45  <TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1">    <A HREF="../../../../deprecated-list.html"><FONT CLASS="NavBarFont1"><B>Deprecated</B></FONT></A>&nbsp;</TD>
46  <TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1">    <A HREF="../../../../index-all.html"><FONT CLASS="NavBarFont1"><B>Index</B></FONT></A>&nbsp;</TD>
47  <TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1">    <A HREF="../../../../help-doc.html"><FONT CLASS="NavBarFont1"><B>Help</B></FONT></A>&nbsp;</TD>
48  </TR>
49</TABLE>
50</TD>
51<TD ALIGN="right" VALIGN="top" ROWSPAN=3><EM>
52</EM>
53</TD>
54</TR>
55
56<TR>
57<TD BGCOLOR="white" CLASS="NavBarCell2"><FONT SIZE="-2">
58&nbsp;PREV CLASS&nbsp;
59&nbsp;NEXT CLASS</FONT></TD>
60<TD BGCOLOR="white" CLASS="NavBarCell2"><FONT SIZE="-2">
61  <A HREF="../../../../index.html?org/apache/hadoop/filecache/DistributedCache.html" target="_top"><B>FRAMES</B></A>  &nbsp;
62&nbsp;<A HREF="DistributedCache.html" target="_top"><B>NO FRAMES</B></A>  &nbsp;
63&nbsp;<SCRIPT type="text/javascript">
64  <!--
65  if(window==top) {
66    document.writeln('<A HREF="../../../../allclasses-noframe.html"><B>All Classes</B></A>');
67  }
68  //-->
69</SCRIPT>
70<NOSCRIPT>
71  <A HREF="../../../../allclasses-noframe.html"><B>All Classes</B></A>
72</NOSCRIPT>
73
74
75</FONT></TD>
76</TR>
77<TR>
78<TD VALIGN="top" CLASS="NavBarCell3"><FONT SIZE="-2">
79  SUMMARY:&nbsp;NESTED&nbsp;|&nbsp;FIELD&nbsp;|&nbsp;<A HREF="#constructor_summary">CONSTR</A>&nbsp;|&nbsp;<A HREF="#method_summary">METHOD</A></FONT></TD>
80<TD VALIGN="top" CLASS="NavBarCell3"><FONT SIZE="-2">
81DETAIL:&nbsp;FIELD&nbsp;|&nbsp;<A HREF="#constructor_detail">CONSTR</A>&nbsp;|&nbsp;<A HREF="#method_detail">METHOD</A></FONT></TD>
82</TR>
83</TABLE>
84<A NAME="skip-navbar_top"></A>
85<!-- ========= END OF TOP NAVBAR ========= -->
86
87<HR>
88<!-- ======== START OF CLASS DATA ======== -->
89<H2>
90<FONT SIZE="-1">
91org.apache.hadoop.filecache</FONT>
92<BR>
93Class DistributedCache</H2>
94<PRE>
95<A HREF="http://java.sun.com/javase/6/docs/api/java/lang/Object.html?is-external=true" title="class or interface in java.lang">java.lang.Object</A>
96  <IMG SRC="../../../../resources/inherit.gif" ALT="extended by "><B>org.apache.hadoop.filecache.DistributedCache</B>
97</PRE>
98<HR>
99<DL>
100<DT><PRE>public class <B>DistributedCache</B><DT>extends <A HREF="http://java.sun.com/javase/6/docs/api/java/lang/Object.html?is-external=true" title="class or interface in java.lang">Object</A></DL>
101</PRE>
102
103<P>
104Distribute application-specific large, read-only files efficiently.
105 
106 <p><code>DistributedCache</code> is a facility provided by the Map-Reduce
107 framework to cache files (text, archives, jars etc.) needed by applications.
108 </p>
109 
110 <p>Applications specify the files, via urls (hdfs:// or http://) to be cached
111 via the <A HREF="../../../../org/apache/hadoop/mapred/JobConf.html" title="class in org.apache.hadoop.mapred"><CODE>JobConf</CODE></A>.
112 The <code>DistributedCache</code> assumes that the
113 files specified via hdfs:// urls are already present on the
114 <A HREF="../../../../org/apache/hadoop/fs/FileSystem.html" title="class in org.apache.hadoop.fs"><CODE>FileSystem</CODE></A> at the path specified by the url.</p>
115 
116 <p>The framework will copy the necessary files on to the slave node before
117 any tasks for the job are executed on that node. Its efficiency stems from
118 the fact that the files are only copied once per job and the ability to
119 cache archives which are un-archived on the slaves.</p> 
120
121 <p><code>DistributedCache</code> can be used to distribute simple, read-only
122 data/text files and/or more complex types such as archives, jars etc.
123 Archives (zip, tar and tgz/tar.gz files) are un-archived at the slave nodes.
124 Jars may be optionally added to the classpath of the tasks, a rudimentary
125 software distribution mechanism.  Files have execution permissions.
126 Optionally users can also direct it to symlink the distributed cache file(s)
127 into the working directory of the task.</p>
128 
129 <p><code>DistributedCache</code> tracks modification timestamps of the cache
130 files. Clearly the cache files should not be modified by the application
131 or externally while the job is executing.</p>
132 
133 <p>Here is an illustrative example on how to use the
134 <code>DistributedCache</code>:</p>
135 <p><blockquote><pre>
136     // Setting up the cache for the application
137     
138     1. Copy the requisite files to the <code>FileSystem</code>:
139     
140     $ bin/hadoop fs -copyFromLocal lookup.dat /myapp/lookup.dat 
141     $ bin/hadoop fs -copyFromLocal map.zip /myapp/map.zip 
142     $ bin/hadoop fs -copyFromLocal mylib.jar /myapp/mylib.jar
143     $ bin/hadoop fs -copyFromLocal mytar.tar /myapp/mytar.tar
144     $ bin/hadoop fs -copyFromLocal mytgz.tgz /myapp/mytgz.tgz
145     $ bin/hadoop fs -copyFromLocal mytargz.tar.gz /myapp/mytargz.tar.gz
146     
147     2. Setup the application's <code>JobConf</code>:
148     
149     JobConf job = new JobConf();
150     DistributedCache.addCacheFile(new URI("/myapp/lookup.dat#lookup.dat"),
151                                   job);
152     DistributedCache.addCacheArchive(new URI("/myapp/map.zip", job);
153     DistributedCache.addFileToClassPath(new Path("/myapp/mylib.jar"), job);
154     DistributedCache.addCacheArchive(new URI("/myapp/mytar.tar", job);
155     DistributedCache.addCacheArchive(new URI("/myapp/mytgz.tgz", job);
156     DistributedCache.addCacheArchive(new URI("/myapp/mytargz.tar.gz", job);
157     
158     3. Use the cached files in the <A HREF="../../../../org/apache/hadoop/mapred/Mapper.html" title="interface in org.apache.hadoop.mapred"><CODE>Mapper</CODE></A>
159     or <A HREF="../../../../org/apache/hadoop/mapred/Reducer.html" title="interface in org.apache.hadoop.mapred"><CODE>Reducer</CODE></A>:
160     
161     public static class MapClass extends MapReduceBase 
162     implements Mapper&lt;K, V, K, V&gt; {
163     
164       private Path[] localArchives;
165       private Path[] localFiles;
166       
167       public void configure(JobConf job) {
168         // Get the cached archives/files
169         localArchives = DistributedCache.getLocalCacheArchives(job);
170         localFiles = DistributedCache.getLocalCacheFiles(job);
171       }
172       
173       public void map(K key, V value,
174                       OutputCollector&lt;K, V&gt; output, Reporter reporter)
175       throws IOException {
176         // Use data from the cached archives/files here
177         // ...
178         // ...
179         output.collect(k, v);
180       }
181     }
182     
183 </pre></blockquote></p>
184<P>
185
186<P>
187<DL>
188<DT><B>See Also:</B><DD><A HREF="../../../../org/apache/hadoop/mapred/JobConf.html" title="class in org.apache.hadoop.mapred"><CODE>JobConf</CODE></A>,
189<A HREF="../../../../org/apache/hadoop/mapred/JobClient.html" title="class in org.apache.hadoop.mapred"><CODE>JobClient</CODE></A></DL>
190<HR>
191
192<P>
193
194<!-- ======== CONSTRUCTOR SUMMARY ======== -->
195
196<A NAME="constructor_summary"><!-- --></A>
197<TABLE BORDER="1" WIDTH="100%" CELLPADDING="3" CELLSPACING="0" SUMMARY="">
198<TR BGCOLOR="#CCCCFF" CLASS="TableHeadingColor">
199<TH ALIGN="left" COLSPAN="2"><FONT SIZE="+2">
200<B>Constructor Summary</B></FONT></TH>
201</TR>
202<TR BGCOLOR="white" CLASS="TableRowColor">
203<TD><CODE><B><A HREF="../../../../org/apache/hadoop/filecache/DistributedCache.html#DistributedCache()">DistributedCache</A></B>()</CODE>
204
205<BR>
206&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;</TD>
207</TR>
208</TABLE>
209&nbsp;
210<!-- ========== METHOD SUMMARY =========== -->
211
212<A NAME="method_summary"><!-- --></A>
213<TABLE BORDER="1" WIDTH="100%" CELLPADDING="3" CELLSPACING="0" SUMMARY="">
214<TR BGCOLOR="#CCCCFF" CLASS="TableHeadingColor">
215<TH ALIGN="left" COLSPAN="2"><FONT SIZE="+2">
216<B>Method Summary</B></FONT></TH>
217</TR>
218<TR BGCOLOR="white" CLASS="TableRowColor">
219<TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1">
220<CODE>static&nbsp;void</CODE></FONT></TD>
221<TD><CODE><B><A HREF="../../../../org/apache/hadoop/filecache/DistributedCache.html#addArchiveToClassPath(org.apache.hadoop.fs.Path, org.apache.hadoop.conf.Configuration)">addArchiveToClassPath</A></B>(<A HREF="../../../../org/apache/hadoop/fs/Path.html" title="class in org.apache.hadoop.fs">Path</A>&nbsp;archive,
222                      <A HREF="../../../../org/apache/hadoop/conf/Configuration.html" title="class in org.apache.hadoop.conf">Configuration</A>&nbsp;conf)</CODE>
223
224<BR>
225&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;Add an archive path to the current set of classpath entries.</TD>
226</TR>
227<TR BGCOLOR="white" CLASS="TableRowColor">
228<TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1">
229<CODE>static&nbsp;void</CODE></FONT></TD>
230<TD><CODE><B><A HREF="../../../../org/apache/hadoop/filecache/DistributedCache.html#addCacheArchive(java.net.URI, org.apache.hadoop.conf.Configuration)">addCacheArchive</A></B>(<A HREF="http://java.sun.com/javase/6/docs/api/java/net/URI.html?is-external=true" title="class or interface in java.net">URI</A>&nbsp;uri,
231                <A HREF="../../../../org/apache/hadoop/conf/Configuration.html" title="class in org.apache.hadoop.conf">Configuration</A>&nbsp;conf)</CODE>
232
233<BR>
234&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;Add a archives to be localized to the conf</TD>
235</TR>
236<TR BGCOLOR="white" CLASS="TableRowColor">
237<TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1">
238<CODE>static&nbsp;void</CODE></FONT></TD>
239<TD><CODE><B><A HREF="../../../../org/apache/hadoop/filecache/DistributedCache.html#addCacheFile(java.net.URI, org.apache.hadoop.conf.Configuration)">addCacheFile</A></B>(<A HREF="http://java.sun.com/javase/6/docs/api/java/net/URI.html?is-external=true" title="class or interface in java.net">URI</A>&nbsp;uri,
240             <A HREF="../../../../org/apache/hadoop/conf/Configuration.html" title="class in org.apache.hadoop.conf">Configuration</A>&nbsp;conf)</CODE>
241
242<BR>
243&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;Add a file to be localized to the conf</TD>
244</TR>
245<TR BGCOLOR="white" CLASS="TableRowColor">
246<TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1">
247<CODE>static&nbsp;void</CODE></FONT></TD>
248<TD><CODE><B><A HREF="../../../../org/apache/hadoop/filecache/DistributedCache.html#addFileToClassPath(org.apache.hadoop.fs.Path, org.apache.hadoop.conf.Configuration)">addFileToClassPath</A></B>(<A HREF="../../../../org/apache/hadoop/fs/Path.html" title="class in org.apache.hadoop.fs">Path</A>&nbsp;file,
249                   <A HREF="../../../../org/apache/hadoop/conf/Configuration.html" title="class in org.apache.hadoop.conf">Configuration</A>&nbsp;conf)</CODE>
250
251<BR>
252&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;Add an file path to the current set of classpath entries It adds the file
253 to cache as well.</TD>
254</TR>
255<TR BGCOLOR="white" CLASS="TableRowColor">
256<TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1">
257<CODE>static&nbsp;boolean</CODE></FONT></TD>
258<TD><CODE><B><A HREF="../../../../org/apache/hadoop/filecache/DistributedCache.html#checkURIs(java.net.URI[], java.net.URI[])">checkURIs</A></B>(<A HREF="http://java.sun.com/javase/6/docs/api/java/net/URI.html?is-external=true" title="class or interface in java.net">URI</A>[]&nbsp;uriFiles,
259          <A HREF="http://java.sun.com/javase/6/docs/api/java/net/URI.html?is-external=true" title="class or interface in java.net">URI</A>[]&nbsp;uriArchives)</CODE>
260
261<BR>
262&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;This method checks if there is a conflict in the fragment names
263 of the uris.</TD>
264</TR>
265<TR BGCOLOR="white" CLASS="TableRowColor">
266<TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1">
267<CODE>static&nbsp;void</CODE></FONT></TD>
268<TD><CODE><B><A HREF="../../../../org/apache/hadoop/filecache/DistributedCache.html#createAllSymlink(org.apache.hadoop.conf.Configuration, java.io.File, java.io.File)">createAllSymlink</A></B>(<A HREF="../../../../org/apache/hadoop/conf/Configuration.html" title="class in org.apache.hadoop.conf">Configuration</A>&nbsp;conf,
269                 <A HREF="http://java.sun.com/javase/6/docs/api/java/io/File.html?is-external=true" title="class or interface in java.io">File</A>&nbsp;jobCacheDir,
270                 <A HREF="http://java.sun.com/javase/6/docs/api/java/io/File.html?is-external=true" title="class or interface in java.io">File</A>&nbsp;workDir)</CODE>
271
272<BR>
273&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;This method create symlinks for all files in a given dir in another directory</TD>
274</TR>
275<TR BGCOLOR="white" CLASS="TableRowColor">
276<TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1">
277<CODE>static&nbsp;void</CODE></FONT></TD>
278<TD><CODE><B><A HREF="../../../../org/apache/hadoop/filecache/DistributedCache.html#createSymlink(org.apache.hadoop.conf.Configuration)">createSymlink</A></B>(<A HREF="../../../../org/apache/hadoop/conf/Configuration.html" title="class in org.apache.hadoop.conf">Configuration</A>&nbsp;conf)</CODE>
279
280<BR>
281&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;This method allows you to create symlinks in the current working directory
282 of the task to all the cache files/archives</TD>
283</TR>
284<TR BGCOLOR="white" CLASS="TableRowColor">
285<TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1">
286<CODE>static&nbsp;<A HREF="../../../../org/apache/hadoop/fs/Path.html" title="class in org.apache.hadoop.fs">Path</A>[]</CODE></FONT></TD>
287<TD><CODE><B><A HREF="../../../../org/apache/hadoop/filecache/DistributedCache.html#getArchiveClassPaths(org.apache.hadoop.conf.Configuration)">getArchiveClassPaths</A></B>(<A HREF="../../../../org/apache/hadoop/conf/Configuration.html" title="class in org.apache.hadoop.conf">Configuration</A>&nbsp;conf)</CODE>
288
289<BR>
290&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;Get the archive entries in classpath as an array of Path</TD>
291</TR>
292<TR BGCOLOR="white" CLASS="TableRowColor">
293<TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1">
294<CODE>static&nbsp;<A HREF="http://java.sun.com/javase/6/docs/api/java/lang/String.html?is-external=true" title="class or interface in java.lang">String</A>[]</CODE></FONT></TD>
295<TD><CODE><B><A HREF="../../../../org/apache/hadoop/filecache/DistributedCache.html#getArchiveTimestamps(org.apache.hadoop.conf.Configuration)">getArchiveTimestamps</A></B>(<A HREF="../../../../org/apache/hadoop/conf/Configuration.html" title="class in org.apache.hadoop.conf">Configuration</A>&nbsp;conf)</CODE>
296
297<BR>
298&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;Get the timestamps of the archives</TD>
299</TR>
300<TR BGCOLOR="white" CLASS="TableRowColor">
301<TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1">
302<CODE>static&nbsp;<A HREF="http://java.sun.com/javase/6/docs/api/java/net/URI.html?is-external=true" title="class or interface in java.net">URI</A>[]</CODE></FONT></TD>
303<TD><CODE><B><A HREF="../../../../org/apache/hadoop/filecache/DistributedCache.html#getCacheArchives(org.apache.hadoop.conf.Configuration)">getCacheArchives</A></B>(<A HREF="../../../../org/apache/hadoop/conf/Configuration.html" title="class in org.apache.hadoop.conf">Configuration</A>&nbsp;conf)</CODE>
304
305<BR>
306&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;Get cache archives set in the Configuration</TD>
307</TR>
308<TR BGCOLOR="white" CLASS="TableRowColor">
309<TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1">
310<CODE>static&nbsp;<A HREF="http://java.sun.com/javase/6/docs/api/java/net/URI.html?is-external=true" title="class or interface in java.net">URI</A>[]</CODE></FONT></TD>
311<TD><CODE><B><A HREF="../../../../org/apache/hadoop/filecache/DistributedCache.html#getCacheFiles(org.apache.hadoop.conf.Configuration)">getCacheFiles</A></B>(<A HREF="../../../../org/apache/hadoop/conf/Configuration.html" title="class in org.apache.hadoop.conf">Configuration</A>&nbsp;conf)</CODE>
312
313<BR>
314&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;Get cache files set in the Configuration</TD>
315</TR>
316<TR BGCOLOR="white" CLASS="TableRowColor">
317<TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1">
318<CODE>static&nbsp;<A HREF="../../../../org/apache/hadoop/fs/Path.html" title="class in org.apache.hadoop.fs">Path</A>[]</CODE></FONT></TD>
319<TD><CODE><B><A HREF="../../../../org/apache/hadoop/filecache/DistributedCache.html#getFileClassPaths(org.apache.hadoop.conf.Configuration)">getFileClassPaths</A></B>(<A HREF="../../../../org/apache/hadoop/conf/Configuration.html" title="class in org.apache.hadoop.conf">Configuration</A>&nbsp;conf)</CODE>
320
321<BR>
322&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;Get the file entries in classpath as an array of Path</TD>
323</TR>
324<TR BGCOLOR="white" CLASS="TableRowColor">
325<TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1">
326<CODE>static&nbsp;<A HREF="http://java.sun.com/javase/6/docs/api/java/lang/String.html?is-external=true" title="class or interface in java.lang">String</A>[]</CODE></FONT></TD>
327<TD><CODE><B><A HREF="../../../../org/apache/hadoop/filecache/DistributedCache.html#getFileTimestamps(org.apache.hadoop.conf.Configuration)">getFileTimestamps</A></B>(<A HREF="../../../../org/apache/hadoop/conf/Configuration.html" title="class in org.apache.hadoop.conf">Configuration</A>&nbsp;conf)</CODE>
328
329<BR>
330&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;Get the timestamps of the files</TD>
331</TR>
332<TR BGCOLOR="white" CLASS="TableRowColor">
333<TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1">
334<CODE>static&nbsp;<A HREF="../../../../org/apache/hadoop/fs/Path.html" title="class in org.apache.hadoop.fs">Path</A></CODE></FONT></TD>
335<TD><CODE><B><A HREF="../../../../org/apache/hadoop/filecache/DistributedCache.html#getLocalCache(java.net.URI, org.apache.hadoop.conf.Configuration, org.apache.hadoop.fs.Path, boolean, long, org.apache.hadoop.fs.Path)">getLocalCache</A></B>(<A HREF="http://java.sun.com/javase/6/docs/api/java/net/URI.html?is-external=true" title="class or interface in java.net">URI</A>&nbsp;cache,
336              <A HREF="../../../../org/apache/hadoop/conf/Configuration.html" title="class in org.apache.hadoop.conf">Configuration</A>&nbsp;conf,
337              <A HREF="../../../../org/apache/hadoop/fs/Path.html" title="class in org.apache.hadoop.fs">Path</A>&nbsp;baseDir,
338              boolean&nbsp;isArchive,
339              long&nbsp;confFileStamp,
340              <A HREF="../../../../org/apache/hadoop/fs/Path.html" title="class in org.apache.hadoop.fs">Path</A>&nbsp;currentWorkDir)</CODE>
341
342<BR>
343&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;Get the locally cached file or archive; it could either be
344 previously cached (and valid) or copy it from the <A HREF="../../../../org/apache/hadoop/fs/FileSystem.html" title="class in org.apache.hadoop.fs"><CODE>FileSystem</CODE></A> now.</TD>
345</TR>
346<TR BGCOLOR="white" CLASS="TableRowColor">
347<TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1">
348<CODE>static&nbsp;<A HREF="../../../../org/apache/hadoop/fs/Path.html" title="class in org.apache.hadoop.fs">Path</A></CODE></FONT></TD>
349<TD><CODE><B><A HREF="../../../../org/apache/hadoop/filecache/DistributedCache.html#getLocalCache(java.net.URI, org.apache.hadoop.conf.Configuration, org.apache.hadoop.fs.Path, org.apache.hadoop.fs.FileStatus, boolean, long, org.apache.hadoop.fs.Path)">getLocalCache</A></B>(<A HREF="http://java.sun.com/javase/6/docs/api/java/net/URI.html?is-external=true" title="class or interface in java.net">URI</A>&nbsp;cache,
350              <A HREF="../../../../org/apache/hadoop/conf/Configuration.html" title="class in org.apache.hadoop.conf">Configuration</A>&nbsp;conf,
351              <A HREF="../../../../org/apache/hadoop/fs/Path.html" title="class in org.apache.hadoop.fs">Path</A>&nbsp;baseDir,
352              <A HREF="../../../../org/apache/hadoop/fs/FileStatus.html" title="class in org.apache.hadoop.fs">FileStatus</A>&nbsp;fileStatus,
353              boolean&nbsp;isArchive,
354              long&nbsp;confFileStamp,
355              <A HREF="../../../../org/apache/hadoop/fs/Path.html" title="class in org.apache.hadoop.fs">Path</A>&nbsp;currentWorkDir)</CODE>
356
357<BR>
358&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;Get the locally cached file or archive; it could either be
359 previously cached (and valid) or copy it from the <A HREF="../../../../org/apache/hadoop/fs/FileSystem.html" title="class in org.apache.hadoop.fs"><CODE>FileSystem</CODE></A> now.</TD>
360</TR>
361<TR BGCOLOR="white" CLASS="TableRowColor">
362<TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1">
363<CODE>static&nbsp;<A HREF="../../../../org/apache/hadoop/fs/Path.html" title="class in org.apache.hadoop.fs">Path</A></CODE></FONT></TD>
364<TD><CODE><B><A HREF="../../../../org/apache/hadoop/filecache/DistributedCache.html#getLocalCache(java.net.URI, org.apache.hadoop.conf.Configuration, org.apache.hadoop.fs.Path, org.apache.hadoop.fs.FileStatus, boolean, long, org.apache.hadoop.fs.Path, boolean)">getLocalCache</A></B>(<A HREF="http://java.sun.com/javase/6/docs/api/java/net/URI.html?is-external=true" title="class or interface in java.net">URI</A>&nbsp;cache,
365              <A HREF="../../../../org/apache/hadoop/conf/Configuration.html" title="class in org.apache.hadoop.conf">Configuration</A>&nbsp;conf,
366              <A HREF="../../../../org/apache/hadoop/fs/Path.html" title="class in org.apache.hadoop.fs">Path</A>&nbsp;baseDir,
367              <A HREF="../../../../org/apache/hadoop/fs/FileStatus.html" title="class in org.apache.hadoop.fs">FileStatus</A>&nbsp;fileStatus,
368              boolean&nbsp;isArchive,
369              long&nbsp;confFileStamp,
370              <A HREF="../../../../org/apache/hadoop/fs/Path.html" title="class in org.apache.hadoop.fs">Path</A>&nbsp;currentWorkDir,
371              boolean&nbsp;honorSymLinkConf)</CODE>
372
373<BR>
374&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;Get the locally cached file or archive; it could either be
375 previously cached (and valid) or copy it from the <A HREF="../../../../org/apache/hadoop/fs/FileSystem.html" title="class in org.apache.hadoop.fs"><CODE>FileSystem</CODE></A> now.</TD>
376</TR>
377<TR BGCOLOR="white" CLASS="TableRowColor">
378<TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1">
379<CODE>static&nbsp;<A HREF="../../../../org/apache/hadoop/fs/Path.html" title="class in org.apache.hadoop.fs">Path</A>[]</CODE></FONT></TD>
380<TD><CODE><B><A HREF="../../../../org/apache/hadoop/filecache/DistributedCache.html#getLocalCacheArchives(org.apache.hadoop.conf.Configuration)">getLocalCacheArchives</A></B>(<A HREF="../../../../org/apache/hadoop/conf/Configuration.html" title="class in org.apache.hadoop.conf">Configuration</A>&nbsp;conf)</CODE>
381
382<BR>
383&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;Return the path array of the localized caches</TD>
384</TR>
385<TR BGCOLOR="white" CLASS="TableRowColor">
386<TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1">
387<CODE>static&nbsp;<A HREF="../../../../org/apache/hadoop/fs/Path.html" title="class in org.apache.hadoop.fs">Path</A>[]</CODE></FONT></TD>
388<TD><CODE><B><A HREF="../../../../org/apache/hadoop/filecache/DistributedCache.html#getLocalCacheFiles(org.apache.hadoop.conf.Configuration)">getLocalCacheFiles</A></B>(<A HREF="../../../../org/apache/hadoop/conf/Configuration.html" title="class in org.apache.hadoop.conf">Configuration</A>&nbsp;conf)</CODE>
389
390<BR>
391&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;Return the path array of the localized files</TD>
392</TR>
393<TR BGCOLOR="white" CLASS="TableRowColor">
394<TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1">
395<CODE>static&nbsp;boolean</CODE></FONT></TD>
396<TD><CODE><B><A HREF="../../../../org/apache/hadoop/filecache/DistributedCache.html#getSymlink(org.apache.hadoop.conf.Configuration)">getSymlink</A></B>(<A HREF="../../../../org/apache/hadoop/conf/Configuration.html" title="class in org.apache.hadoop.conf">Configuration</A>&nbsp;conf)</CODE>
397
398<BR>
399&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;This method checks to see if symlinks are to be create for the
400 localized cache files in the current working directory</TD>
401</TR>
402<TR BGCOLOR="white" CLASS="TableRowColor">
403<TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1">
404<CODE>static&nbsp;long</CODE></FONT></TD>
405<TD><CODE><B><A HREF="../../../../org/apache/hadoop/filecache/DistributedCache.html#getTimestamp(org.apache.hadoop.conf.Configuration, java.net.URI)">getTimestamp</A></B>(<A HREF="../../../../org/apache/hadoop/conf/Configuration.html" title="class in org.apache.hadoop.conf">Configuration</A>&nbsp;conf,
406             <A HREF="http://java.sun.com/javase/6/docs/api/java/net/URI.html?is-external=true" title="class or interface in java.net">URI</A>&nbsp;cache)</CODE>
407
408<BR>
409&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;Returns mtime of a given cache file on hdfs.</TD>
410</TR>
411<TR BGCOLOR="white" CLASS="TableRowColor">
412<TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1">
413<CODE>static&nbsp;<A HREF="http://java.sun.com/javase/6/docs/api/java/lang/String.html?is-external=true" title="class or interface in java.lang">String</A></CODE></FONT></TD>
414<TD><CODE><B><A HREF="../../../../org/apache/hadoop/filecache/DistributedCache.html#makeRelative(java.net.URI, org.apache.hadoop.conf.Configuration)">makeRelative</A></B>(<A HREF="http://java.sun.com/javase/6/docs/api/java/net/URI.html?is-external=true" title="class or interface in java.net">URI</A>&nbsp;cache,
415             <A HREF="../../../../org/apache/hadoop/conf/Configuration.html" title="class in org.apache.hadoop.conf">Configuration</A>&nbsp;conf)</CODE>
416
417<BR>
418&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;</TD>
419</TR>
420<TR BGCOLOR="white" CLASS="TableRowColor">
421<TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1">
422<CODE>static&nbsp;void</CODE></FONT></TD>
423<TD><CODE><B><A HREF="../../../../org/apache/hadoop/filecache/DistributedCache.html#purgeCache(org.apache.hadoop.conf.Configuration)">purgeCache</A></B>(<A HREF="../../../../org/apache/hadoop/conf/Configuration.html" title="class in org.apache.hadoop.conf">Configuration</A>&nbsp;conf)</CODE>
424
425<BR>
426&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;Clear the entire contents of the cache and delete the backing files.</TD>
427</TR>
428<TR BGCOLOR="white" CLASS="TableRowColor">
429<TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1">
430<CODE>static&nbsp;void</CODE></FONT></TD>
431<TD><CODE><B><A HREF="../../../../org/apache/hadoop/filecache/DistributedCache.html#releaseCache(java.net.URI, org.apache.hadoop.conf.Configuration)">releaseCache</A></B>(<A HREF="http://java.sun.com/javase/6/docs/api/java/net/URI.html?is-external=true" title="class or interface in java.net">URI</A>&nbsp;cache,
432             <A HREF="../../../../org/apache/hadoop/conf/Configuration.html" title="class in org.apache.hadoop.conf">Configuration</A>&nbsp;conf)</CODE>
433
434<BR>
435&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;This is the opposite of getlocalcache.</TD>
436</TR>
437<TR BGCOLOR="white" CLASS="TableRowColor">
438<TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1">
439<CODE>static&nbsp;void</CODE></FONT></TD>
440<TD><CODE><B><A HREF="../../../../org/apache/hadoop/filecache/DistributedCache.html#setArchiveTimestamps(org.apache.hadoop.conf.Configuration, java.lang.String)">setArchiveTimestamps</A></B>(<A HREF="../../../../org/apache/hadoop/conf/Configuration.html" title="class in org.apache.hadoop.conf">Configuration</A>&nbsp;conf,
441                     <A HREF="http://java.sun.com/javase/6/docs/api/java/lang/String.html?is-external=true" title="class or interface in java.lang">String</A>&nbsp;timestamps)</CODE>
442
443<BR>
444&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;This is to check the timestamp of the archives to be localized</TD>
445</TR>
446<TR BGCOLOR="white" CLASS="TableRowColor">
447<TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1">
448<CODE>static&nbsp;void</CODE></FONT></TD>
449<TD><CODE><B><A HREF="../../../../org/apache/hadoop/filecache/DistributedCache.html#setCacheArchives(java.net.URI[], org.apache.hadoop.conf.Configuration)">setCacheArchives</A></B>(<A HREF="http://java.sun.com/javase/6/docs/api/java/net/URI.html?is-external=true" title="class or interface in java.net">URI</A>[]&nbsp;archives,
450                 <A HREF="../../../../org/apache/hadoop/conf/Configuration.html" title="class in org.apache.hadoop.conf">Configuration</A>&nbsp;conf)</CODE>
451
452<BR>
453&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;Set the configuration with the given set of archives</TD>
454</TR>
455<TR BGCOLOR="white" CLASS="TableRowColor">
456<TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1">
457<CODE>static&nbsp;void</CODE></FONT></TD>
458<TD><CODE><B><A HREF="../../../../org/apache/hadoop/filecache/DistributedCache.html#setCacheFiles(java.net.URI[], org.apache.hadoop.conf.Configuration)">setCacheFiles</A></B>(<A HREF="http://java.sun.com/javase/6/docs/api/java/net/URI.html?is-external=true" title="class or interface in java.net">URI</A>[]&nbsp;files,
459              <A HREF="../../../../org/apache/hadoop/conf/Configuration.html" title="class in org.apache.hadoop.conf">Configuration</A>&nbsp;conf)</CODE>
460
461<BR>
462&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;Set the configuration with the given set of files</TD>
463</TR>
464<TR BGCOLOR="white" CLASS="TableRowColor">
465<TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1">
466<CODE>static&nbsp;void</CODE></FONT></TD>
467<TD><CODE><B><A HREF="../../../../org/apache/hadoop/filecache/DistributedCache.html#setFileTimestamps(org.apache.hadoop.conf.Configuration, java.lang.String)">setFileTimestamps</A></B>(<A HREF="../../../../org/apache/hadoop/conf/Configuration.html" title="class in org.apache.hadoop.conf">Configuration</A>&nbsp;conf,
468                  <A HREF="http://java.sun.com/javase/6/docs/api/java/lang/String.html?is-external=true" title="class or interface in java.lang">String</A>&nbsp;timestamps)</CODE>
469
470<BR>
471&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;This is to check the timestamp of the files to be localized</TD>
472</TR>
473<TR BGCOLOR="white" CLASS="TableRowColor">
474<TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1">
475<CODE>static&nbsp;void</CODE></FONT></TD>
476<TD><CODE><B><A HREF="../../../../org/apache/hadoop/filecache/DistributedCache.html#setLocalArchives(org.apache.hadoop.conf.Configuration, java.lang.String)">setLocalArchives</A></B>(<A HREF="../../../../org/apache/hadoop/conf/Configuration.html" title="class in org.apache.hadoop.conf">Configuration</A>&nbsp;conf,
477                 <A HREF="http://java.sun.com/javase/6/docs/api/java/lang/String.html?is-external=true" title="class or interface in java.lang">String</A>&nbsp;str)</CODE>
478
479<BR>
480&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;Set the conf to contain the location for localized archives</TD>
481</TR>
482<TR BGCOLOR="white" CLASS="TableRowColor">
483<TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1">
484<CODE>static&nbsp;void</CODE></FONT></TD>
485<TD><CODE><B><A HREF="../../../../org/apache/hadoop/filecache/DistributedCache.html#setLocalFiles(org.apache.hadoop.conf.Configuration, java.lang.String)">setLocalFiles</A></B>(<A HREF="../../../../org/apache/hadoop/conf/Configuration.html" title="class in org.apache.hadoop.conf">Configuration</A>&nbsp;conf,
486              <A HREF="http://java.sun.com/javase/6/docs/api/java/lang/String.html?is-external=true" title="class or interface in java.lang">String</A>&nbsp;str)</CODE>
487
488<BR>
489&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;Set the conf to contain the location for localized files</TD>
490</TR>
491</TABLE>
492&nbsp;<A NAME="methods_inherited_from_class_java.lang.Object"><!-- --></A>
493<TABLE BORDER="1" WIDTH="100%" CELLPADDING="3" CELLSPACING="0" SUMMARY="">
494<TR BGCOLOR="#EEEEFF" CLASS="TableSubHeadingColor">
495<TH ALIGN="left"><B>Methods inherited from class java.lang.<A HREF="http://java.sun.com/javase/6/docs/api/java/lang/Object.html?is-external=true" title="class or interface in java.lang">Object</A></B></TH>
496</TR>
497<TR BGCOLOR="white" CLASS="TableRowColor">
498<TD><CODE><A HREF="http://java.sun.com/javase/6/docs/api/java/lang/Object.html?is-external=true#clone()" title="class or interface in java.lang">clone</A>, <A HREF="http://java.sun.com/javase/6/docs/api/java/lang/Object.html?is-external=true#equals(java.lang.Object)" title="class or interface in java.lang">equals</A>, <A HREF="http://java.sun.com/javase/6/docs/api/java/lang/Object.html?is-external=true#finalize()" title="class or interface in java.lang">finalize</A>, <A HREF="http://java.sun.com/javase/6/docs/api/java/lang/Object.html?is-external=true#getClass()" title="class or interface in java.lang">getClass</A>, <A HREF="http://java.sun.com/javase/6/docs/api/java/lang/Object.html?is-external=true#hashCode()" title="class or interface in java.lang">hashCode</A>, <A HREF="http://java.sun.com/javase/6/docs/api/java/lang/Object.html?is-external=true#notify()" title="class or interface in java.lang">notify</A>, <A HREF="http://java.sun.com/javase/6/docs/api/java/lang/Object.html?is-external=true#notifyAll()" title="class or interface in java.lang">notifyAll</A>, <A HREF="http://java.sun.com/javase/6/docs/api/java/lang/Object.html?is-external=true#toString()" title="class or interface in java.lang">toString</A>, <A HREF="http://java.sun.com/javase/6/docs/api/java/lang/Object.html?is-external=true#wait()" title="class or interface in java.lang">wait</A>, <A HREF="http://java.sun.com/javase/6/docs/api/java/lang/Object.html?is-external=true#wait(long)" title="class or interface in java.lang">wait</A>, <A HREF="http://java.sun.com/javase/6/docs/api/java/lang/Object.html?is-external=true#wait(long, int)" title="class or interface in java.lang">wait</A></CODE></TD>
499</TR>
500</TABLE>
501&nbsp;
502<P>
503
504<!-- ========= CONSTRUCTOR DETAIL ======== -->
505
506<A NAME="constructor_detail"><!-- --></A>
507<TABLE BORDER="1" WIDTH="100%" CELLPADDING="3" CELLSPACING="0" SUMMARY="">
508<TR BGCOLOR="#CCCCFF" CLASS="TableHeadingColor">
509<TH ALIGN="left" COLSPAN="1"><FONT SIZE="+2">
510<B>Constructor Detail</B></FONT></TH>
511</TR>
512</TABLE>
513
514<A NAME="DistributedCache()"><!-- --></A><H3>
515DistributedCache</H3>
516<PRE>
517public <B>DistributedCache</B>()</PRE>
518<DL>
519</DL>
520
521<!-- ============ METHOD DETAIL ========== -->
522
523<A NAME="method_detail"><!-- --></A>
524<TABLE BORDER="1" WIDTH="100%" CELLPADDING="3" CELLSPACING="0" SUMMARY="">
525<TR BGCOLOR="#CCCCFF" CLASS="TableHeadingColor">
526<TH ALIGN="left" COLSPAN="1"><FONT SIZE="+2">
527<B>Method Detail</B></FONT></TH>
528</TR>
529</TABLE>
530
531<A NAME="getLocalCache(java.net.URI, org.apache.hadoop.conf.Configuration, org.apache.hadoop.fs.Path, org.apache.hadoop.fs.FileStatus, boolean, long, org.apache.hadoop.fs.Path)"><!-- --></A><H3>
532getLocalCache</H3>
533<PRE>
534public static <A HREF="../../../../org/apache/hadoop/fs/Path.html" title="class in org.apache.hadoop.fs">Path</A> <B>getLocalCache</B>(<A HREF="http://java.sun.com/javase/6/docs/api/java/net/URI.html?is-external=true" title="class or interface in java.net">URI</A>&nbsp;cache,
535                                 <A HREF="../../../../org/apache/hadoop/conf/Configuration.html" title="class in org.apache.hadoop.conf">Configuration</A>&nbsp;conf,
536                                 <A HREF="../../../../org/apache/hadoop/fs/Path.html" title="class in org.apache.hadoop.fs">Path</A>&nbsp;baseDir,
537                                 <A HREF="../../../../org/apache/hadoop/fs/FileStatus.html" title="class in org.apache.hadoop.fs">FileStatus</A>&nbsp;fileStatus,
538                                 boolean&nbsp;isArchive,
539                                 long&nbsp;confFileStamp,
540                                 <A HREF="../../../../org/apache/hadoop/fs/Path.html" title="class in org.apache.hadoop.fs">Path</A>&nbsp;currentWorkDir)
541                          throws <A HREF="http://java.sun.com/javase/6/docs/api/java/io/IOException.html?is-external=true" title="class or interface in java.io">IOException</A></PRE>
542<DL>
543<DD>Get the locally cached file or archive; it could either be
544 previously cached (and valid) or copy it from the <A HREF="../../../../org/apache/hadoop/fs/FileSystem.html" title="class in org.apache.hadoop.fs"><CODE>FileSystem</CODE></A> now.
545<P>
546<DD><DL>
547<DT><B>Parameters:</B><DD><CODE>cache</CODE> - the cache to be localized, this should be specified as
548 new URI(hdfs://hostname:port/absolute_path_to_file#LINKNAME). If no schema
549 or hostname:port is provided the file is assumed to be in the filesystem
550 being used in the Configuration<DD><CODE>conf</CODE> - The Confguration file which contains the filesystem<DD><CODE>baseDir</CODE> - The base cache Dir where you wnat to localize the files/archives<DD><CODE>fileStatus</CODE> - The file status on the dfs.<DD><CODE>isArchive</CODE> - if the cache is an archive or a file. In case it is an
551  archive with a .zip or .jar or .tar or .tgz or .tar.gz extension it will
552  be unzipped/unjarred/untarred automatically
553  and the directory where the archive is unzipped/unjarred/untarred is
554  returned as the Path.
555  In case of a file, the path to the file is returned<DD><CODE>confFileStamp</CODE> - this is the hdfs file modification timestamp to verify that the
556 file to be cached hasn't changed since the job started<DD><CODE>currentWorkDir</CODE> - this is the directory where you would want to create symlinks
557 for the locally cached files/archives
558<DT><B>Returns:</B><DD>the path to directory where the archives are unjarred in case of archives,
559 the path to the file where the file is copied locally
560<DT><B>Throws:</B>
561<DD><CODE><A HREF="http://java.sun.com/javase/6/docs/api/java/io/IOException.html?is-external=true" title="class or interface in java.io">IOException</A></CODE></DL>
562</DD>
563</DL>
564<HR>
565
566<A NAME="getLocalCache(java.net.URI, org.apache.hadoop.conf.Configuration, org.apache.hadoop.fs.Path, org.apache.hadoop.fs.FileStatus, boolean, long, org.apache.hadoop.fs.Path, boolean)"><!-- --></A><H3>
567getLocalCache</H3>
568<PRE>
569public static <A HREF="../../../../org/apache/hadoop/fs/Path.html" title="class in org.apache.hadoop.fs">Path</A> <B>getLocalCache</B>(<A HREF="http://java.sun.com/javase/6/docs/api/java/net/URI.html?is-external=true" title="class or interface in java.net">URI</A>&nbsp;cache,
570                                 <A HREF="../../../../org/apache/hadoop/conf/Configuration.html" title="class in org.apache.hadoop.conf">Configuration</A>&nbsp;conf,
571                                 <A HREF="../../../../org/apache/hadoop/fs/Path.html" title="class in org.apache.hadoop.fs">Path</A>&nbsp;baseDir,
572                                 <A HREF="../../../../org/apache/hadoop/fs/FileStatus.html" title="class in org.apache.hadoop.fs">FileStatus</A>&nbsp;fileStatus,
573                                 boolean&nbsp;isArchive,
574                                 long&nbsp;confFileStamp,
575                                 <A HREF="../../../../org/apache/hadoop/fs/Path.html" title="class in org.apache.hadoop.fs">Path</A>&nbsp;currentWorkDir,
576                                 boolean&nbsp;honorSymLinkConf)
577                          throws <A HREF="http://java.sun.com/javase/6/docs/api/java/io/IOException.html?is-external=true" title="class or interface in java.io">IOException</A></PRE>
578<DL>
579<DD>Get the locally cached file or archive; it could either be
580 previously cached (and valid) or copy it from the <A HREF="../../../../org/apache/hadoop/fs/FileSystem.html" title="class in org.apache.hadoop.fs"><CODE>FileSystem</CODE></A> now.
581<P>
582<DD><DL>
583<DT><B>Parameters:</B><DD><CODE>cache</CODE> - the cache to be localized, this should be specified as
584 new URI(hdfs://hostname:port/absolute_path_to_file#LINKNAME). If no schema
585 or hostname:port is provided the file is assumed to be in the filesystem
586 being used in the Configuration<DD><CODE>conf</CODE> - The Confguration file which contains the filesystem<DD><CODE>baseDir</CODE> - The base cache Dir where you wnat to localize the files/archives<DD><CODE>fileStatus</CODE> - The file status on the dfs.<DD><CODE>isArchive</CODE> - if the cache is an archive or a file. In case it is an
587  archive with a .zip or .jar or .tar or .tgz or .tar.gz extension it will
588  be unzipped/unjarred/untarred automatically
589  and the directory where the archive is unzipped/unjarred/untarred is
590  returned as the Path.
591  In case of a file, the path to the file is returned<DD><CODE>confFileStamp</CODE> - this is the hdfs file modification timestamp to verify that the
592 file to be cached hasn't changed since the job started<DD><CODE>currentWorkDir</CODE> - this is the directory where you would want to create symlinks
593 for the locally cached files/archives<DD><CODE>honorSymLinkConf</CODE> - if this is false, then the symlinks are not
594 created even if conf says so (this is required for an optimization in task
595 launches
596<DT><B>Returns:</B><DD>the path to directory where the archives are unjarred in case of archives,
597 the path to the file where the file is copied locally
598<DT><B>Throws:</B>
599<DD><CODE><A HREF="http://java.sun.com/javase/6/docs/api/java/io/IOException.html?is-external=true" title="class or interface in java.io">IOException</A></CODE></DL>
600</DD>
601</DL>
602<HR>
603
604<A NAME="getLocalCache(java.net.URI, org.apache.hadoop.conf.Configuration, org.apache.hadoop.fs.Path, boolean, long, org.apache.hadoop.fs.Path)"><!-- --></A><H3>
605getLocalCache</H3>
606<PRE>
607public static <A HREF="../../../../org/apache/hadoop/fs/Path.html" title="class in org.apache.hadoop.fs">Path</A> <B>getLocalCache</B>(<A HREF="http://java.sun.com/javase/6/docs/api/java/net/URI.html?is-external=true" title="class or interface in java.net">URI</A>&nbsp;cache,
608                                 <A HREF="../../../../org/apache/hadoop/conf/Configuration.html" title="class in org.apache.hadoop.conf">Configuration</A>&nbsp;conf,
609                                 <A HREF="../../../../org/apache/hadoop/fs/Path.html" title="class in org.apache.hadoop.fs">Path</A>&nbsp;baseDir,
610                                 boolean&nbsp;isArchive,
611                                 long&nbsp;confFileStamp,
612                                 <A HREF="../../../../org/apache/hadoop/fs/Path.html" title="class in org.apache.hadoop.fs">Path</A>&nbsp;currentWorkDir)
613                          throws <A HREF="http://java.sun.com/javase/6/docs/api/java/io/IOException.html?is-external=true" title="class or interface in java.io">IOException</A></PRE>
614<DL>
615<DD>Get the locally cached file or archive; it could either be
616 previously cached (and valid) or copy it from the <A HREF="../../../../org/apache/hadoop/fs/FileSystem.html" title="class in org.apache.hadoop.fs"><CODE>FileSystem</CODE></A> now.
617<P>
618<DD><DL>
619<DT><B>Parameters:</B><DD><CODE>cache</CODE> - the cache to be localized, this should be specified as
620 new URI(hdfs://hostname:port/absolute_path_to_file#LINKNAME). If no schema
621 or hostname:port is provided the file is assumed to be in the filesystem
622 being used in the Configuration<DD><CODE>conf</CODE> - The Confguration file which contains the filesystem<DD><CODE>baseDir</CODE> - The base cache Dir where you wnat to localize the files/archives<DD><CODE>isArchive</CODE> - if the cache is an archive or a file. In case it is an
623  archive with a .zip or .jar or .tar or .tgz or .tar.gz extension it will
624  be unzipped/unjarred/untarred automatically
625  and the directory where the archive is unzipped/unjarred/untarred
626  is returned as the Path.
627  In case of a file, the path to the file is returned<DD><CODE>confFileStamp</CODE> - this is the hdfs file modification timestamp to verify that the
628 file to be cached hasn't changed since the job started<DD><CODE>currentWorkDir</CODE> - this is the directory where you would want to create symlinks
629 for the locally cached files/archives
630<DT><B>Returns:</B><DD>the path to directory where the archives are unjarred in case of archives,
631 the path to the file where the file is copied locally
632<DT><B>Throws:</B>
633<DD><CODE><A HREF="http://java.sun.com/javase/6/docs/api/java/io/IOException.html?is-external=true" title="class or interface in java.io">IOException</A></CODE></DL>
634</DD>
635</DL>
636<HR>
637
638<A NAME="releaseCache(java.net.URI, org.apache.hadoop.conf.Configuration)"><!-- --></A><H3>
639releaseCache</H3>
640<PRE>
641public static void <B>releaseCache</B>(<A HREF="http://java.sun.com/javase/6/docs/api/java/net/URI.html?is-external=true" title="class or interface in java.net">URI</A>&nbsp;cache,
642                                <A HREF="../../../../org/apache/hadoop/conf/Configuration.html" title="class in org.apache.hadoop.conf">Configuration</A>&nbsp;conf)
643                         throws <A HREF="http://java.sun.com/javase/6/docs/api/java/io/IOException.html?is-external=true" title="class or interface in java.io">IOException</A></PRE>
644<DL>
645<DD>This is the opposite of getlocalcache. When you are done with
646 using the cache, you need to release the cache
647<P>
648<DD><DL>
649<DT><B>Parameters:</B><DD><CODE>cache</CODE> - The cache URI to be released<DD><CODE>conf</CODE> - configuration which contains the filesystem the cache
650 is contained in.
651<DT><B>Throws:</B>
652<DD><CODE><A HREF="http://java.sun.com/javase/6/docs/api/java/io/IOException.html?is-external=true" title="class or interface in java.io">IOException</A></CODE></DL>
653</DD>
654</DL>
655<HR>
656
657<A NAME="makeRelative(java.net.URI, org.apache.hadoop.conf.Configuration)"><!-- --></A><H3>
658makeRelative</H3>
659<PRE>
660public static <A HREF="http://java.sun.com/javase/6/docs/api/java/lang/String.html?is-external=true" title="class or interface in java.lang">String</A> <B>makeRelative</B>(<A HREF="http://java.sun.com/javase/6/docs/api/java/net/URI.html?is-external=true" title="class or interface in java.net">URI</A>&nbsp;cache,
661                                  <A HREF="../../../../org/apache/hadoop/conf/Configuration.html" title="class in org.apache.hadoop.conf">Configuration</A>&nbsp;conf)
662                           throws <A HREF="http://java.sun.com/javase/6/docs/api/java/io/IOException.html?is-external=true" title="class or interface in java.io">IOException</A></PRE>
663<DL>
664<DD><DL>
665
666<DT><B>Throws:</B>
667<DD><CODE><A HREF="http://java.sun.com/javase/6/docs/api/java/io/IOException.html?is-external=true" title="class or interface in java.io">IOException</A></CODE></DL>
668</DD>
669</DL>
670<HR>
671
672<A NAME="getTimestamp(org.apache.hadoop.conf.Configuration, java.net.URI)"><!-- --></A><H3>
673getTimestamp</H3>
674<PRE>
675public static long <B>getTimestamp</B>(<A HREF="../../../../org/apache/hadoop/conf/Configuration.html" title="class in org.apache.hadoop.conf">Configuration</A>&nbsp;conf,
676                                <A HREF="http://java.sun.com/javase/6/docs/api/java/net/URI.html?is-external=true" title="class or interface in java.net">URI</A>&nbsp;cache)
677                         throws <A HREF="http://java.sun.com/javase/6/docs/api/java/io/IOException.html?is-external=true" title="class or interface in java.io">IOException</A></PRE>
678<DL>
679<DD>Returns mtime of a given cache file on hdfs.
680<P>
681<DD><DL>
682<DT><B>Parameters:</B><DD><CODE>conf</CODE> - configuration<DD><CODE>cache</CODE> - cache file
683<DT><B>Returns:</B><DD>mtime of a given cache file on hdfs
684<DT><B>Throws:</B>
685<DD><CODE><A HREF="http://java.sun.com/javase/6/docs/api/java/io/IOException.html?is-external=true" title="class or interface in java.io">IOException</A></CODE></DL>
686</DD>
687</DL>
688<HR>
689
690<A NAME="createAllSymlink(org.apache.hadoop.conf.Configuration, java.io.File, java.io.File)"><!-- --></A><H3>
691createAllSymlink</H3>
692<PRE>
693public static void <B>createAllSymlink</B>(<A HREF="../../../../org/apache/hadoop/conf/Configuration.html" title="class in org.apache.hadoop.conf">Configuration</A>&nbsp;conf,
694                                    <A HREF="http://java.sun.com/javase/6/docs/api/java/io/File.html?is-external=true" title="class or interface in java.io">File</A>&nbsp;jobCacheDir,
695                                    <A HREF="http://java.sun.com/javase/6/docs/api/java/io/File.html?is-external=true" title="class or interface in java.io">File</A>&nbsp;workDir)
696                             throws <A HREF="http://java.sun.com/javase/6/docs/api/java/io/IOException.html?is-external=true" title="class or interface in java.io">IOException</A></PRE>
697<DL>
698<DD>This method create symlinks for all files in a given dir in another directory
699<P>
700<DD><DL>
701<DT><B>Parameters:</B><DD><CODE>conf</CODE> - the configuration<DD><CODE>jobCacheDir</CODE> - the target directory for creating symlinks<DD><CODE>workDir</CODE> - the directory in which the symlinks are created
702<DT><B>Throws:</B>
703<DD><CODE><A HREF="http://java.sun.com/javase/6/docs/api/java/io/IOException.html?is-external=true" title="class or interface in java.io">IOException</A></CODE></DL>
704</DD>
705</DL>
706<HR>
707
708<A NAME="setCacheArchives(java.net.URI[], org.apache.hadoop.conf.Configuration)"><!-- --></A><H3>
709setCacheArchives</H3>
710<PRE>
711public static void <B>setCacheArchives</B>(<A HREF="http://java.sun.com/javase/6/docs/api/java/net/URI.html?is-external=true" title="class or interface in java.net">URI</A>[]&nbsp;archives,
712                                    <A HREF="../../../../org/apache/hadoop/conf/Configuration.html" title="class in org.apache.hadoop.conf">Configuration</A>&nbsp;conf)</PRE>
713<DL>
714<DD>Set the configuration with the given set of archives
715<P>
716<DD><DL>
717<DT><B>Parameters:</B><DD><CODE>archives</CODE> - The list of archives that need to be localized<DD><CODE>conf</CODE> - Configuration which will be changed</DL>
718</DD>
719</DL>
720<HR>
721
722<A NAME="setCacheFiles(java.net.URI[], org.apache.hadoop.conf.Configuration)"><!-- --></A><H3>
723setCacheFiles</H3>
724<PRE>
725public static void <B>setCacheFiles</B>(<A HREF="http://java.sun.com/javase/6/docs/api/java/net/URI.html?is-external=true" title="class or interface in java.net">URI</A>[]&nbsp;files,
726                                 <A HREF="../../../../org/apache/hadoop/conf/Configuration.html" title="class in org.apache.hadoop.conf">Configuration</A>&nbsp;conf)</PRE>
727<DL>
728<DD>Set the configuration with the given set of files
729<P>
730<DD><DL>
731<DT><B>Parameters:</B><DD><CODE>files</CODE> - The list of files that need to be localized<DD><CODE>conf</CODE> - Configuration which will be changed</DL>
732</DD>
733</DL>
734<HR>
735
736<A NAME="getCacheArchives(org.apache.hadoop.conf.Configuration)"><!-- --></A><H3>
737getCacheArchives</H3>
738<PRE>
739public static <A HREF="http://java.sun.com/javase/6/docs/api/java/net/URI.html?is-external=true" title="class or interface in java.net">URI</A>[] <B>getCacheArchives</B>(<A HREF="../../../../org/apache/hadoop/conf/Configuration.html" title="class in org.apache.hadoop.conf">Configuration</A>&nbsp;conf)
740                              throws <A HREF="http://java.sun.com/javase/6/docs/api/java/io/IOException.html?is-external=true" title="class or interface in java.io">IOException</A></PRE>
741<DL>
742<DD>Get cache archives set in the Configuration
743<P>
744<DD><DL>
745<DT><B>Parameters:</B><DD><CODE>conf</CODE> - The configuration which contains the archives
746<DT><B>Returns:</B><DD>A URI array of the caches set in the Configuration
747<DT><B>Throws:</B>
748<DD><CODE><A HREF="http://java.sun.com/javase/6/docs/api/java/io/IOException.html?is-external=true" title="class or interface in java.io">IOException</A></CODE></DL>
749</DD>
750</DL>
751<HR>
752
753<A NAME="getCacheFiles(org.apache.hadoop.conf.Configuration)"><!-- --></A><H3>
754getCacheFiles</H3>
755<PRE>
756public static <A HREF="http://java.sun.com/javase/6/docs/api/java/net/URI.html?is-external=true" title="class or interface in java.net">URI</A>[] <B>getCacheFiles</B>(<A HREF="../../../../org/apache/hadoop/conf/Configuration.html" title="class in org.apache.hadoop.conf">Configuration</A>&nbsp;conf)
757                           throws <A HREF="http://java.sun.com/javase/6/docs/api/java/io/IOException.html?is-external=true" title="class or interface in java.io">IOException</A></PRE>
758<DL>
759<DD>Get cache files set in the Configuration
760<P>
761<DD><DL>
762<DT><B>Parameters:</B><DD><CODE>conf</CODE> - The configuration which contains the files
763<DT><B>Returns:</B><DD>A URI array of the files set in the Configuration
764<DT><B>Throws:</B>
765<DD><CODE><A HREF="http://java.sun.com/javase/6/docs/api/java/io/IOException.html?is-external=true" title="class or interface in java.io">IOException</A></CODE></DL>
766</DD>
767</DL>
768<HR>
769
770<A NAME="getLocalCacheArchives(org.apache.hadoop.conf.Configuration)"><!-- --></A><H3>
771getLocalCacheArchives</H3>
772<PRE>
773public static <A HREF="../../../../org/apache/hadoop/fs/Path.html" title="class in org.apache.hadoop.fs">Path</A>[] <B>getLocalCacheArchives</B>(<A HREF="../../../../org/apache/hadoop/conf/Configuration.html" title="class in org.apache.hadoop.conf">Configuration</A>&nbsp;conf)
774                                    throws <A HREF="http://java.sun.com/javase/6/docs/api/java/io/IOException.html?is-external=true" title="class or interface in java.io">IOException</A></PRE>
775<DL>
776<DD>Return the path array of the localized caches
777<P>
778<DD><DL>
779<DT><B>Parameters:</B><DD><CODE>conf</CODE> - Configuration that contains the localized archives
780<DT><B>Returns:</B><DD>A path array of localized caches
781<DT><B>Throws:</B>
782<DD><CODE><A HREF="http://java.sun.com/javase/6/docs/api/java/io/IOException.html?is-external=true" title="class or interface in java.io">IOException</A></CODE></DL>
783</DD>
784</DL>
785<HR>
786
787<A NAME="getLocalCacheFiles(org.apache.hadoop.conf.Configuration)"><!-- --></A><H3>
788getLocalCacheFiles</H3>
789<PRE>
790public static <A HREF="../../../../org/apache/hadoop/fs/Path.html" title="class in org.apache.hadoop.fs">Path</A>[] <B>getLocalCacheFiles</B>(<A HREF="../../../../org/apache/hadoop/conf/Configuration.html" title="class in org.apache.hadoop.conf">Configuration</A>&nbsp;conf)
791                                 throws <A HREF="http://java.sun.com/javase/6/docs/api/java/io/IOException.html?is-external=true" title="class or interface in java.io">IOException</A></PRE>
792<DL>
793<DD>Return the path array of the localized files
794<P>
795<DD><DL>
796<DT><B>Parameters:</B><DD><CODE>conf</CODE> - Configuration that contains the localized files
797<DT><B>Returns:</B><DD>A path array of localized files
798<DT><B>Throws:</B>
799<DD><CODE><A HREF="http://java.sun.com/javase/6/docs/api/java/io/IOException.html?is-external=true" title="class or interface in java.io">IOException</A></CODE></DL>
800</DD>
801</DL>
802<HR>
803
804<A NAME="getArchiveTimestamps(org.apache.hadoop.conf.Configuration)"><!-- --></A><H3>
805getArchiveTimestamps</H3>
806<PRE>
807public static <A HREF="http://java.sun.com/javase/6/docs/api/java/lang/String.html?is-external=true" title="class or interface in java.lang">String</A>[] <B>getArchiveTimestamps</B>(<A HREF="../../../../org/apache/hadoop/conf/Configuration.html" title="class in org.apache.hadoop.conf">Configuration</A>&nbsp;conf)</PRE>
808<DL>
809<DD>Get the timestamps of the archives
810<P>
811<DD><DL>
812<DT><B>Parameters:</B><DD><CODE>conf</CODE> - The configuration which stored the timestamps
813<DT><B>Returns:</B><DD>a string array of timestamps
814<DT><B>Throws:</B>
815<DD><CODE><A HREF="http://java.sun.com/javase/6/docs/api/java/io/IOException.html?is-external=true" title="class or interface in java.io">IOException</A></CODE></DL>
816</DD>
817</DL>
818<HR>
819
820<A NAME="getFileTimestamps(org.apache.hadoop.conf.Configuration)"><!-- --></A><H3>
821getFileTimestamps</H3>
822<PRE>
823public static <A HREF="http://java.sun.com/javase/6/docs/api/java/lang/String.html?is-external=true" title="class or interface in java.lang">String</A>[] <B>getFileTimestamps</B>(<A HREF="../../../../org/apache/hadoop/conf/Configuration.html" title="class in org.apache.hadoop.conf">Configuration</A>&nbsp;conf)</PRE>
824<DL>
825<DD>Get the timestamps of the files
826<P>
827<DD><DL>
828<DT><B>Parameters:</B><DD><CODE>conf</CODE> - The configuration which stored the timestamps
829<DT><B>Returns:</B><DD>a string array of timestamps
830<DT><B>Throws:</B>
831<DD><CODE><A HREF="http://java.sun.com/javase/6/docs/api/java/io/IOException.html?is-external=true" title="class or interface in java.io">IOException</A></CODE></DL>
832</DD>
833</DL>
834<HR>
835
836<A NAME="setArchiveTimestamps(org.apache.hadoop.conf.Configuration, java.lang.String)"><!-- --></A><H3>
837setArchiveTimestamps</H3>
838<PRE>
839public static void <B>setArchiveTimestamps</B>(<A HREF="../../../../org/apache/hadoop/conf/Configuration.html" title="class in org.apache.hadoop.conf">Configuration</A>&nbsp;conf,
840                                        <A HREF="http://java.sun.com/javase/6/docs/api/java/lang/String.html?is-external=true" title="class or interface in java.lang">String</A>&nbsp;timestamps)</PRE>
841<DL>
842<DD>This is to check the timestamp of the archives to be localized
843<P>
844<DD><DL>
845<DT><B>Parameters:</B><DD><CODE>conf</CODE> - Configuration which stores the timestamp's<DD><CODE>timestamps</CODE> - comma separated list of timestamps of archives.
846 The order should be the same as the order in which the archives are added.</DL>
847</DD>
848</DL>
849<HR>
850
851<A NAME="setFileTimestamps(org.apache.hadoop.conf.Configuration, java.lang.String)"><!-- --></A><H3>
852setFileTimestamps</H3>
853<PRE>
854public static void <B>setFileTimestamps</B>(<A HREF="../../../../org/apache/hadoop/conf/Configuration.html" title="class in org.apache.hadoop.conf">Configuration</A>&nbsp;conf,
855                                     <A HREF="http://java.sun.com/javase/6/docs/api/java/lang/String.html?is-external=true" title="class or interface in java.lang">String</A>&nbsp;timestamps)</PRE>
856<DL>
857<DD>This is to check the timestamp of the files to be localized
858<P>
859<DD><DL>
860<DT><B>Parameters:</B><DD><CODE>conf</CODE> - Configuration which stores the timestamp's<DD><CODE>timestamps</CODE> - comma separated list of timestamps of files.
861 The order should be the same as the order in which the files are added.</DL>
862</DD>
863</DL>
864<HR>
865
866<A NAME="setLocalArchives(org.apache.hadoop.conf.Configuration, java.lang.String)"><!-- --></A><H3>
867setLocalArchives</H3>
868<PRE>
869public static void <B>setLocalArchives</B>(<A HREF="../../../../org/apache/hadoop/conf/Configuration.html" title="class in org.apache.hadoop.conf">Configuration</A>&nbsp;conf,
870                                    <A HREF="http://java.sun.com/javase/6/docs/api/java/lang/String.html?is-external=true" title="class or interface in java.lang">String</A>&nbsp;str)</PRE>
871<DL>
872<DD>Set the conf to contain the location for localized archives
873<P>
874<DD><DL>
875<DT><B>Parameters:</B><DD><CODE>conf</CODE> - The conf to modify to contain the localized caches<DD><CODE>str</CODE> - a comma separated list of local archives</DL>
876</DD>
877</DL>
878<HR>
879
880<A NAME="setLocalFiles(org.apache.hadoop.conf.Configuration, java.lang.String)"><!-- --></A><H3>
881setLocalFiles</H3>
882<PRE>
883public static void <B>setLocalFiles</B>(<A HREF="../../../../org/apache/hadoop/conf/Configuration.html" title="class in org.apache.hadoop.conf">Configuration</A>&nbsp;conf,
884                                 <A HREF="http://java.sun.com/javase/6/docs/api/java/lang/String.html?is-external=true" title="class or interface in java.lang">String</A>&nbsp;str)</PRE>
885<DL>
886<DD>Set the conf to contain the location for localized files
887<P>
888<DD><DL>
889<DT><B>Parameters:</B><DD><CODE>conf</CODE> - The conf to modify to contain the localized caches<DD><CODE>str</CODE> - a comma separated list of local files</DL>
890</DD>
891</DL>
892<HR>
893
894<A NAME="addCacheArchive(java.net.URI, org.apache.hadoop.conf.Configuration)"><!-- --></A><H3>
895addCacheArchive</H3>
896<PRE>
897public static void <B>addCacheArchive</B>(<A HREF="http://java.sun.com/javase/6/docs/api/java/net/URI.html?is-external=true" title="class or interface in java.net">URI</A>&nbsp;uri,
898                                   <A HREF="../../../../org/apache/hadoop/conf/Configuration.html" title="class in org.apache.hadoop.conf">Configuration</A>&nbsp;conf)</PRE>
899<DL>
900<DD>Add a archives to be localized to the conf
901<P>
902<DD><DL>
903<DT><B>Parameters:</B><DD><CODE>uri</CODE> - The uri of the cache to be localized<DD><CODE>conf</CODE> - Configuration to add the cache to</DL>
904</DD>
905</DL>
906<HR>
907
908<A NAME="addCacheFile(java.net.URI, org.apache.hadoop.conf.Configuration)"><!-- --></A><H3>
909addCacheFile</H3>
910<PRE>
911public static void <B>addCacheFile</B>(<A HREF="http://java.sun.com/javase/6/docs/api/java/net/URI.html?is-external=true" title="class or interface in java.net">URI</A>&nbsp;uri,
912                                <A HREF="../../../../org/apache/hadoop/conf/Configuration.html" title="class in org.apache.hadoop.conf">Configuration</A>&nbsp;conf)</PRE>
913<DL>
914<DD>Add a file to be localized to the conf
915<P>
916<DD><DL>
917<DT><B>Parameters:</B><DD><CODE>uri</CODE> - The uri of the cache to be localized<DD><CODE>conf</CODE> - Configuration to add the cache to</DL>
918</DD>
919</DL>
920<HR>
921
922<A NAME="addFileToClassPath(org.apache.hadoop.fs.Path, org.apache.hadoop.conf.Configuration)"><!-- --></A><H3>
923addFileToClassPath</H3>
924<PRE>
925public static void <B>addFileToClassPath</B>(<A HREF="../../../../org/apache/hadoop/fs/Path.html" title="class in org.apache.hadoop.fs">Path</A>&nbsp;file,
926                                      <A HREF="../../../../org/apache/hadoop/conf/Configuration.html" title="class in org.apache.hadoop.conf">Configuration</A>&nbsp;conf)
927                               throws <A HREF="http://java.sun.com/javase/6/docs/api/java/io/IOException.html?is-external=true" title="class or interface in java.io">IOException</A></PRE>
928<DL>
929<DD>Add an file path to the current set of classpath entries It adds the file
930 to cache as well.
931<P>
932<DD><DL>
933<DT><B>Parameters:</B><DD><CODE>file</CODE> - Path of the file to be added<DD><CODE>conf</CODE> - Configuration that contains the classpath setting
934<DT><B>Throws:</B>
935<DD><CODE><A HREF="http://java.sun.com/javase/6/docs/api/java/io/IOException.html?is-external=true" title="class or interface in java.io">IOException</A></CODE></DL>
936</DD>
937</DL>
938<HR>
939
940<A NAME="getFileClassPaths(org.apache.hadoop.conf.Configuration)"><!-- --></A><H3>
941getFileClassPaths</H3>
942<PRE>
943public static <A HREF="../../../../org/apache/hadoop/fs/Path.html" title="class in org.apache.hadoop.fs">Path</A>[] <B>getFileClassPaths</B>(<A HREF="../../../../org/apache/hadoop/conf/Configuration.html" title="class in org.apache.hadoop.conf">Configuration</A>&nbsp;conf)</PRE>
944<DL>
945<DD>Get the file entries in classpath as an array of Path
946<P>
947<DD><DL>
948<DT><B>Parameters:</B><DD><CODE>conf</CODE> - Configuration that contains the classpath setting</DL>
949</DD>
950</DL>
951<HR>
952
953<A NAME="addArchiveToClassPath(org.apache.hadoop.fs.Path, org.apache.hadoop.conf.Configuration)"><!-- --></A><H3>
954addArchiveToClassPath</H3>
955<PRE>
956public static void <B>addArchiveToClassPath</B>(<A HREF="../../../../org/apache/hadoop/fs/Path.html" title="class in org.apache.hadoop.fs">Path</A>&nbsp;archive,
957                                         <A HREF="../../../../org/apache/hadoop/conf/Configuration.html" title="class in org.apache.hadoop.conf">Configuration</A>&nbsp;conf)
958                                  throws <A HREF="http://java.sun.com/javase/6/docs/api/java/io/IOException.html?is-external=true" title="class or interface in java.io">IOException</A></PRE>
959<DL>
960<DD>Add an archive path to the current set of classpath entries. It adds the
961 archive to cache as well.
962<P>
963<DD><DL>
964<DT><B>Parameters:</B><DD><CODE>archive</CODE> - Path of the archive to be added<DD><CODE>conf</CODE> - Configuration that contains the classpath setting
965<DT><B>Throws:</B>
966<DD><CODE><A HREF="http://java.sun.com/javase/6/docs/api/java/io/IOException.html?is-external=true" title="class or interface in java.io">IOException</A></CODE></DL>
967</DD>
968</DL>
969<HR>
970
971<A NAME="getArchiveClassPaths(org.apache.hadoop.conf.Configuration)"><!-- --></A><H3>
972getArchiveClassPaths</H3>
973<PRE>
974public static <A HREF="../../../../org/apache/hadoop/fs/Path.html" title="class in org.apache.hadoop.fs">Path</A>[] <B>getArchiveClassPaths</B>(<A HREF="../../../../org/apache/hadoop/conf/Configuration.html" title="class in org.apache.hadoop.conf">Configuration</A>&nbsp;conf)</PRE>
975<DL>
976<DD>Get the archive entries in classpath as an array of Path
977<P>
978<DD><DL>
979<DT><B>Parameters:</B><DD><CODE>conf</CODE> - Configuration that contains the classpath setting</DL>
980</DD>
981</DL>
982<HR>
983
984<A NAME="createSymlink(org.apache.hadoop.conf.Configuration)"><!-- --></A><H3>
985createSymlink</H3>
986<PRE>
987public static void <B>createSymlink</B>(<A HREF="../../../../org/apache/hadoop/conf/Configuration.html" title="class in org.apache.hadoop.conf">Configuration</A>&nbsp;conf)</PRE>
988<DL>
989<DD>This method allows you to create symlinks in the current working directory
990 of the task to all the cache files/archives
991<P>
992<DD><DL>
993<DT><B>Parameters:</B><DD><CODE>conf</CODE> - the jobconf</DL>
994</DD>
995</DL>
996<HR>
997
998<A NAME="getSymlink(org.apache.hadoop.conf.Configuration)"><!-- --></A><H3>
999getSymlink</H3>
1000<PRE>
1001public static boolean <B>getSymlink</B>(<A HREF="../../../../org/apache/hadoop/conf/Configuration.html" title="class in org.apache.hadoop.conf">Configuration</A>&nbsp;conf)</PRE>
1002<DL>
1003<DD>This method checks to see if symlinks are to be create for the
1004 localized cache files in the current working directory
1005<P>
1006<DD><DL>
1007<DT><B>Parameters:</B><DD><CODE>conf</CODE> - the jobconf
1008<DT><B>Returns:</B><DD>true if symlinks are to be created- else return false</DL>
1009</DD>
1010</DL>
1011<HR>
1012
1013<A NAME="checkURIs(java.net.URI[], java.net.URI[])"><!-- --></A><H3>
1014checkURIs</H3>
1015<PRE>
1016public static boolean <B>checkURIs</B>(<A HREF="http://java.sun.com/javase/6/docs/api/java/net/URI.html?is-external=true" title="class or interface in java.net">URI</A>[]&nbsp;uriFiles,
1017                                <A HREF="http://java.sun.com/javase/6/docs/api/java/net/URI.html?is-external=true" title="class or interface in java.net">URI</A>[]&nbsp;uriArchives)</PRE>
1018<DL>
1019<DD>This method checks if there is a conflict in the fragment names
1020 of the uris. Also makes sure that each uri has a fragment. It
1021 is only to be called if you want to create symlinks for
1022 the various archives and files.
1023<P>
1024<DD><DL>
1025<DT><B>Parameters:</B><DD><CODE>uriFiles</CODE> - The uri array of urifiles<DD><CODE>uriArchives</CODE> - the uri array of uri archives</DL>
1026</DD>
1027</DL>
1028<HR>
1029
1030<A NAME="purgeCache(org.apache.hadoop.conf.Configuration)"><!-- --></A><H3>
1031purgeCache</H3>
1032<PRE>
1033public static void <B>purgeCache</B>(<A HREF="../../../../org/apache/hadoop/conf/Configuration.html" title="class in org.apache.hadoop.conf">Configuration</A>&nbsp;conf)
1034                       throws <A HREF="http://java.sun.com/javase/6/docs/api/java/io/IOException.html?is-external=true" title="class or interface in java.io">IOException</A></PRE>
1035<DL>
1036<DD>Clear the entire contents of the cache and delete the backing files. This
1037 should only be used when the server is reinitializing, because the users
1038 are going to lose their files.
1039<P>
1040<DD><DL>
1041
1042<DT><B>Throws:</B>
1043<DD><CODE><A HREF="http://java.sun.com/javase/6/docs/api/java/io/IOException.html?is-external=true" title="class or interface in java.io">IOException</A></CODE></DL>
1044</DD>
1045</DL>
1046<!-- ========= END OF CLASS DATA ========= -->
1047<HR>
1048
1049
1050<!-- ======= START OF BOTTOM NAVBAR ====== -->
1051<A NAME="navbar_bottom"><!-- --></A>
1052<A HREF="#skip-navbar_bottom" title="Skip navigation links"></A>
1053<TABLE BORDER="0" WIDTH="100%" CELLPADDING="1" CELLSPACING="0" SUMMARY="">
1054<TR>
1055<TD COLSPAN=2 BGCOLOR="#EEEEFF" CLASS="NavBarCell1">
1056<A NAME="navbar_bottom_firstrow"><!-- --></A>
1057<TABLE BORDER="0" CELLPADDING="0" CELLSPACING="3" SUMMARY="">
1058  <TR ALIGN="center" VALIGN="top">
1059  <TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1">    <A HREF="../../../../overview-summary.html"><FONT CLASS="NavBarFont1"><B>Overview</B></FONT></A>&nbsp;</TD>
1060  <TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1">    <A HREF="package-summary.html"><FONT CLASS="NavBarFont1"><B>Package</B></FONT></A>&nbsp;</TD>
1061  <TD BGCOLOR="#FFFFFF" CLASS="NavBarCell1Rev"> &nbsp;<FONT CLASS="NavBarFont1Rev"><B>Class</B></FONT>&nbsp;</TD>
1062  <TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1">    <A HREF="class-use/DistributedCache.html"><FONT CLASS="NavBarFont1"><B>Use</B></FONT></A>&nbsp;</TD>
1063  <TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1">    <A HREF="package-tree.html"><FONT CLASS="NavBarFont1"><B>Tree</B></FONT></A>&nbsp;</TD>
1064  <TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1">    <A HREF="../../../../deprecated-list.html"><FONT CLASS="NavBarFont1"><B>Deprecated</B></FONT></A>&nbsp;</TD>
1065  <TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1">    <A HREF="../../../../index-all.html"><FONT CLASS="NavBarFont1"><B>Index</B></FONT></A>&nbsp;</TD>
1066  <TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1">    <A HREF="../../../../help-doc.html"><FONT CLASS="NavBarFont1"><B>Help</B></FONT></A>&nbsp;</TD>
1067  </TR>
1068</TABLE>
1069</TD>
1070<TD ALIGN="right" VALIGN="top" ROWSPAN=3><EM>
1071</EM>
1072</TD>
1073</TR>
1074
1075<TR>
1076<TD BGCOLOR="white" CLASS="NavBarCell2"><FONT SIZE="-2">
1077&nbsp;PREV CLASS&nbsp;
1078&nbsp;NEXT CLASS</FONT></TD>
1079<TD BGCOLOR="white" CLASS="NavBarCell2"><FONT SIZE="-2">
1080  <A HREF="../../../../index.html?org/apache/hadoop/filecache/DistributedCache.html" target="_top"><B>FRAMES</B></A>  &nbsp;
1081&nbsp;<A HREF="DistributedCache.html" target="_top"><B>NO FRAMES</B></A>  &nbsp;
1082&nbsp;<SCRIPT type="text/javascript">
1083  <!--
1084  if(window==top) {
1085    document.writeln('<A HREF="../../../../allclasses-noframe.html"><B>All Classes</B></A>');
1086  }
1087  //-->
1088</SCRIPT>
1089<NOSCRIPT>
1090  <A HREF="../../../../allclasses-noframe.html"><B>All Classes</B></A>
1091</NOSCRIPT>
1092
1093
1094</FONT></TD>
1095</TR>
1096<TR>
1097<TD VALIGN="top" CLASS="NavBarCell3"><FONT SIZE="-2">
1098  SUMMARY:&nbsp;NESTED&nbsp;|&nbsp;FIELD&nbsp;|&nbsp;<A HREF="#constructor_summary">CONSTR</A>&nbsp;|&nbsp;<A HREF="#method_summary">METHOD</A></FONT></TD>
1099<TD VALIGN="top" CLASS="NavBarCell3"><FONT SIZE="-2">
1100DETAIL:&nbsp;FIELD&nbsp;|&nbsp;<A HREF="#constructor_detail">CONSTR</A>&nbsp;|&nbsp;<A HREF="#method_detail">METHOD</A></FONT></TD>
1101</TR>
1102</TABLE>
1103<A NAME="skip-navbar_bottom"></A>
1104<!-- ======== END OF BOTTOM NAVBAR ======= -->
1105
1106<HR>
1107Copyright &copy; 2009 The Apache Software Foundation
1108</BODY>
1109</HTML>
Note: See TracBrowser for help on using the repository browser.