|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Objectorg.apache.hadoop.chukwa.ChunkImpl
public class ChunkImpl
| Field Summary | |
|---|---|
protected DataFactory |
dataFactory
|
static int |
PROTOCOL_VERSION
|
| Constructor Summary | |
|---|---|
ChunkImpl(String dataType,
String streamName,
long seq,
byte[] data,
Adaptor source)
|
|
| Method Summary | |
|---|---|
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)
|
| Methods inherited from class java.lang.Object |
|---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait |
| Field Detail |
|---|
public static int PROTOCOL_VERSION
protected DataFactory dataFactory
| Constructor Detail |
|---|
public ChunkImpl(String dataType,
String streamName,
long seq,
byte[] data,
Adaptor source)
| Method Detail |
|---|
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()
Chunk
getStreamName in interface ChunkChunk.getStreamName()public void setStreamName(String logApplication)
setStreamName in interface Chunkpublic String getSource()
getSource in interface Chunkpublic void setSource(String logSource)
setSource in interface Chunkpublic String getDebugInfo()
public void setDebugInfo(String a)
public long getSeqID()
getSeqID in interface ChunkChunk.getSeqID()public void setSeqID(long l)
setSeqID in interface Chunkpublic int getProtocolVersion()
public void setProtocolVersion(int pv)
public String getApplication()
getApplication in interface Chunkpublic void setApplication(String a)
setApplication in interface Chunkpublic Adaptor getInitiator()
Chunk
getInitiator in interface Chunkpublic void setInitiator(Adaptor a)
public void setLogSource()
public int[] getRecordOffsets()
Chunk
getRecordOffsets 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 void addTag(String tags)
Chunk
addTag 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 String toString()
toString in class Objectpublic int getSerializedSizeEstimate()
Chunk
getSerializedSizeEstimate in interface ChunkChunk.getSerializedSizeEstimate()public void setRecordOffsets(Collection<Integer> carriageReturns)
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||