| Modifier and Type | Field and Description |
|---|---|
static int |
PROTOCOL_VERSION |
| Constructor and Description |
|---|
ChunkImpl(String dataType,
String streamName,
long seq,
byte[] data,
Adaptor source) |
| Modifier and Type | Method and Description |
|---|---|
void |
addTag(String tags)
Add tag.
|
static ChunkImpl |
getBlankChunk() |
byte[] |
getData() |
String |
getDataType() |
String |
getDebugInfo() |
Adaptor |
getInitiator()
Retrieve a reference to the adaptor that sent this event.
|
int |
getLength() |
int |
getProtocolVersion() |
int[] |
getRecordOffsets()
get/set the end offsets of records in the buffer.
|
long |
getSeqID() |
int |
getSerializedSizeEstimate()
Estimate the size of this Chunk on the wire, assuming each char of metadata
takes two bytes to serialize.
|
String |
getSource() |
String |
getStreamName()
Get the name of the stream that this Chunk is a chunk of
|
String |
getTag(String tagName)
Returns the value of a single tag, assuming tags are of the form
tagname="val"
|
String |
getTags() |
static ChunkImpl |
read(DataInput in) |
void |
readFields(DataInput in) |
void |
setData(byte[] logEvent) |
void |
setDataType(String t) |
void |
setDebugInfo(String a) |
static void |
setHostAddress(String host) |
void |
setInitiator(Adaptor a) |
void |
setLogSource() |
void |
setProtocolVersion(int pv) |
void |
setRecordOffsets(Collection<Integer> carriageReturns) |
void |
setRecordOffsets(int[] offsets) |
void |
setSeqID(long l) |
void |
setSource(String logSource) |
void |
setStreamName(String logApplication) |
String |
toString() |
void |
write(DataOutput out) |
public static final int PROTOCOL_VERSION
public static void setHostAddress(String host)
public static ChunkImpl getBlankChunk()
public byte[] getData()
getData in interface ChunkChunk.getData()public void setData(byte[] logEvent)
setData in interface ChunklogEvent - the user data in the chunkChunk.setData(byte[])public String getStreamName()
ChunkgetStreamName in interface ChunkChunk.getStreamName()public void setStreamName(String logApplication)
setStreamName in interface Chunkpublic String getDebugInfo()
public void setDebugInfo(String a)
public long getSeqID()
getSeqID in interface ChunkChunk.getSeqID()public int getProtocolVersion()
public void setProtocolVersion(int pv)
public Adaptor getInitiator()
ChunkgetInitiator in interface Chunkpublic void setInitiator(Adaptor a)
public void setLogSource()
public int[] getRecordOffsets()
ChunkgetRecordOffsets in interface Chunkpublic void setRecordOffsets(int[] offsets)
setRecordOffsets in interface Chunkpublic String getDataType()
getDataType in interface Chunkpublic void setDataType(String t)
setDataType in interface Chunkpublic String getTags()
getTags in interface ChunkChunk.getTags()public String getTag(String tagName)
ChunkgetTag in interface ChunktagName - the tag to returnChunk.getTag(java.lang.String)public void readFields(DataInput in) throws IOException
readFields in interface org.apache.hadoop.io.WritableIOExceptionWritable.readFields(java.io.DataInput)public void write(DataOutput out) throws IOException
write in interface Chunkwrite in interface org.apache.hadoop.io.WritableIOExceptionWritable.write(java.io.DataOutput)public static ChunkImpl read(DataInput in) throws IOException
IOExceptionpublic int getSerializedSizeEstimate()
ChunkgetSerializedSizeEstimate in interface ChunkChunk.getSerializedSizeEstimate()public void setRecordOffsets(Collection<Integer> carriageReturns)
public int getLength()
Copyright © 2016 Apache Software Foundation. All Rights Reserved.