|
||||||||||
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 |
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 |
setApplication(String a)
|
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)
|
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 void setHostAddress(String host)
public static ChunkImpl getBlankChunk()
public byte[] getData()
getData
in interface Chunk
Chunk.getData()
public void setData(byte[] logEvent)
setData
in interface Chunk
logEvent
- the user data in the chunkChunk.setData(byte[])
public String getStreamName()
Chunk
getStreamName
in interface Chunk
Chunk.getStreamName()
public void setStreamName(String logApplication)
setStreamName
in interface Chunk
public String getSource()
getSource
in interface Chunk
public void setSource(String logSource)
setSource
in interface Chunk
public String getDebugInfo()
public void setDebugInfo(String a)
public long getSeqID()
getSeqID
in interface Chunk
Chunk.getSeqID()
public void setSeqID(long l)
setSeqID
in interface Chunk
public int getProtocolVersion()
public void setProtocolVersion(int pv)
public String getApplication()
getApplication
in interface Chunk
public void setApplication(String a)
setApplication
in interface Chunk
public Adaptor getInitiator()
Chunk
getInitiator
in interface Chunk
public void setInitiator(Adaptor a)
public void setLogSource()
public int[] getRecordOffsets()
Chunk
getRecordOffsets
in interface Chunk
public void setRecordOffsets(int[] offsets)
setRecordOffsets
in interface Chunk
public String getDataType()
getDataType
in interface Chunk
public void setDataType(String t)
setDataType
in interface Chunk
public void addTag(String tags)
Chunk
addTag
in interface Chunk
public String getTags()
getTags
in interface Chunk
Chunk.getTags()
public String getTag(String tagName)
Chunk
getTag
in interface Chunk
tagName
- the tag to return
Chunk.getTag(java.lang.String)
public void readFields(DataInput in) throws IOException
readFields
in interface org.apache.hadoop.io.Writable
IOException
Writable.readFields(java.io.DataInput)
public void write(DataOutput out) throws IOException
write
in interface Chunk
write
in interface org.apache.hadoop.io.Writable
IOException
Writable.write(java.io.DataOutput)
public static ChunkImpl read(DataInput in) throws IOException
IOException
public String toString()
toString
in class Object
public int getSerializedSizeEstimate()
Chunk
getSerializedSizeEstimate
in interface Chunk
Chunk.getSerializedSizeEstimate()
public void setRecordOffsets(Collection<Integer> carriageReturns)
public int getLength()
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |