| Modifier and Type | Field and Description |
|---|---|
protected DataFactory |
dataFactory |
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.
|
String |
getApplication() |
static ChunkImpl |
getBlankChunk() |
byte[] |
getData() |
String |
getDataType() |
String |
getDebugInfo() |
Adaptor |
getInitiator()
Retrieve a reference to the adaptor that sent this event.
|
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 |
getTags() |
static ChunkImpl |
read(DataInput in) |
void |
readFields(DataInput in) |
void |
setApplication(String a) |
void |
setData(byte[] logEvent) |
void |
setDataType(String t) |
void |
setDebugInfo(String a) |
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 int PROTOCOL_VERSION
protected DataFactory dataFactory
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 String getApplication()
getApplication in interface Chunkpublic void setApplication(String a)
setApplication in interface Chunkpublic 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 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)
Copyright © ${year} The Apache Software Foundation