public final class StorageUtil
extends java.lang.Object
PigStorage and streaming class PigStreaming| Modifier and Type | Field and Description | 
|---|---|
| static StreamingDelimiters | DEFAULT_DELIMITERS | 
| Constructor and Description | 
|---|
| StorageUtil() | 
| Modifier and Type | Method and Description | 
|---|---|
| static Tuple | bytesToTuple(byte[] buf,
            int offset,
            int length,
            byte fieldDel)Transform bytes from a byte array up to the specified length to a  Tuple | 
| static byte | parseFieldDel(java.lang.String delimiter)Transform a  Stringinto a byte representing the
 field delimiter. | 
| static void | putField(java.io.OutputStream out,
        java.lang.Object field) | 
| static void | putField(java.io.OutputStream out,
        java.lang.Object field,
        boolean includeTypeInformation) | 
| static void | putField(java.io.OutputStream out,
        java.lang.Object field,
        StreamingDelimiters delims,
        boolean includeTypeInformation)Serialize an object to an  OutputStreamin the
 field-delimited form. | 
| static Tuple | textToTuple(org.apache.hadoop.io.Text val,
           byte fieldDel)Transform a line of  Textto aTuple | 
public static final StreamingDelimiters DEFAULT_DELIMITERS
public static byte parseFieldDel(java.lang.String delimiter)
String into a byte representing the
 field delimiter.delimiter - a string that may be in single-quoted formpublic static void putField(java.io.OutputStream out,
                            java.lang.Object field)
                     throws java.io.IOException
java.io.IOExceptionpublic static void putField(java.io.OutputStream out,
                            java.lang.Object field,
                            boolean includeTypeInformation)
                     throws java.io.IOException
java.io.IOExceptionpublic static void putField(java.io.OutputStream out,
                            java.lang.Object field,
                            StreamingDelimiters delims,
                            boolean includeTypeInformation)
                     throws java.io.IOException
OutputStream in the
 field-delimited form.out - an OutputStream objectfield - an object to be serializedjava.io.IOException - if serialization fails.public static Tuple textToTuple(org.apache.hadoop.io.Text val, byte fieldDel)
Text to a Tupleval - a line of textfieldDel - the field delimiterpublic static Tuple bytesToTuple(byte[] buf, int offset, int length, byte fieldDel)
Tuplebuf - the byte arraylength - number of bytes to consume from the byte arrayfieldDel - the field delimiterCopyright © 2007-2025 The Apache Software Foundation