|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Objectorg.apache.hadoop.chukwa.datacollection.adaptor.AbstractAdaptor
org.apache.hadoop.chukwa.datacollection.adaptor.FileAdaptor
public class FileAdaptor
File Adaptor push small size file in one chunk to collector
| Field Summary | |
|---|---|
protected long |
fileReadOffset
|
protected boolean |
finished
|
protected RandomAccessFile |
reader
|
protected boolean |
shutdownCalled
|
| Fields inherited from class org.apache.hadoop.chukwa.datacollection.adaptor.AbstractAdaptor |
|---|
adaptorID, control, dest, type |
| Constructor Summary | |
|---|---|
FileAdaptor()
|
|
| Method Summary | |
|---|---|
protected int |
extractRecords(ChunkReceiver eq,
long buffOffsetInFile,
byte[] buf,
long fileTime)
Extract records from a byte sequence |
String |
getCurrentStatus()
Return the adaptor's state Should not include class name or byte offset, which are written by caller. |
void |
hardStop()
Deprecated. |
String |
parseArgs(String params)
Parse args, return stream name. |
long |
shutdown()
Deprecated. |
long |
shutdown(AdaptorShutdownPolicy shutdownPolicy)
Signals this adaptor to come to an orderly stop. |
void |
start(long bytes)
|
| Methods inherited from class org.apache.hadoop.chukwa.datacollection.adaptor.AbstractAdaptor |
|---|
deregisterAndStop, getType, start |
| Methods inherited from class java.lang.Object |
|---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Field Detail |
|---|
protected volatile boolean finished
protected RandomAccessFile reader
protected long fileReadOffset
protected boolean shutdownCalled
| Constructor Detail |
|---|
public FileAdaptor()
| Method Detail |
|---|
public void start(long bytes)
start in class AbstractAdaptor
@Deprecated
public long shutdown()
throws AdaptorException
AdaptorExceptionAdaptor.shutdown()
@Deprecated
public void hardStop()
throws AdaptorException
AdaptorExceptionpublic long shutdown(AdaptorShutdownPolicy shutdownPolicy)
Adaptor
public String parseArgs(String params)
Adaptor
protected int extractRecords(ChunkReceiver eq,
long buffOffsetInFile,
byte[] buf,
long fileTime)
throws InterruptedException
eq - the queue to stick the new chunk[s] inbuffOffsetInFile - the byte offset in the stream at which buf[] beginsbuf - the byte buffer to extract records from
InterruptedExceptionpublic String getCurrentStatus()
Adaptor
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||