public class StreamKeyValUtil
extends java.lang.Object
| Constructor | Description |
|---|---|
StreamKeyValUtil() |
| Modifier and Type | Method | Description |
|---|---|---|
static int |
findTab(byte[] utf) |
Find the first occurred tab in a UTF-8 encoded string
|
static int |
findTab(byte[] utf,
int start,
int length) |
Find the first occurred tab in a UTF-8 encoded string
|
static int |
readLine(org.apache.hadoop.util.LineReader lineReader,
org.apache.hadoop.io.Text out) |
Read a utf8 encoded line from a data input stream.
|
static void |
splitKeyVal(byte[] utf,
int start,
int length,
org.apache.hadoop.io.Text key,
org.apache.hadoop.io.Text val,
int splitPos) |
split a UTF-8 byte array into key and value
assuming that the delimilator is at splitpos.
|
static void |
splitKeyVal(byte[] utf,
int start,
int length,
org.apache.hadoop.io.Text key,
org.apache.hadoop.io.Text val,
int splitPos,
int separatorLength) |
split a UTF-8 byte array into key and value
assuming that the delimilator is at splitpos.
|
static void |
splitKeyVal(byte[] utf,
org.apache.hadoop.io.Text key,
org.apache.hadoop.io.Text val,
int splitPos) |
split a UTF-8 byte array into key and value
assuming that the delimilator is at splitpos.
|
static void |
splitKeyVal(byte[] utf,
org.apache.hadoop.io.Text key,
org.apache.hadoop.io.Text val,
int splitPos,
int separatorLength) |
split a UTF-8 byte array into key and value
assuming that the delimilator is at splitpos.
|
public static int findTab(byte[] utf,
int start,
int length)
utf - a byte array containing a UTF-8 encoded stringstart - starting offsetlength - no. of bytespublic static int findTab(byte[] utf)
utf - a byte array containing a UTF-8 encoded stringpublic static void splitKeyVal(byte[] utf,
int start,
int length,
org.apache.hadoop.io.Text key,
org.apache.hadoop.io.Text val,
int splitPos,
int separatorLength)
throws java.io.IOException
utf - utf-8 encoded stringstart - starting offsetlength - no. of byteskey - contains key upon the method is returnedval - contains value upon the method is returnedsplitPos - the split posseparatorLength - the length of the separator between key and valuejava.io.IOExceptionpublic static void splitKeyVal(byte[] utf,
int start,
int length,
org.apache.hadoop.io.Text key,
org.apache.hadoop.io.Text val,
int splitPos)
throws java.io.IOException
utf - utf-8 encoded stringstart - starting offsetlength - no. of byteskey - contains key upon the method is returnedval - contains value upon the method is returnedsplitPos - the split posjava.io.IOExceptionpublic static void splitKeyVal(byte[] utf,
org.apache.hadoop.io.Text key,
org.apache.hadoop.io.Text val,
int splitPos,
int separatorLength)
throws java.io.IOException
utf - utf-8 encoded stringkey - contains key upon the method is returnedval - contains value upon the method is returnedsplitPos - the split posseparatorLength - the length of the separator between key and valuejava.io.IOExceptionpublic static void splitKeyVal(byte[] utf,
org.apache.hadoop.io.Text key,
org.apache.hadoop.io.Text val,
int splitPos)
throws java.io.IOException
utf - utf-8 encoded stringkey - contains key upon the method is returnedval - contains value upon the method is returnedsplitPos - the split posjava.io.IOExceptionpublic static int readLine(org.apache.hadoop.util.LineReader lineReader,
org.apache.hadoop.io.Text out)
throws java.io.IOException
lineReader - LineReader to read the line from.out - Text to read intojava.io.IOExceptionCopyright © 2008–2025 Apache Software Foundation. All rights reserved.