source: proiecte/HadoopJUnit/hadoop-0.20.1/docs/api/org/apache/hadoop/io/MapFile.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: 24.1 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:52 UTC 2009 -->
6<TITLE>
7MapFile (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="MapFile (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/MapFile.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;<A HREF="../../../../org/apache/hadoop/io/LongWritable.DecreasingComparator.html" title="class in org.apache.hadoop.io"><B>PREV CLASS</B></A>&nbsp;
59&nbsp;<A HREF="../../../../org/apache/hadoop/io/MapFile.Reader.html" title="class in org.apache.hadoop.io"><B>NEXT CLASS</B></A></FONT></TD>
60<TD BGCOLOR="white" CLASS="NavBarCell2"><FONT SIZE="-2">
61  <A HREF="../../../../index.html?org/apache/hadoop/io/MapFile.html" target="_top"><B>FRAMES</B></A>  &nbsp;
62&nbsp;<A HREF="MapFile.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;<A HREF="#nested_class_summary">NESTED</A>&nbsp;|&nbsp;<A HREF="#field_summary">FIELD</A>&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;<A HREF="#field_detail">FIELD</A>&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.io</FONT>
92<BR>
93Class MapFile</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.io.MapFile</B>
97</PRE>
98<DL>
99<DT><B>Direct Known Subclasses:</B> <DD><A HREF="../../../../org/apache/hadoop/io/ArrayFile.html" title="class in org.apache.hadoop.io">ArrayFile</A>, <A HREF="../../../../org/apache/hadoop/io/SetFile.html" title="class in org.apache.hadoop.io">SetFile</A></DD>
100</DL>
101<HR>
102<DL>
103<DT><PRE>public class <B>MapFile</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>
104</PRE>
105
106<P>
107A file-based map from keys to values.
108 
109 <p>A map is a directory containing two files, the <code>data</code> file,
110 containing all keys and values in the map, and a smaller <code>index</code>
111 file, containing a fraction of the keys.  The fraction is determined by
112 <A HREF="../../../../org/apache/hadoop/io/MapFile.Writer.html#getIndexInterval()"><CODE>MapFile.Writer.getIndexInterval()</CODE></A>.
113
114 <p>The index file is read entirely into memory.  Thus key implementations
115 should try to keep themselves small.
116
117 <p>Map files are created by adding entries in-order.  To maintain a large
118 database, perform updates by copying the previous version of a database and
119 merging in a sorted change list, to create a new version of the database in
120 a new file.  Sorting large change lists can be done with <A HREF="../../../../org/apache/hadoop/io/SequenceFile.Sorter.html" title="class in org.apache.hadoop.io"><CODE>SequenceFile.Sorter</CODE></A>.
121<P>
122
123<P>
124<HR>
125
126<P>
127<!-- ======== NESTED CLASS SUMMARY ======== -->
128
129<A NAME="nested_class_summary"><!-- --></A>
130<TABLE BORDER="1" WIDTH="100%" CELLPADDING="3" CELLSPACING="0" SUMMARY="">
131<TR BGCOLOR="#CCCCFF" CLASS="TableHeadingColor">
132<TH ALIGN="left" COLSPAN="2"><FONT SIZE="+2">
133<B>Nested Class Summary</B></FONT></TH>
134</TR>
135<TR BGCOLOR="white" CLASS="TableRowColor">
136<TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1">
137<CODE>static&nbsp;class</CODE></FONT></TD>
138<TD><CODE><B><A HREF="../../../../org/apache/hadoop/io/MapFile.Reader.html" title="class in org.apache.hadoop.io">MapFile.Reader</A></B></CODE>
139
140<BR>
141&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;Provide access to an existing map.</TD>
142</TR>
143<TR BGCOLOR="white" CLASS="TableRowColor">
144<TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1">
145<CODE>static&nbsp;class</CODE></FONT></TD>
146<TD><CODE><B><A HREF="../../../../org/apache/hadoop/io/MapFile.Writer.html" title="class in org.apache.hadoop.io">MapFile.Writer</A></B></CODE>
147
148<BR>
149&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;Writes a new map.</TD>
150</TR>
151</TABLE>
152&nbsp;<!-- =========== FIELD SUMMARY =========== -->
153
154<A NAME="field_summary"><!-- --></A>
155<TABLE BORDER="1" WIDTH="100%" CELLPADDING="3" CELLSPACING="0" SUMMARY="">
156<TR BGCOLOR="#CCCCFF" CLASS="TableHeadingColor">
157<TH ALIGN="left" COLSPAN="2"><FONT SIZE="+2">
158<B>Field Summary</B></FONT></TH>
159</TR>
160<TR BGCOLOR="white" CLASS="TableRowColor">
161<TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1">
162<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>
163<TD><CODE><B><A HREF="../../../../org/apache/hadoop/io/MapFile.html#DATA_FILE_NAME">DATA_FILE_NAME</A></B></CODE>
164
165<BR>
166&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;The name of the data file.</TD>
167</TR>
168<TR BGCOLOR="white" CLASS="TableRowColor">
169<TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1">
170<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>
171<TD><CODE><B><A HREF="../../../../org/apache/hadoop/io/MapFile.html#INDEX_FILE_NAME">INDEX_FILE_NAME</A></B></CODE>
172
173<BR>
174&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;The name of the index file.</TD>
175</TR>
176</TABLE>
177&nbsp;
178<!-- ======== CONSTRUCTOR SUMMARY ======== -->
179
180<A NAME="constructor_summary"><!-- --></A>
181<TABLE BORDER="1" WIDTH="100%" CELLPADDING="3" CELLSPACING="0" SUMMARY="">
182<TR BGCOLOR="#CCCCFF" CLASS="TableHeadingColor">
183<TH ALIGN="left" COLSPAN="2"><FONT SIZE="+2">
184<B>Constructor Summary</B></FONT></TH>
185</TR>
186<TR BGCOLOR="white" CLASS="TableRowColor">
187<TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1">
188<CODE>protected </CODE></FONT></TD>
189<TD><CODE><B><A HREF="../../../../org/apache/hadoop/io/MapFile.html#MapFile()">MapFile</A></B>()</CODE>
190
191<BR>
192&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;</TD>
193</TR>
194</TABLE>
195&nbsp;
196<!-- ========== METHOD SUMMARY =========== -->
197
198<A NAME="method_summary"><!-- --></A>
199<TABLE BORDER="1" WIDTH="100%" CELLPADDING="3" CELLSPACING="0" SUMMARY="">
200<TR BGCOLOR="#CCCCFF" CLASS="TableHeadingColor">
201<TH ALIGN="left" COLSPAN="2"><FONT SIZE="+2">
202<B>Method Summary</B></FONT></TH>
203</TR>
204<TR BGCOLOR="white" CLASS="TableRowColor">
205<TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1">
206<CODE>static&nbsp;void</CODE></FONT></TD>
207<TD><CODE><B><A HREF="../../../../org/apache/hadoop/io/MapFile.html#delete(org.apache.hadoop.fs.FileSystem, java.lang.String)">delete</A></B>(<A HREF="../../../../org/apache/hadoop/fs/FileSystem.html" title="class in org.apache.hadoop.fs">FileSystem</A>&nbsp;fs,
208       <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;name)</CODE>
209
210<BR>
211&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;Deletes the named map file.</TD>
212</TR>
213<TR BGCOLOR="white" CLASS="TableRowColor">
214<TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1">
215<CODE>static&nbsp;long</CODE></FONT></TD>
216<TD><CODE><B><A HREF="../../../../org/apache/hadoop/io/MapFile.html#fix(org.apache.hadoop.fs.FileSystem, org.apache.hadoop.fs.Path, java.lang.Class, java.lang.Class, boolean, org.apache.hadoop.conf.Configuration)">fix</A></B>(<A HREF="../../../../org/apache/hadoop/fs/FileSystem.html" title="class in org.apache.hadoop.fs">FileSystem</A>&nbsp;fs,
217    <A HREF="../../../../org/apache/hadoop/fs/Path.html" title="class in org.apache.hadoop.fs">Path</A>&nbsp;dir,
218    <A HREF="http://java.sun.com/javase/6/docs/api/java/lang/Class.html?is-external=true" title="class or interface in java.lang">Class</A>&lt;? extends <A HREF="../../../../org/apache/hadoop/io/Writable.html" title="interface in org.apache.hadoop.io">Writable</A>&gt;&nbsp;keyClass,
219    <A HREF="http://java.sun.com/javase/6/docs/api/java/lang/Class.html?is-external=true" title="class or interface in java.lang">Class</A>&lt;? extends <A HREF="../../../../org/apache/hadoop/io/Writable.html" title="interface in org.apache.hadoop.io">Writable</A>&gt;&nbsp;valueClass,
220    boolean&nbsp;dryrun,
221    <A HREF="../../../../org/apache/hadoop/conf/Configuration.html" title="class in org.apache.hadoop.conf">Configuration</A>&nbsp;conf)</CODE>
222
223<BR>
224&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;This method attempts to fix a corrupt MapFile by re-creating its index.</TD>
225</TR>
226<TR BGCOLOR="white" CLASS="TableRowColor">
227<TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1">
228<CODE>static&nbsp;void</CODE></FONT></TD>
229<TD><CODE><B><A HREF="../../../../org/apache/hadoop/io/MapFile.html#main(java.lang.String[])">main</A></B>(<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;args)</CODE>
230
231<BR>
232&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;</TD>
233</TR>
234<TR BGCOLOR="white" CLASS="TableRowColor">
235<TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1">
236<CODE>static&nbsp;void</CODE></FONT></TD>
237<TD><CODE><B><A HREF="../../../../org/apache/hadoop/io/MapFile.html#rename(org.apache.hadoop.fs.FileSystem, java.lang.String, java.lang.String)">rename</A></B>(<A HREF="../../../../org/apache/hadoop/fs/FileSystem.html" title="class in org.apache.hadoop.fs">FileSystem</A>&nbsp;fs,
238       <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;oldName,
239       <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;newName)</CODE>
240
241<BR>
242&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;Renames an existing map directory.</TD>
243</TR>
244</TABLE>
245&nbsp;<A NAME="methods_inherited_from_class_java.lang.Object"><!-- --></A>
246<TABLE BORDER="1" WIDTH="100%" CELLPADDING="3" CELLSPACING="0" SUMMARY="">
247<TR BGCOLOR="#EEEEFF" CLASS="TableSubHeadingColor">
248<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>
249</TR>
250<TR BGCOLOR="white" CLASS="TableRowColor">
251<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>
252</TR>
253</TABLE>
254&nbsp;
255<P>
256
257<!-- ============ FIELD DETAIL =========== -->
258
259<A NAME="field_detail"><!-- --></A>
260<TABLE BORDER="1" WIDTH="100%" CELLPADDING="3" CELLSPACING="0" SUMMARY="">
261<TR BGCOLOR="#CCCCFF" CLASS="TableHeadingColor">
262<TH ALIGN="left" COLSPAN="1"><FONT SIZE="+2">
263<B>Field Detail</B></FONT></TH>
264</TR>
265</TABLE>
266
267<A NAME="INDEX_FILE_NAME"><!-- --></A><H3>
268INDEX_FILE_NAME</H3>
269<PRE>
270public static final <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>INDEX_FILE_NAME</B></PRE>
271<DL>
272<DD>The name of the index file.
273<P>
274<DL>
275<DT><B>See Also:</B><DD><A HREF="../../../../constant-values.html#org.apache.hadoop.io.MapFile.INDEX_FILE_NAME">Constant Field Values</A></DL>
276</DL>
277<HR>
278
279<A NAME="DATA_FILE_NAME"><!-- --></A><H3>
280DATA_FILE_NAME</H3>
281<PRE>
282public static final <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>DATA_FILE_NAME</B></PRE>
283<DL>
284<DD>The name of the data file.
285<P>
286<DL>
287<DT><B>See Also:</B><DD><A HREF="../../../../constant-values.html#org.apache.hadoop.io.MapFile.DATA_FILE_NAME">Constant Field Values</A></DL>
288</DL>
289
290<!-- ========= CONSTRUCTOR DETAIL ======== -->
291
292<A NAME="constructor_detail"><!-- --></A>
293<TABLE BORDER="1" WIDTH="100%" CELLPADDING="3" CELLSPACING="0" SUMMARY="">
294<TR BGCOLOR="#CCCCFF" CLASS="TableHeadingColor">
295<TH ALIGN="left" COLSPAN="1"><FONT SIZE="+2">
296<B>Constructor Detail</B></FONT></TH>
297</TR>
298</TABLE>
299
300<A NAME="MapFile()"><!-- --></A><H3>
301MapFile</H3>
302<PRE>
303protected <B>MapFile</B>()</PRE>
304<DL>
305</DL>
306
307<!-- ============ METHOD DETAIL ========== -->
308
309<A NAME="method_detail"><!-- --></A>
310<TABLE BORDER="1" WIDTH="100%" CELLPADDING="3" CELLSPACING="0" SUMMARY="">
311<TR BGCOLOR="#CCCCFF" CLASS="TableHeadingColor">
312<TH ALIGN="left" COLSPAN="1"><FONT SIZE="+2">
313<B>Method Detail</B></FONT></TH>
314</TR>
315</TABLE>
316
317<A NAME="rename(org.apache.hadoop.fs.FileSystem, java.lang.String, java.lang.String)"><!-- --></A><H3>
318rename</H3>
319<PRE>
320public static void <B>rename</B>(<A HREF="../../../../org/apache/hadoop/fs/FileSystem.html" title="class in org.apache.hadoop.fs">FileSystem</A>&nbsp;fs,
321                          <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;oldName,
322                          <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;newName)
323                   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>
324<DL>
325<DD>Renames an existing map directory.
326<P>
327<DD><DL>
328
329<DT><B>Throws:</B>
330<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>
331</DD>
332</DL>
333<HR>
334
335<A NAME="delete(org.apache.hadoop.fs.FileSystem, java.lang.String)"><!-- --></A><H3>
336delete</H3>
337<PRE>
338public static void <B>delete</B>(<A HREF="../../../../org/apache/hadoop/fs/FileSystem.html" title="class in org.apache.hadoop.fs">FileSystem</A>&nbsp;fs,
339                          <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;name)
340                   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>
341<DL>
342<DD>Deletes the named map file.
343<P>
344<DD><DL>
345
346<DT><B>Throws:</B>
347<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>
348</DD>
349</DL>
350<HR>
351
352<A NAME="fix(org.apache.hadoop.fs.FileSystem, org.apache.hadoop.fs.Path, java.lang.Class, java.lang.Class, boolean, org.apache.hadoop.conf.Configuration)"><!-- --></A><H3>
353fix</H3>
354<PRE>
355public static long <B>fix</B>(<A HREF="../../../../org/apache/hadoop/fs/FileSystem.html" title="class in org.apache.hadoop.fs">FileSystem</A>&nbsp;fs,
356                       <A HREF="../../../../org/apache/hadoop/fs/Path.html" title="class in org.apache.hadoop.fs">Path</A>&nbsp;dir,
357                       <A HREF="http://java.sun.com/javase/6/docs/api/java/lang/Class.html?is-external=true" title="class or interface in java.lang">Class</A>&lt;? extends <A HREF="../../../../org/apache/hadoop/io/Writable.html" title="interface in org.apache.hadoop.io">Writable</A>&gt;&nbsp;keyClass,
358                       <A HREF="http://java.sun.com/javase/6/docs/api/java/lang/Class.html?is-external=true" title="class or interface in java.lang">Class</A>&lt;? extends <A HREF="../../../../org/apache/hadoop/io/Writable.html" title="interface in org.apache.hadoop.io">Writable</A>&gt;&nbsp;valueClass,
359                       boolean&nbsp;dryrun,
360                       <A HREF="../../../../org/apache/hadoop/conf/Configuration.html" title="class in org.apache.hadoop.conf">Configuration</A>&nbsp;conf)
361                throws <A HREF="http://java.sun.com/javase/6/docs/api/java/lang/Exception.html?is-external=true" title="class or interface in java.lang">Exception</A></PRE>
362<DL>
363<DD>This method attempts to fix a corrupt MapFile by re-creating its index.
364<P>
365<DD><DL>
366<DT><B>Parameters:</B><DD><CODE>fs</CODE> - filesystem<DD><CODE>dir</CODE> - directory containing the MapFile data and index<DD><CODE>keyClass</CODE> - key class (has to be a subclass of Writable)<DD><CODE>valueClass</CODE> - value class (has to be a subclass of Writable)<DD><CODE>dryrun</CODE> - do not perform any changes, just report what needs to be done
367<DT><B>Returns:</B><DD>number of valid entries in this MapFile, or -1 if no fixing was needed
368<DT><B>Throws:</B>
369<DD><CODE><A HREF="http://java.sun.com/javase/6/docs/api/java/lang/Exception.html?is-external=true" title="class or interface in java.lang">Exception</A></CODE></DL>
370</DD>
371</DL>
372<HR>
373
374<A NAME="main(java.lang.String[])"><!-- --></A><H3>
375main</H3>
376<PRE>
377public static void <B>main</B>(<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;args)
378                 throws <A HREF="http://java.sun.com/javase/6/docs/api/java/lang/Exception.html?is-external=true" title="class or interface in java.lang">Exception</A></PRE>
379<DL>
380<DD><DL>
381
382<DT><B>Throws:</B>
383<DD><CODE><A HREF="http://java.sun.com/javase/6/docs/api/java/lang/Exception.html?is-external=true" title="class or interface in java.lang">Exception</A></CODE></DL>
384</DD>
385</DL>
386<!-- ========= END OF CLASS DATA ========= -->
387<HR>
388
389
390<!-- ======= START OF BOTTOM NAVBAR ====== -->
391<A NAME="navbar_bottom"><!-- --></A>
392<A HREF="#skip-navbar_bottom" title="Skip navigation links"></A>
393<TABLE BORDER="0" WIDTH="100%" CELLPADDING="1" CELLSPACING="0" SUMMARY="">
394<TR>
395<TD COLSPAN=2 BGCOLOR="#EEEEFF" CLASS="NavBarCell1">
396<A NAME="navbar_bottom_firstrow"><!-- --></A>
397<TABLE BORDER="0" CELLPADDING="0" CELLSPACING="3" SUMMARY="">
398  <TR ALIGN="center" VALIGN="top">
399  <TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1">    <A HREF="../../../../overview-summary.html"><FONT CLASS="NavBarFont1"><B>Overview</B></FONT></A>&nbsp;</TD>
400  <TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1">    <A HREF="package-summary.html"><FONT CLASS="NavBarFont1"><B>Package</B></FONT></A>&nbsp;</TD>
401  <TD BGCOLOR="#FFFFFF" CLASS="NavBarCell1Rev"> &nbsp;<FONT CLASS="NavBarFont1Rev"><B>Class</B></FONT>&nbsp;</TD>
402  <TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1">    <A HREF="class-use/MapFile.html"><FONT CLASS="NavBarFont1"><B>Use</B></FONT></A>&nbsp;</TD>
403  <TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1">    <A HREF="package-tree.html"><FONT CLASS="NavBarFont1"><B>Tree</B></FONT></A>&nbsp;</TD>
404  <TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1">    <A HREF="../../../../deprecated-list.html"><FONT CLASS="NavBarFont1"><B>Deprecated</B></FONT></A>&nbsp;</TD>
405  <TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1">    <A HREF="../../../../index-all.html"><FONT CLASS="NavBarFont1"><B>Index</B></FONT></A>&nbsp;</TD>
406  <TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1">    <A HREF="../../../../help-doc.html"><FONT CLASS="NavBarFont1"><B>Help</B></FONT></A>&nbsp;</TD>
407  </TR>
408</TABLE>
409</TD>
410<TD ALIGN="right" VALIGN="top" ROWSPAN=3><EM>
411</EM>
412</TD>
413</TR>
414
415<TR>
416<TD BGCOLOR="white" CLASS="NavBarCell2"><FONT SIZE="-2">
417&nbsp;<A HREF="../../../../org/apache/hadoop/io/LongWritable.DecreasingComparator.html" title="class in org.apache.hadoop.io"><B>PREV CLASS</B></A>&nbsp;
418&nbsp;<A HREF="../../../../org/apache/hadoop/io/MapFile.Reader.html" title="class in org.apache.hadoop.io"><B>NEXT CLASS</B></A></FONT></TD>
419<TD BGCOLOR="white" CLASS="NavBarCell2"><FONT SIZE="-2">
420  <A HREF="../../../../index.html?org/apache/hadoop/io/MapFile.html" target="_top"><B>FRAMES</B></A>  &nbsp;
421&nbsp;<A HREF="MapFile.html" target="_top"><B>NO FRAMES</B></A>  &nbsp;
422&nbsp;<SCRIPT type="text/javascript">
423  <!--
424  if(window==top) {
425    document.writeln('<A HREF="../../../../allclasses-noframe.html"><B>All Classes</B></A>');
426  }
427  //-->
428</SCRIPT>
429<NOSCRIPT>
430  <A HREF="../../../../allclasses-noframe.html"><B>All Classes</B></A>
431</NOSCRIPT>
432
433
434</FONT></TD>
435</TR>
436<TR>
437<TD VALIGN="top" CLASS="NavBarCell3"><FONT SIZE="-2">
438  SUMMARY:&nbsp;<A HREF="#nested_class_summary">NESTED</A>&nbsp;|&nbsp;<A HREF="#field_summary">FIELD</A>&nbsp;|&nbsp;<A HREF="#constructor_summary">CONSTR</A>&nbsp;|&nbsp;<A HREF="#method_summary">METHOD</A></FONT></TD>
439<TD VALIGN="top" CLASS="NavBarCell3"><FONT SIZE="-2">
440DETAIL:&nbsp;<A HREF="#field_detail">FIELD</A>&nbsp;|&nbsp;<A HREF="#constructor_detail">CONSTR</A>&nbsp;|&nbsp;<A HREF="#method_detail">METHOD</A></FONT></TD>
441</TR>
442</TABLE>
443<A NAME="skip-navbar_bottom"></A>
444<!-- ======== END OF BOTTOM NAVBAR ======= -->
445
446<HR>
447Copyright &copy; 2009 The Apache Software Foundation
448</BODY>
449</HTML>
Note: See TracBrowser for help on using the repository browser.