org.apache.accumulo.examples.simple.filedata
Class KeyUtil
java.lang.Object
org.apache.accumulo.examples.simple.filedata.KeyUtil
public class KeyUtil
- extends Object
A utility for creating and parsing null-byte separated strings into/from Text objects.
Method Summary |
static org.apache.hadoop.io.Text |
buildNullSepText(String... s)
Join some number of strings using a null byte separator into a text object. |
static String[] |
splitNullSepText(org.apache.hadoop.io.Text t)
Split a text object using a null byte separator into an array of strings. |
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
nullbyte
public static final byte[] nullbyte
KeyUtil
public KeyUtil()
buildNullSepText
public static org.apache.hadoop.io.Text buildNullSepText(String... s)
- Join some number of strings using a null byte separator into a text object.
- Parameters:
s
- strings
- Returns:
- a text object containing the strings separated by null bytes
splitNullSepText
public static String[] splitNullSepText(org.apache.hadoop.io.Text t)
- Split a text object using a null byte separator into an array of strings.
- Parameters:
t
- null-byte separated text object
- Returns:
- an array of strings
Copyright © 2013 Apache Accumulo Project. All Rights Reserved.