|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectorg.apache.hadoop.hive.serde2.lazy.LazyUtils
public final class LazyUtils
LazyUtils.
Method Summary | |
---|---|
static int |
compare(byte[] b1,
int start1,
int length1,
byte[] b2,
int start2,
int length2)
Returns -1 if the first byte sequence is lexicographically less than the second; returns +1 if the second byte sequence is lexicographically less than the first; otherwise return 0. |
static String |
convertToString(byte[] bytes,
int start,
int length)
Convert a UTF-8 byte array to String. |
static byte[] |
createByteArray(org.apache.hadoop.io.BytesWritable sourceBw)
gets a byte[] with copy of data from source BytesWritable |
static int |
digit(int b,
int radix)
Returns the digit represented by character b. |
static void |
extractColumnInfo(Properties tbl,
LazySimpleSerDe.SerDeParameters serdeParams,
String serdeName)
|
static int |
hashBytes(byte[] data,
int start,
int len)
|
static void |
writePrimitive(OutputStream out,
Object o,
PrimitiveObjectInspector oi)
Write out a binary representation of a PrimitiveObject to a byte stream. |
static void |
writePrimitiveUTF8(OutputStream out,
Object o,
PrimitiveObjectInspector oi,
boolean escaped,
byte escapeChar,
boolean[] needsEscape)
Write out the text representation of a Primitive Object to a UTF8 byte stream. |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Method Detail |
---|
public static int digit(int b, int radix)
b
- The ascii code of the characterradix
- The radix
public static int compare(byte[] b1, int start1, int length1, byte[] b2, int start2, int length2)
public static String convertToString(byte[] bytes, int start, int length)
bytes
- The byte[] containing the UTF-8 String.start
- The start position inside the bytes.length
- The length of the data, starting from "start"
public static void writePrimitiveUTF8(OutputStream out, Object o, PrimitiveObjectInspector oi, boolean escaped, byte escapeChar, boolean[] needsEscape) throws IOException
out
- The UTF8 byte OutputStreamo
- The primitive ObjectneedsEscape
- Whether a character needs escaping. This array should have size of
128.
IOException
public static void writePrimitive(OutputStream out, Object o, PrimitiveObjectInspector oi) throws IOException
out
- ByteStream.Output, an unsynchronized version of ByteArrayOutputStream, used as a
backing buffer for the the DataOutputStreamo
- the PrimitiveObjectoi
- the PrimitiveObjectInspector
IOException
- on error during the write operationpublic static int hashBytes(byte[] data, int start, int len)
public static void extractColumnInfo(Properties tbl, LazySimpleSerDe.SerDeParameters serdeParams, String serdeName) throws SerDeException
SerDeException
public static byte[] createByteArray(org.apache.hadoop.io.BytesWritable sourceBw)
sourceBw
- - source BytesWritable
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |