org.apache.hadoop.chukwa.datacollection.writer.localfs
Class LocalToRemoteHdfsMover
java.lang.Object
java.lang.Thread
org.apache.hadoop.chukwa.datacollection.writer.localfs.LocalToRemoteHdfsMover
- All Implemented Interfaces:
- Runnable
public class LocalToRemoteHdfsMover
- extends Thread
This class is used by LocalWriter.java.
The only role of this class is to move dataSink files
from the local file system to the remote HDFS.
Those 2 classes are using a blockingQueue to exchange
information.
This class will also take care of moving all existing
done dataSink files (.done) and any dataSink file that
has not been changed for at least (rotatePeriod+2min).
Methods inherited from class java.lang.Thread |
activeCount, checkAccess, countStackFrames, currentThread, destroy, dumpStack, enumerate, getAllStackTraces, getContextClassLoader, getDefaultUncaughtExceptionHandler, getId, getName, getPriority, getStackTrace, getState, getThreadGroup, getUncaughtExceptionHandler, holdsLock, interrupt, interrupted, isAlive, isDaemon, isInterrupted, join, join, join, resume, setContextClassLoader, setDaemon, setDefaultUncaughtExceptionHandler, setName, setPriority, setUncaughtExceptionHandler, sleep, sleep, start, stop, stop, suspend, toString, yield |
LocalToRemoteHdfsMover
public LocalToRemoteHdfsMover(BlockingQueue<String> fileQueue,
org.apache.hadoop.conf.Configuration conf)
init
protected void init()
throws Throwable
- Throws:
Throwable
moveFile
protected void moveFile(String filePath)
throws Exception
- Throws:
Exception
cleanup
protected void cleanup()
throws Exception
- Throws:
Exception
run
public void run()
- Specified by:
run
in interface Runnable
- Overrides:
run
in class Thread
shutdown
public void shutdown()
Copyright © ${year} The Apache Software Foundation