org.apache.pig.impl.streaming
Class StreamingDelimiters
java.lang.Object
org.apache.pig.impl.streaming.StreamingDelimiters
public class StreamingDelimiters
- extends Object
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
StreamingDelimiters
public StreamingDelimiters()
StreamingDelimiters
public StreamingDelimiters(byte preWrapDelim,
byte postWrapDelim,
boolean useEmptyNull)
- Parameters:
preWrapDelim
- postWrapDelim
- useEmptyNull
- - In the past empty was used to serialize null. But this can
make it impossible to differentiate between an empty string and null. Set
to false if you want to use a special character to represent null.
getTupleBegin
public byte[] getTupleBegin()
getTupleEnd
public byte[] getTupleEnd()
getBagBegin
public byte[] getBagBegin()
getBagEnd
public byte[] getBagEnd()
getMapBegin
public byte[] getMapBegin()
getMapEnd
public byte[] getMapEnd()
getFieldDelim
public byte[] getFieldDelim()
getMapKeyDelim
public byte getMapKeyDelim()
getNull
public byte[] getNull()
getParamDelim
public byte[] getParamDelim()
getRecordEnd
public byte[] getRecordEnd()
updateDepth
public int updateDepth(byte[] buf,
int currDepth,
int index)
- Returns:
- - The new depth. Depth is increased if at the end of a byte sequence
that indicates the start of a bag, tuple, or map. Depth is decreased if at the
end of a byte sequence that indicates the end of a bug, tuple, or map.
isDelimiter
public static boolean isDelimiter(byte[] delimiter,
byte[] buf,
int index,
int depth,
int endIndex)
- Parameters:
delimiter
- buf
- index
- depth
- endIndex
-
- Returns:
- - True iff the delimiter
Copyright © 2007-2012 The Apache Software Foundation