[120] | 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:53 UTC 2009 --> |
---|
| 6 | <TITLE> |
---|
| 7 | WritableComparator (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"> |
---|
| 15 | function windowTitle() |
---|
| 16 | { |
---|
| 17 | if (location.href.indexOf('is-external=true') == -1) { |
---|
| 18 | parent.document.title="WritableComparator (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> </TD> |
---|
| 41 | <TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1"> <A HREF="package-summary.html"><FONT CLASS="NavBarFont1"><B>Package</B></FONT></A> </TD> |
---|
| 42 | <TD BGCOLOR="#FFFFFF" CLASS="NavBarCell1Rev"> <FONT CLASS="NavBarFont1Rev"><B>Class</B></FONT> </TD> |
---|
| 43 | <TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1"> <A HREF="class-use/WritableComparator.html"><FONT CLASS="NavBarFont1"><B>Use</B></FONT></A> </TD> |
---|
| 44 | <TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1"> <A HREF="package-tree.html"><FONT CLASS="NavBarFont1"><B>Tree</B></FONT></A> </TD> |
---|
| 45 | <TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1"> <A HREF="../../../../deprecated-list.html"><FONT CLASS="NavBarFont1"><B>Deprecated</B></FONT></A> </TD> |
---|
| 46 | <TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1"> <A HREF="../../../../index-all.html"><FONT CLASS="NavBarFont1"><B>Index</B></FONT></A> </TD> |
---|
| 47 | <TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1"> <A HREF="../../../../help-doc.html"><FONT CLASS="NavBarFont1"><B>Help</B></FONT></A> </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 | <A HREF="../../../../org/apache/hadoop/io/WritableComparable.html" title="interface in org.apache.hadoop.io"><B>PREV CLASS</B></A> |
---|
| 59 | <A HREF="../../../../org/apache/hadoop/io/WritableFactories.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/WritableComparator.html" target="_top"><B>FRAMES</B></A> |
---|
| 62 | <A HREF="WritableComparator.html" target="_top"><B>NO FRAMES</B></A> |
---|
| 63 | <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: NESTED | FIELD | <A HREF="#constructor_summary">CONSTR</A> | <A HREF="#method_summary">METHOD</A></FONT></TD> |
---|
| 80 | <TD VALIGN="top" CLASS="NavBarCell3"><FONT SIZE="-2"> |
---|
| 81 | DETAIL: FIELD | <A HREF="#constructor_detail">CONSTR</A> | <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"> |
---|
| 91 | org.apache.hadoop.io</FONT> |
---|
| 92 | <BR> |
---|
| 93 | Class WritableComparator</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.WritableComparator</B> |
---|
| 97 | </PRE> |
---|
| 98 | <DL> |
---|
| 99 | <DT><B>All Implemented Interfaces:</B> <DD><A HREF="http://java.sun.com/javase/6/docs/api/java/util/Comparator.html?is-external=true" title="class or interface in java.util">Comparator</A>, <A HREF="../../../../org/apache/hadoop/io/RawComparator.html" title="interface in org.apache.hadoop.io">RawComparator</A></DD> |
---|
| 100 | </DL> |
---|
| 101 | <DL> |
---|
| 102 | <DT><B>Direct Known Subclasses:</B> <DD><A HREF="../../../../org/apache/hadoop/io/BooleanWritable.Comparator.html" title="class in org.apache.hadoop.io">BooleanWritable.Comparator</A>, <A HREF="../../../../org/apache/hadoop/io/BytesWritable.Comparator.html" title="class in org.apache.hadoop.io">BytesWritable.Comparator</A>, <A HREF="../../../../org/apache/hadoop/io/ByteWritable.Comparator.html" title="class in org.apache.hadoop.io">ByteWritable.Comparator</A>, <A HREF="../../../../org/apache/hadoop/io/DoubleWritable.Comparator.html" title="class in org.apache.hadoop.io">DoubleWritable.Comparator</A>, <A HREF="../../../../org/apache/hadoop/io/FloatWritable.Comparator.html" title="class in org.apache.hadoop.io">FloatWritable.Comparator</A>, <A HREF="../../../../org/apache/hadoop/io/IntWritable.Comparator.html" title="class in org.apache.hadoop.io">IntWritable.Comparator</A>, <A HREF="../../../../org/apache/hadoop/mapred/lib/KeyFieldBasedComparator.html" title="class in org.apache.hadoop.mapred.lib">KeyFieldBasedComparator</A>, <A HREF="../../../../org/apache/hadoop/io/LongWritable.Comparator.html" title="class in org.apache.hadoop.io">LongWritable.Comparator</A>, <A HREF="../../../../org/apache/hadoop/io/MD5Hash.Comparator.html" title="class in org.apache.hadoop.io">MD5Hash.Comparator</A>, <A HREF="../../../../org/apache/hadoop/io/NullWritable.Comparator.html" title="class in org.apache.hadoop.io">NullWritable.Comparator</A>, <A HREF="../../../../org/apache/hadoop/record/RecordComparator.html" title="class in org.apache.hadoop.record">RecordComparator</A>, <A HREF="../../../../org/apache/hadoop/examples/SecondarySort.IntPair.Comparator.html" title="class in org.apache.hadoop.examples">SecondarySort.IntPair.Comparator</A>, <A HREF="../../../../org/apache/hadoop/io/Text.Comparator.html" title="class in org.apache.hadoop.io">Text.Comparator</A>, <A HREF="../../../../org/apache/hadoop/io/UTF8.Comparator.html" title="class in org.apache.hadoop.io">UTF8.Comparator</A></DD> |
---|
| 103 | </DL> |
---|
| 104 | <HR> |
---|
| 105 | <DL> |
---|
| 106 | <DT><PRE>public class <B>WritableComparator</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><DT>implements <A HREF="../../../../org/apache/hadoop/io/RawComparator.html" title="interface in org.apache.hadoop.io">RawComparator</A></DL> |
---|
| 107 | </PRE> |
---|
| 108 | |
---|
| 109 | <P> |
---|
| 110 | A Comparator for <A HREF="../../../../org/apache/hadoop/io/WritableComparable.html" title="interface in org.apache.hadoop.io"><CODE>WritableComparable</CODE></A>s. |
---|
| 111 | |
---|
| 112 | <p>This base implemenation uses the natural ordering. To define alternate |
---|
| 113 | orderings, override <A HREF="../../../../org/apache/hadoop/io/WritableComparator.html#compare(org.apache.hadoop.io.WritableComparable, org.apache.hadoop.io.WritableComparable)"><CODE>compare(WritableComparable,WritableComparable)</CODE></A>. |
---|
| 114 | |
---|
| 115 | <p>One may optimize compare-intensive operations by overriding |
---|
| 116 | <A HREF="../../../../org/apache/hadoop/io/WritableComparator.html#compare(byte[], int, int, byte[], int, int)"><CODE>compare(byte[],int,int,byte[],int,int)</CODE></A>. Static utility methods are |
---|
| 117 | provided to assist in optimized implementations of this method. |
---|
| 118 | <P> |
---|
| 119 | |
---|
| 120 | <P> |
---|
| 121 | <HR> |
---|
| 122 | |
---|
| 123 | <P> |
---|
| 124 | |
---|
| 125 | <!-- ======== CONSTRUCTOR SUMMARY ======== --> |
---|
| 126 | |
---|
| 127 | <A NAME="constructor_summary"><!-- --></A> |
---|
| 128 | <TABLE BORDER="1" WIDTH="100%" CELLPADDING="3" CELLSPACING="0" SUMMARY=""> |
---|
| 129 | <TR BGCOLOR="#CCCCFF" CLASS="TableHeadingColor"> |
---|
| 130 | <TH ALIGN="left" COLSPAN="2"><FONT SIZE="+2"> |
---|
| 131 | <B>Constructor Summary</B></FONT></TH> |
---|
| 132 | </TR> |
---|
| 133 | <TR BGCOLOR="white" CLASS="TableRowColor"> |
---|
| 134 | <TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1"> |
---|
| 135 | <CODE>protected </CODE></FONT></TD> |
---|
| 136 | <TD><CODE><B><A HREF="../../../../org/apache/hadoop/io/WritableComparator.html#WritableComparator(java.lang.Class)">WritableComparator</A></B>(<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><? extends <A HREF="../../../../org/apache/hadoop/io/WritableComparable.html" title="interface in org.apache.hadoop.io">WritableComparable</A>> keyClass)</CODE> |
---|
| 137 | |
---|
| 138 | <BR> |
---|
| 139 | Construct for a <A HREF="../../../../org/apache/hadoop/io/WritableComparable.html" title="interface in org.apache.hadoop.io"><CODE>WritableComparable</CODE></A> implementation.</TD> |
---|
| 140 | </TR> |
---|
| 141 | <TR BGCOLOR="white" CLASS="TableRowColor"> |
---|
| 142 | <TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1"> |
---|
| 143 | <CODE>protected </CODE></FONT></TD> |
---|
| 144 | <TD><CODE><B><A HREF="../../../../org/apache/hadoop/io/WritableComparator.html#WritableComparator(java.lang.Class, boolean)">WritableComparator</A></B>(<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><? extends <A HREF="../../../../org/apache/hadoop/io/WritableComparable.html" title="interface in org.apache.hadoop.io">WritableComparable</A>> keyClass, |
---|
| 145 | boolean createInstances)</CODE> |
---|
| 146 | |
---|
| 147 | <BR> |
---|
| 148 | </TD> |
---|
| 149 | </TR> |
---|
| 150 | </TABLE> |
---|
| 151 | |
---|
| 152 | <!-- ========== METHOD SUMMARY =========== --> |
---|
| 153 | |
---|
| 154 | <A NAME="method_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>Method 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> int</CODE></FONT></TD> |
---|
| 163 | <TD><CODE><B><A HREF="../../../../org/apache/hadoop/io/WritableComparator.html#compare(byte[], int, int, byte[], int, int)">compare</A></B>(byte[] b1, |
---|
| 164 | int s1, |
---|
| 165 | int l1, |
---|
| 166 | byte[] b2, |
---|
| 167 | int s2, |
---|
| 168 | int l2)</CODE> |
---|
| 169 | |
---|
| 170 | <BR> |
---|
| 171 | Optimization hook.</TD> |
---|
| 172 | </TR> |
---|
| 173 | <TR BGCOLOR="white" CLASS="TableRowColor"> |
---|
| 174 | <TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1"> |
---|
| 175 | <CODE> int</CODE></FONT></TD> |
---|
| 176 | <TD><CODE><B><A HREF="../../../../org/apache/hadoop/io/WritableComparator.html#compare(java.lang.Object, java.lang.Object)">compare</A></B>(<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> a, |
---|
| 177 | <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)</CODE> |
---|
| 178 | |
---|
| 179 | <BR> |
---|
| 180 | </TD> |
---|
| 181 | </TR> |
---|
| 182 | <TR BGCOLOR="white" CLASS="TableRowColor"> |
---|
| 183 | <TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1"> |
---|
| 184 | <CODE> int</CODE></FONT></TD> |
---|
| 185 | <TD><CODE><B><A HREF="../../../../org/apache/hadoop/io/WritableComparator.html#compare(org.apache.hadoop.io.WritableComparable, org.apache.hadoop.io.WritableComparable)">compare</A></B>(<A HREF="../../../../org/apache/hadoop/io/WritableComparable.html" title="interface in org.apache.hadoop.io">WritableComparable</A> a, |
---|
| 186 | <A HREF="../../../../org/apache/hadoop/io/WritableComparable.html" title="interface in org.apache.hadoop.io">WritableComparable</A> b)</CODE> |
---|
| 187 | |
---|
| 188 | <BR> |
---|
| 189 | Compare two WritableComparables.</TD> |
---|
| 190 | </TR> |
---|
| 191 | <TR BGCOLOR="white" CLASS="TableRowColor"> |
---|
| 192 | <TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1"> |
---|
| 193 | <CODE>static int</CODE></FONT></TD> |
---|
| 194 | <TD><CODE><B><A HREF="../../../../org/apache/hadoop/io/WritableComparator.html#compareBytes(byte[], int, int, byte[], int, int)">compareBytes</A></B>(byte[] b1, |
---|
| 195 | int s1, |
---|
| 196 | int l1, |
---|
| 197 | byte[] b2, |
---|
| 198 | int s2, |
---|
| 199 | int l2)</CODE> |
---|
| 200 | |
---|
| 201 | <BR> |
---|
| 202 | Lexicographic order of binary data.</TD> |
---|
| 203 | </TR> |
---|
| 204 | <TR BGCOLOR="white" CLASS="TableRowColor"> |
---|
| 205 | <TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1"> |
---|
| 206 | <CODE>static void</CODE></FONT></TD> |
---|
| 207 | <TD><CODE><B><A HREF="../../../../org/apache/hadoop/io/WritableComparator.html#define(java.lang.Class, org.apache.hadoop.io.WritableComparator)">define</A></B>(<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> c, |
---|
| 208 | <A HREF="../../../../org/apache/hadoop/io/WritableComparator.html" title="class in org.apache.hadoop.io">WritableComparator</A> comparator)</CODE> |
---|
| 209 | |
---|
| 210 | <BR> |
---|
| 211 | Register an optimized comparator for a <A HREF="../../../../org/apache/hadoop/io/WritableComparable.html" title="interface in org.apache.hadoop.io"><CODE>WritableComparable</CODE></A> |
---|
| 212 | implementation.</TD> |
---|
| 213 | </TR> |
---|
| 214 | <TR BGCOLOR="white" CLASS="TableRowColor"> |
---|
| 215 | <TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1"> |
---|
| 216 | <CODE>static <A HREF="../../../../org/apache/hadoop/io/WritableComparator.html" title="class in org.apache.hadoop.io">WritableComparator</A></CODE></FONT></TD> |
---|
| 217 | <TD><CODE><B><A HREF="../../../../org/apache/hadoop/io/WritableComparator.html#get(java.lang.Class)">get</A></B>(<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><? extends <A HREF="../../../../org/apache/hadoop/io/WritableComparable.html" title="interface in org.apache.hadoop.io">WritableComparable</A>> c)</CODE> |
---|
| 218 | |
---|
| 219 | <BR> |
---|
| 220 | Get a comparator for a <A HREF="../../../../org/apache/hadoop/io/WritableComparable.html" title="interface in org.apache.hadoop.io"><CODE>WritableComparable</CODE></A> implementation.</TD> |
---|
| 221 | </TR> |
---|
| 222 | <TR BGCOLOR="white" CLASS="TableRowColor"> |
---|
| 223 | <TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1"> |
---|
| 224 | <CODE> <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><? extends <A HREF="../../../../org/apache/hadoop/io/WritableComparable.html" title="interface in org.apache.hadoop.io">WritableComparable</A>></CODE></FONT></TD> |
---|
| 225 | <TD><CODE><B><A HREF="../../../../org/apache/hadoop/io/WritableComparator.html#getKeyClass()">getKeyClass</A></B>()</CODE> |
---|
| 226 | |
---|
| 227 | <BR> |
---|
| 228 | Returns the WritableComparable implementation class.</TD> |
---|
| 229 | </TR> |
---|
| 230 | <TR BGCOLOR="white" CLASS="TableRowColor"> |
---|
| 231 | <TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1"> |
---|
| 232 | <CODE>static int</CODE></FONT></TD> |
---|
| 233 | <TD><CODE><B><A HREF="../../../../org/apache/hadoop/io/WritableComparator.html#hashBytes(byte[], int)">hashBytes</A></B>(byte[] bytes, |
---|
| 234 | int length)</CODE> |
---|
| 235 | |
---|
| 236 | <BR> |
---|
| 237 | Compute hash for binary data.</TD> |
---|
| 238 | </TR> |
---|
| 239 | <TR BGCOLOR="white" CLASS="TableRowColor"> |
---|
| 240 | <TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1"> |
---|
| 241 | <CODE> <A HREF="../../../../org/apache/hadoop/io/WritableComparable.html" title="interface in org.apache.hadoop.io">WritableComparable</A></CODE></FONT></TD> |
---|
| 242 | <TD><CODE><B><A HREF="../../../../org/apache/hadoop/io/WritableComparator.html#newKey()">newKey</A></B>()</CODE> |
---|
| 243 | |
---|
| 244 | <BR> |
---|
| 245 | Construct a new <A HREF="../../../../org/apache/hadoop/io/WritableComparable.html" title="interface in org.apache.hadoop.io"><CODE>WritableComparable</CODE></A> instance.</TD> |
---|
| 246 | </TR> |
---|
| 247 | <TR BGCOLOR="white" CLASS="TableRowColor"> |
---|
| 248 | <TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1"> |
---|
| 249 | <CODE>static double</CODE></FONT></TD> |
---|
| 250 | <TD><CODE><B><A HREF="../../../../org/apache/hadoop/io/WritableComparator.html#readDouble(byte[], int)">readDouble</A></B>(byte[] bytes, |
---|
| 251 | int start)</CODE> |
---|
| 252 | |
---|
| 253 | <BR> |
---|
| 254 | Parse a double from a byte array.</TD> |
---|
| 255 | </TR> |
---|
| 256 | <TR BGCOLOR="white" CLASS="TableRowColor"> |
---|
| 257 | <TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1"> |
---|
| 258 | <CODE>static float</CODE></FONT></TD> |
---|
| 259 | <TD><CODE><B><A HREF="../../../../org/apache/hadoop/io/WritableComparator.html#readFloat(byte[], int)">readFloat</A></B>(byte[] bytes, |
---|
| 260 | int start)</CODE> |
---|
| 261 | |
---|
| 262 | <BR> |
---|
| 263 | Parse a float from a byte array.</TD> |
---|
| 264 | </TR> |
---|
| 265 | <TR BGCOLOR="white" CLASS="TableRowColor"> |
---|
| 266 | <TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1"> |
---|
| 267 | <CODE>static int</CODE></FONT></TD> |
---|
| 268 | <TD><CODE><B><A HREF="../../../../org/apache/hadoop/io/WritableComparator.html#readInt(byte[], int)">readInt</A></B>(byte[] bytes, |
---|
| 269 | int start)</CODE> |
---|
| 270 | |
---|
| 271 | <BR> |
---|
| 272 | Parse an integer from a byte array.</TD> |
---|
| 273 | </TR> |
---|
| 274 | <TR BGCOLOR="white" CLASS="TableRowColor"> |
---|
| 275 | <TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1"> |
---|
| 276 | <CODE>static long</CODE></FONT></TD> |
---|
| 277 | <TD><CODE><B><A HREF="../../../../org/apache/hadoop/io/WritableComparator.html#readLong(byte[], int)">readLong</A></B>(byte[] bytes, |
---|
| 278 | int start)</CODE> |
---|
| 279 | |
---|
| 280 | <BR> |
---|
| 281 | Parse a long from a byte array.</TD> |
---|
| 282 | </TR> |
---|
| 283 | <TR BGCOLOR="white" CLASS="TableRowColor"> |
---|
| 284 | <TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1"> |
---|
| 285 | <CODE>static int</CODE></FONT></TD> |
---|
| 286 | <TD><CODE><B><A HREF="../../../../org/apache/hadoop/io/WritableComparator.html#readUnsignedShort(byte[], int)">readUnsignedShort</A></B>(byte[] bytes, |
---|
| 287 | int start)</CODE> |
---|
| 288 | |
---|
| 289 | <BR> |
---|
| 290 | Parse an unsigned short from a byte array.</TD> |
---|
| 291 | </TR> |
---|
| 292 | <TR BGCOLOR="white" CLASS="TableRowColor"> |
---|
| 293 | <TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1"> |
---|
| 294 | <CODE>static int</CODE></FONT></TD> |
---|
| 295 | <TD><CODE><B><A HREF="../../../../org/apache/hadoop/io/WritableComparator.html#readVInt(byte[], int)">readVInt</A></B>(byte[] bytes, |
---|
| 296 | int start)</CODE> |
---|
| 297 | |
---|
| 298 | <BR> |
---|
| 299 | Reads a zero-compressed encoded integer from a byte array and returns it.</TD> |
---|
| 300 | </TR> |
---|
| 301 | <TR BGCOLOR="white" CLASS="TableRowColor"> |
---|
| 302 | <TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1"> |
---|
| 303 | <CODE>static long</CODE></FONT></TD> |
---|
| 304 | <TD><CODE><B><A HREF="../../../../org/apache/hadoop/io/WritableComparator.html#readVLong(byte[], int)">readVLong</A></B>(byte[] bytes, |
---|
| 305 | int start)</CODE> |
---|
| 306 | |
---|
| 307 | <BR> |
---|
| 308 | Reads a zero-compressed encoded long from a byte array and returns it.</TD> |
---|
| 309 | </TR> |
---|
| 310 | </TABLE> |
---|
| 311 | <A NAME="methods_inherited_from_class_java.lang.Object"><!-- --></A> |
---|
| 312 | <TABLE BORDER="1" WIDTH="100%" CELLPADDING="3" CELLSPACING="0" SUMMARY=""> |
---|
| 313 | <TR BGCOLOR="#EEEEFF" CLASS="TableSubHeadingColor"> |
---|
| 314 | <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> |
---|
| 315 | </TR> |
---|
| 316 | <TR BGCOLOR="white" CLASS="TableRowColor"> |
---|
| 317 | <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> |
---|
| 318 | </TR> |
---|
| 319 | </TABLE> |
---|
| 320 | <A NAME="methods_inherited_from_class_java.util.Comparator"><!-- --></A> |
---|
| 321 | <TABLE BORDER="1" WIDTH="100%" CELLPADDING="3" CELLSPACING="0" SUMMARY=""> |
---|
| 322 | <TR BGCOLOR="#EEEEFF" CLASS="TableSubHeadingColor"> |
---|
| 323 | <TH ALIGN="left"><B>Methods inherited from interface java.util.<A HREF="http://java.sun.com/javase/6/docs/api/java/util/Comparator.html?is-external=true" title="class or interface in java.util">Comparator</A></B></TH> |
---|
| 324 | </TR> |
---|
| 325 | <TR BGCOLOR="white" CLASS="TableRowColor"> |
---|
| 326 | <TD><CODE><A HREF="http://java.sun.com/javase/6/docs/api/java/util/Comparator.html?is-external=true#equals(java.lang.Object)" title="class or interface in java.util">equals</A></CODE></TD> |
---|
| 327 | </TR> |
---|
| 328 | </TABLE> |
---|
| 329 | |
---|
| 330 | <P> |
---|
| 331 | |
---|
| 332 | <!-- ========= CONSTRUCTOR DETAIL ======== --> |
---|
| 333 | |
---|
| 334 | <A NAME="constructor_detail"><!-- --></A> |
---|
| 335 | <TABLE BORDER="1" WIDTH="100%" CELLPADDING="3" CELLSPACING="0" SUMMARY=""> |
---|
| 336 | <TR BGCOLOR="#CCCCFF" CLASS="TableHeadingColor"> |
---|
| 337 | <TH ALIGN="left" COLSPAN="1"><FONT SIZE="+2"> |
---|
| 338 | <B>Constructor Detail</B></FONT></TH> |
---|
| 339 | </TR> |
---|
| 340 | </TABLE> |
---|
| 341 | |
---|
| 342 | <A NAME="WritableComparator(java.lang.Class)"><!-- --></A><H3> |
---|
| 343 | WritableComparator</H3> |
---|
| 344 | <PRE> |
---|
| 345 | protected <B>WritableComparator</B>(<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><? extends <A HREF="../../../../org/apache/hadoop/io/WritableComparable.html" title="interface in org.apache.hadoop.io">WritableComparable</A>> keyClass)</PRE> |
---|
| 346 | <DL> |
---|
| 347 | <DD>Construct for a <A HREF="../../../../org/apache/hadoop/io/WritableComparable.html" title="interface in org.apache.hadoop.io"><CODE>WritableComparable</CODE></A> implementation. |
---|
| 348 | <P> |
---|
| 349 | </DL> |
---|
| 350 | <HR> |
---|
| 351 | |
---|
| 352 | <A NAME="WritableComparator(java.lang.Class, boolean)"><!-- --></A><H3> |
---|
| 353 | WritableComparator</H3> |
---|
| 354 | <PRE> |
---|
| 355 | protected <B>WritableComparator</B>(<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><? extends <A HREF="../../../../org/apache/hadoop/io/WritableComparable.html" title="interface in org.apache.hadoop.io">WritableComparable</A>> keyClass, |
---|
| 356 | boolean createInstances)</PRE> |
---|
| 357 | <DL> |
---|
| 358 | </DL> |
---|
| 359 | |
---|
| 360 | <!-- ============ METHOD DETAIL ========== --> |
---|
| 361 | |
---|
| 362 | <A NAME="method_detail"><!-- --></A> |
---|
| 363 | <TABLE BORDER="1" WIDTH="100%" CELLPADDING="3" CELLSPACING="0" SUMMARY=""> |
---|
| 364 | <TR BGCOLOR="#CCCCFF" CLASS="TableHeadingColor"> |
---|
| 365 | <TH ALIGN="left" COLSPAN="1"><FONT SIZE="+2"> |
---|
| 366 | <B>Method Detail</B></FONT></TH> |
---|
| 367 | </TR> |
---|
| 368 | </TABLE> |
---|
| 369 | |
---|
| 370 | <A NAME="get(java.lang.Class)"><!-- --></A><H3> |
---|
| 371 | get</H3> |
---|
| 372 | <PRE> |
---|
| 373 | public static <A HREF="../../../../org/apache/hadoop/io/WritableComparator.html" title="class in org.apache.hadoop.io">WritableComparator</A> <B>get</B>(<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><? extends <A HREF="../../../../org/apache/hadoop/io/WritableComparable.html" title="interface in org.apache.hadoop.io">WritableComparable</A>> c)</PRE> |
---|
| 374 | <DL> |
---|
| 375 | <DD>Get a comparator for a <A HREF="../../../../org/apache/hadoop/io/WritableComparable.html" title="interface in org.apache.hadoop.io"><CODE>WritableComparable</CODE></A> implementation. |
---|
| 376 | <P> |
---|
| 377 | <DD><DL> |
---|
| 378 | </DL> |
---|
| 379 | </DD> |
---|
| 380 | <DD><DL> |
---|
| 381 | </DL> |
---|
| 382 | </DD> |
---|
| 383 | </DL> |
---|
| 384 | <HR> |
---|
| 385 | |
---|
| 386 | <A NAME="define(java.lang.Class, org.apache.hadoop.io.WritableComparator)"><!-- --></A><H3> |
---|
| 387 | define</H3> |
---|
| 388 | <PRE> |
---|
| 389 | public static void <B>define</B>(<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> c, |
---|
| 390 | <A HREF="../../../../org/apache/hadoop/io/WritableComparator.html" title="class in org.apache.hadoop.io">WritableComparator</A> comparator)</PRE> |
---|
| 391 | <DL> |
---|
| 392 | <DD>Register an optimized comparator for a <A HREF="../../../../org/apache/hadoop/io/WritableComparable.html" title="interface in org.apache.hadoop.io"><CODE>WritableComparable</CODE></A> |
---|
| 393 | implementation. |
---|
| 394 | <P> |
---|
| 395 | <DD><DL> |
---|
| 396 | </DL> |
---|
| 397 | </DD> |
---|
| 398 | <DD><DL> |
---|
| 399 | </DL> |
---|
| 400 | </DD> |
---|
| 401 | </DL> |
---|
| 402 | <HR> |
---|
| 403 | |
---|
| 404 | <A NAME="getKeyClass()"><!-- --></A><H3> |
---|
| 405 | getKeyClass</H3> |
---|
| 406 | <PRE> |
---|
| 407 | public <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><? extends <A HREF="../../../../org/apache/hadoop/io/WritableComparable.html" title="interface in org.apache.hadoop.io">WritableComparable</A>> <B>getKeyClass</B>()</PRE> |
---|
| 408 | <DL> |
---|
| 409 | <DD>Returns the WritableComparable implementation class. |
---|
| 410 | <P> |
---|
| 411 | <DD><DL> |
---|
| 412 | </DL> |
---|
| 413 | </DD> |
---|
| 414 | <DD><DL> |
---|
| 415 | </DL> |
---|
| 416 | </DD> |
---|
| 417 | </DL> |
---|
| 418 | <HR> |
---|
| 419 | |
---|
| 420 | <A NAME="newKey()"><!-- --></A><H3> |
---|
| 421 | newKey</H3> |
---|
| 422 | <PRE> |
---|
| 423 | public <A HREF="../../../../org/apache/hadoop/io/WritableComparable.html" title="interface in org.apache.hadoop.io">WritableComparable</A> <B>newKey</B>()</PRE> |
---|
| 424 | <DL> |
---|
| 425 | <DD>Construct a new <A HREF="../../../../org/apache/hadoop/io/WritableComparable.html" title="interface in org.apache.hadoop.io"><CODE>WritableComparable</CODE></A> instance. |
---|
| 426 | <P> |
---|
| 427 | <DD><DL> |
---|
| 428 | </DL> |
---|
| 429 | </DD> |
---|
| 430 | <DD><DL> |
---|
| 431 | </DL> |
---|
| 432 | </DD> |
---|
| 433 | </DL> |
---|
| 434 | <HR> |
---|
| 435 | |
---|
| 436 | <A NAME="compare(byte[], int, int, byte[], int, int)"><!-- --></A><H3> |
---|
| 437 | compare</H3> |
---|
| 438 | <PRE> |
---|
| 439 | public int <B>compare</B>(byte[] b1, |
---|
| 440 | int s1, |
---|
| 441 | int l1, |
---|
| 442 | byte[] b2, |
---|
| 443 | int s2, |
---|
| 444 | int l2)</PRE> |
---|
| 445 | <DL> |
---|
| 446 | <DD>Optimization hook. Override this to make SequenceFile.Sorter's scream. |
---|
| 447 | |
---|
| 448 | <p>The default implementation reads the data into two <A HREF="../../../../org/apache/hadoop/io/WritableComparable.html" title="interface in org.apache.hadoop.io"><CODE>WritableComparable</CODE></A>s (using <A HREF="../../../../org/apache/hadoop/io/Writable.html#readFields(java.io.DataInput)"><CODE>Writable.readFields(DataInput)</CODE></A>, then calls <A HREF="../../../../org/apache/hadoop/io/WritableComparator.html#compare(org.apache.hadoop.io.WritableComparable, org.apache.hadoop.io.WritableComparable)"><CODE>compare(WritableComparable,WritableComparable)</CODE></A>. |
---|
| 449 | <P> |
---|
| 450 | <DD><DL> |
---|
| 451 | <DT><B>Specified by:</B><DD><CODE><A HREF="../../../../org/apache/hadoop/io/RawComparator.html#compare(byte[], int, int, byte[], int, int)">compare</A></CODE> in interface <CODE><A HREF="../../../../org/apache/hadoop/io/RawComparator.html" title="interface in org.apache.hadoop.io">RawComparator</A></CODE></DL> |
---|
| 452 | </DD> |
---|
| 453 | <DD><DL> |
---|
| 454 | </DL> |
---|
| 455 | </DD> |
---|
| 456 | </DL> |
---|
| 457 | <HR> |
---|
| 458 | |
---|
| 459 | <A NAME="compare(org.apache.hadoop.io.WritableComparable, org.apache.hadoop.io.WritableComparable)"><!-- --></A><H3> |
---|
| 460 | compare</H3> |
---|
| 461 | <PRE> |
---|
| 462 | public int <B>compare</B>(<A HREF="../../../../org/apache/hadoop/io/WritableComparable.html" title="interface in org.apache.hadoop.io">WritableComparable</A> a, |
---|
| 463 | <A HREF="../../../../org/apache/hadoop/io/WritableComparable.html" title="interface in org.apache.hadoop.io">WritableComparable</A> b)</PRE> |
---|
| 464 | <DL> |
---|
| 465 | <DD>Compare two WritableComparables. |
---|
| 466 | |
---|
| 467 | <p> The default implementation uses the natural ordering, calling <A HREF="http://java.sun.com/javase/6/docs/api/java/lang/Comparable.html?is-external=true#compareTo(T)" title="class or interface in java.lang"><CODE>Comparable.compareTo(Object)</CODE></A>. |
---|
| 468 | <P> |
---|
| 469 | <DD><DL> |
---|
| 470 | </DL> |
---|
| 471 | </DD> |
---|
| 472 | <DD><DL> |
---|
| 473 | </DL> |
---|
| 474 | </DD> |
---|
| 475 | </DL> |
---|
| 476 | <HR> |
---|
| 477 | |
---|
| 478 | <A NAME="compare(java.lang.Object, java.lang.Object)"><!-- --></A><H3> |
---|
| 479 | compare</H3> |
---|
| 480 | <PRE> |
---|
| 481 | public int <B>compare</B>(<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> a, |
---|
| 482 | <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)</PRE> |
---|
| 483 | <DL> |
---|
| 484 | <DD><DL> |
---|
| 485 | <DT><B>Specified by:</B><DD><CODE><A HREF="http://java.sun.com/javase/6/docs/api/java/util/Comparator.html?is-external=true#compare(T, T)" title="class or interface in java.util">compare</A></CODE> in interface <CODE><A HREF="http://java.sun.com/javase/6/docs/api/java/util/Comparator.html?is-external=true" title="class or interface in java.util">Comparator</A></CODE></DL> |
---|
| 486 | </DD> |
---|
| 487 | <DD><DL> |
---|
| 488 | </DL> |
---|
| 489 | </DD> |
---|
| 490 | </DL> |
---|
| 491 | <HR> |
---|
| 492 | |
---|
| 493 | <A NAME="compareBytes(byte[], int, int, byte[], int, int)"><!-- --></A><H3> |
---|
| 494 | compareBytes</H3> |
---|
| 495 | <PRE> |
---|
| 496 | public static int <B>compareBytes</B>(byte[] b1, |
---|
| 497 | int s1, |
---|
| 498 | int l1, |
---|
| 499 | byte[] b2, |
---|
| 500 | int s2, |
---|
| 501 | int l2)</PRE> |
---|
| 502 | <DL> |
---|
| 503 | <DD>Lexicographic order of binary data. |
---|
| 504 | <P> |
---|
| 505 | <DD><DL> |
---|
| 506 | </DL> |
---|
| 507 | </DD> |
---|
| 508 | <DD><DL> |
---|
| 509 | </DL> |
---|
| 510 | </DD> |
---|
| 511 | </DL> |
---|
| 512 | <HR> |
---|
| 513 | |
---|
| 514 | <A NAME="hashBytes(byte[], int)"><!-- --></A><H3> |
---|
| 515 | hashBytes</H3> |
---|
| 516 | <PRE> |
---|
| 517 | public static int <B>hashBytes</B>(byte[] bytes, |
---|
| 518 | int length)</PRE> |
---|
| 519 | <DL> |
---|
| 520 | <DD>Compute hash for binary data. |
---|
| 521 | <P> |
---|
| 522 | <DD><DL> |
---|
| 523 | </DL> |
---|
| 524 | </DD> |
---|
| 525 | <DD><DL> |
---|
| 526 | </DL> |
---|
| 527 | </DD> |
---|
| 528 | </DL> |
---|
| 529 | <HR> |
---|
| 530 | |
---|
| 531 | <A NAME="readUnsignedShort(byte[], int)"><!-- --></A><H3> |
---|
| 532 | readUnsignedShort</H3> |
---|
| 533 | <PRE> |
---|
| 534 | public static int <B>readUnsignedShort</B>(byte[] bytes, |
---|
| 535 | int start)</PRE> |
---|
| 536 | <DL> |
---|
| 537 | <DD>Parse an unsigned short from a byte array. |
---|
| 538 | <P> |
---|
| 539 | <DD><DL> |
---|
| 540 | </DL> |
---|
| 541 | </DD> |
---|
| 542 | <DD><DL> |
---|
| 543 | </DL> |
---|
| 544 | </DD> |
---|
| 545 | </DL> |
---|
| 546 | <HR> |
---|
| 547 | |
---|
| 548 | <A NAME="readInt(byte[], int)"><!-- --></A><H3> |
---|
| 549 | readInt</H3> |
---|
| 550 | <PRE> |
---|
| 551 | public static int <B>readInt</B>(byte[] bytes, |
---|
| 552 | int start)</PRE> |
---|
| 553 | <DL> |
---|
| 554 | <DD>Parse an integer from a byte array. |
---|
| 555 | <P> |
---|
| 556 | <DD><DL> |
---|
| 557 | </DL> |
---|
| 558 | </DD> |
---|
| 559 | <DD><DL> |
---|
| 560 | </DL> |
---|
| 561 | </DD> |
---|
| 562 | </DL> |
---|
| 563 | <HR> |
---|
| 564 | |
---|
| 565 | <A NAME="readFloat(byte[], int)"><!-- --></A><H3> |
---|
| 566 | readFloat</H3> |
---|
| 567 | <PRE> |
---|
| 568 | public static float <B>readFloat</B>(byte[] bytes, |
---|
| 569 | int start)</PRE> |
---|
| 570 | <DL> |
---|
| 571 | <DD>Parse a float from a byte array. |
---|
| 572 | <P> |
---|
| 573 | <DD><DL> |
---|
| 574 | </DL> |
---|
| 575 | </DD> |
---|
| 576 | <DD><DL> |
---|
| 577 | </DL> |
---|
| 578 | </DD> |
---|
| 579 | </DL> |
---|
| 580 | <HR> |
---|
| 581 | |
---|
| 582 | <A NAME="readLong(byte[], int)"><!-- --></A><H3> |
---|
| 583 | readLong</H3> |
---|
| 584 | <PRE> |
---|
| 585 | public static long <B>readLong</B>(byte[] bytes, |
---|
| 586 | int start)</PRE> |
---|
| 587 | <DL> |
---|
| 588 | <DD>Parse a long from a byte array. |
---|
| 589 | <P> |
---|
| 590 | <DD><DL> |
---|
| 591 | </DL> |
---|
| 592 | </DD> |
---|
| 593 | <DD><DL> |
---|
| 594 | </DL> |
---|
| 595 | </DD> |
---|
| 596 | </DL> |
---|
| 597 | <HR> |
---|
| 598 | |
---|
| 599 | <A NAME="readDouble(byte[], int)"><!-- --></A><H3> |
---|
| 600 | readDouble</H3> |
---|
| 601 | <PRE> |
---|
| 602 | public static double <B>readDouble</B>(byte[] bytes, |
---|
| 603 | int start)</PRE> |
---|
| 604 | <DL> |
---|
| 605 | <DD>Parse a double from a byte array. |
---|
| 606 | <P> |
---|
| 607 | <DD><DL> |
---|
| 608 | </DL> |
---|
| 609 | </DD> |
---|
| 610 | <DD><DL> |
---|
| 611 | </DL> |
---|
| 612 | </DD> |
---|
| 613 | </DL> |
---|
| 614 | <HR> |
---|
| 615 | |
---|
| 616 | <A NAME="readVLong(byte[], int)"><!-- --></A><H3> |
---|
| 617 | readVLong</H3> |
---|
| 618 | <PRE> |
---|
| 619 | public static long <B>readVLong</B>(byte[] bytes, |
---|
| 620 | int start) |
---|
| 621 | 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> |
---|
| 622 | <DL> |
---|
| 623 | <DD>Reads a zero-compressed encoded long from a byte array and returns it. |
---|
| 624 | <P> |
---|
| 625 | <DD><DL> |
---|
| 626 | </DL> |
---|
| 627 | </DD> |
---|
| 628 | <DD><DL> |
---|
| 629 | <DT><B>Parameters:</B><DD><CODE>bytes</CODE> - byte array with decode long<DD><CODE>start</CODE> - starting index |
---|
| 630 | <DT><B>Returns:</B><DD>deserialized long |
---|
| 631 | <DT><B>Throws:</B> |
---|
| 632 | <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> |
---|
| 633 | </DD> |
---|
| 634 | </DL> |
---|
| 635 | <HR> |
---|
| 636 | |
---|
| 637 | <A NAME="readVInt(byte[], int)"><!-- --></A><H3> |
---|
| 638 | readVInt</H3> |
---|
| 639 | <PRE> |
---|
| 640 | public static int <B>readVInt</B>(byte[] bytes, |
---|
| 641 | int start) |
---|
| 642 | 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> |
---|
| 643 | <DL> |
---|
| 644 | <DD>Reads a zero-compressed encoded integer from a byte array and returns it. |
---|
| 645 | <P> |
---|
| 646 | <DD><DL> |
---|
| 647 | </DL> |
---|
| 648 | </DD> |
---|
| 649 | <DD><DL> |
---|
| 650 | <DT><B>Parameters:</B><DD><CODE>bytes</CODE> - byte array with the encoded integer<DD><CODE>start</CODE> - start index |
---|
| 651 | <DT><B>Returns:</B><DD>deserialized integer |
---|
| 652 | <DT><B>Throws:</B> |
---|
| 653 | <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> |
---|
| 654 | </DD> |
---|
| 655 | </DL> |
---|
| 656 | <!-- ========= END OF CLASS DATA ========= --> |
---|
| 657 | <HR> |
---|
| 658 | |
---|
| 659 | |
---|
| 660 | <!-- ======= START OF BOTTOM NAVBAR ====== --> |
---|
| 661 | <A NAME="navbar_bottom"><!-- --></A> |
---|
| 662 | <A HREF="#skip-navbar_bottom" title="Skip navigation links"></A> |
---|
| 663 | <TABLE BORDER="0" WIDTH="100%" CELLPADDING="1" CELLSPACING="0" SUMMARY=""> |
---|
| 664 | <TR> |
---|
| 665 | <TD COLSPAN=2 BGCOLOR="#EEEEFF" CLASS="NavBarCell1"> |
---|
| 666 | <A NAME="navbar_bottom_firstrow"><!-- --></A> |
---|
| 667 | <TABLE BORDER="0" CELLPADDING="0" CELLSPACING="3" SUMMARY=""> |
---|
| 668 | <TR ALIGN="center" VALIGN="top"> |
---|
| 669 | <TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1"> <A HREF="../../../../overview-summary.html"><FONT CLASS="NavBarFont1"><B>Overview</B></FONT></A> </TD> |
---|
| 670 | <TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1"> <A HREF="package-summary.html"><FONT CLASS="NavBarFont1"><B>Package</B></FONT></A> </TD> |
---|
| 671 | <TD BGCOLOR="#FFFFFF" CLASS="NavBarCell1Rev"> <FONT CLASS="NavBarFont1Rev"><B>Class</B></FONT> </TD> |
---|
| 672 | <TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1"> <A HREF="class-use/WritableComparator.html"><FONT CLASS="NavBarFont1"><B>Use</B></FONT></A> </TD> |
---|
| 673 | <TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1"> <A HREF="package-tree.html"><FONT CLASS="NavBarFont1"><B>Tree</B></FONT></A> </TD> |
---|
| 674 | <TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1"> <A HREF="../../../../deprecated-list.html"><FONT CLASS="NavBarFont1"><B>Deprecated</B></FONT></A> </TD> |
---|
| 675 | <TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1"> <A HREF="../../../../index-all.html"><FONT CLASS="NavBarFont1"><B>Index</B></FONT></A> </TD> |
---|
| 676 | <TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1"> <A HREF="../../../../help-doc.html"><FONT CLASS="NavBarFont1"><B>Help</B></FONT></A> </TD> |
---|
| 677 | </TR> |
---|
| 678 | </TABLE> |
---|
| 679 | </TD> |
---|
| 680 | <TD ALIGN="right" VALIGN="top" ROWSPAN=3><EM> |
---|
| 681 | </EM> |
---|
| 682 | </TD> |
---|
| 683 | </TR> |
---|
| 684 | |
---|
| 685 | <TR> |
---|
| 686 | <TD BGCOLOR="white" CLASS="NavBarCell2"><FONT SIZE="-2"> |
---|
| 687 | <A HREF="../../../../org/apache/hadoop/io/WritableComparable.html" title="interface in org.apache.hadoop.io"><B>PREV CLASS</B></A> |
---|
| 688 | <A HREF="../../../../org/apache/hadoop/io/WritableFactories.html" title="class in org.apache.hadoop.io"><B>NEXT CLASS</B></A></FONT></TD> |
---|
| 689 | <TD BGCOLOR="white" CLASS="NavBarCell2"><FONT SIZE="-2"> |
---|
| 690 | <A HREF="../../../../index.html?org/apache/hadoop/io/WritableComparator.html" target="_top"><B>FRAMES</B></A> |
---|
| 691 | <A HREF="WritableComparator.html" target="_top"><B>NO FRAMES</B></A> |
---|
| 692 | <SCRIPT type="text/javascript"> |
---|
| 693 | <!-- |
---|
| 694 | if(window==top) { |
---|
| 695 | document.writeln('<A HREF="../../../../allclasses-noframe.html"><B>All Classes</B></A>'); |
---|
| 696 | } |
---|
| 697 | //--> |
---|
| 698 | </SCRIPT> |
---|
| 699 | <NOSCRIPT> |
---|
| 700 | <A HREF="../../../../allclasses-noframe.html"><B>All Classes</B></A> |
---|
| 701 | </NOSCRIPT> |
---|
| 702 | |
---|
| 703 | |
---|
| 704 | </FONT></TD> |
---|
| 705 | </TR> |
---|
| 706 | <TR> |
---|
| 707 | <TD VALIGN="top" CLASS="NavBarCell3"><FONT SIZE="-2"> |
---|
| 708 | SUMMARY: NESTED | FIELD | <A HREF="#constructor_summary">CONSTR</A> | <A HREF="#method_summary">METHOD</A></FONT></TD> |
---|
| 709 | <TD VALIGN="top" CLASS="NavBarCell3"><FONT SIZE="-2"> |
---|
| 710 | DETAIL: FIELD | <A HREF="#constructor_detail">CONSTR</A> | <A HREF="#method_detail">METHOD</A></FONT></TD> |
---|
| 711 | </TR> |
---|
| 712 | </TABLE> |
---|
| 713 | <A NAME="skip-navbar_bottom"></A> |
---|
| 714 | <!-- ======== END OF BOTTOM NAVBAR ======= --> |
---|
| 715 | |
---|
| 716 | <HR> |
---|
| 717 | Copyright © 2009 The Apache Software Foundation |
---|
| 718 | </BODY> |
---|
| 719 | </HTML> |
---|