org.apache.hadoop.chukwa.extraction.archive
Class ChukwaArchiveManager

java.lang.Object
  extended by org.apache.hadoop.chukwa.extraction.archive.ChukwaArchiveManager
All Implemented Interfaces:
CHUKWA_CONSTANT

public class ChukwaArchiveManager
extends Object
implements CHUKWA_CONSTANT


Field Summary
protected  ChukwaConfiguration conf
           
protected  org.apache.hadoop.fs.FileSystem fs
           
protected  boolean isRunning
           
 
Fields inherited from interface org.apache.hadoop.chukwa.extraction.CHUKWA_CONSTANT
CHUKWA_ARCHIVE_DIR_FIELD, CHUKWA_DATA_SINK_DIR_FIELD, CHUKWA_DEMUX_REDUCER_COUNT_FIELD, CHUKWA_NAGIOS_HOST_FIELD, CHUKWA_NAGIOS_PORT_FIELD, CHUKWA_POST_PROCESS_DIR_FIELD, CHUKWA_REPORTING_HOST_FIELD, CHUKWA_ROOT_DIR_FIELD, CHUKWA_ROOT_REPOS_DIR_FIELD, DEFAULT_ARCHIVES_IN_ERROR_DIR_NAME, DEFAULT_ARCHIVES_MR_INPUT_DIR_NAME, DEFAULT_ARCHIVES_MR_OUTPUT_DIR_NAME, DEFAULT_ARCHIVES_PROCESSING_DIR_NAME, DEFAULT_CHUKWA_DATASINK_DIR_NAME, DEFAULT_CHUKWA_LOGS_DIR_NAME, DEFAULT_CHUKWA_POSTPROCESS_DIR_NAME, DEFAULT_DEMUX_IN_ERROR_DIR_NAME, DEFAULT_DEMUX_MR_INPUT_DIR_NAME, DEFAULT_DEMUX_MR_OUTPUT_DIR_NAME, DEFAULT_DEMUX_PROCESSING_DIR_NAME, DEFAULT_DEMUX_ROOT_DIR_NAME, DEFAULT_FINAL_ARCHIVES, DEFAULT_REPOS_DIR_NAME, WRITER_HDFS_FILESYSTEM_FIELD
 
Constructor Summary
ChukwaArchiveManager()
           
ChukwaArchiveManager(ChukwaConfiguration conf)
           
 
Method Summary
protected  void init()
           
static void main(String[] args)
           
 void moveDataSinkFilesToArchiveMrInput(org.apache.hadoop.fs.FileStatus fsDataSinkDir, String archivesMRInputDir)
           
 void processDay(org.apache.hadoop.fs.FileStatus fsDay, String archivesMRInputDir, String archivesMROutputDir, String finalArchiveOutput)
           
 void runArchive(String archivesMRInputDir, String archivesMROutputDir, String finalArchiveOutput)
           
protected  void setup(org.apache.hadoop.fs.Path directory)
          Create directory if !exists
 void shutdown()
           
 void start()
           
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

conf

protected ChukwaConfiguration conf

fs

protected org.apache.hadoop.fs.FileSystem fs

isRunning

protected boolean isRunning
Constructor Detail

ChukwaArchiveManager

public ChukwaArchiveManager()
                     throws Exception
Throws:
Exception

ChukwaArchiveManager

public ChukwaArchiveManager(ChukwaConfiguration conf)
                     throws Exception
Throws:
Exception
Method Detail

init

protected void init()
             throws IOException,
                    URISyntaxException
Throws:
IOException
URISyntaxException

main

public static void main(String[] args)
                 throws Exception
Throws:
Exception

shutdown

public void shutdown()

start

public void start()
           throws Exception
Throws:
Exception

processDay

public void processDay(org.apache.hadoop.fs.FileStatus fsDay,
                       String archivesMRInputDir,
                       String archivesMROutputDir,
                       String finalArchiveOutput)
                throws Exception
Throws:
Exception

runArchive

public void runArchive(String archivesMRInputDir,
                       String archivesMROutputDir,
                       String finalArchiveOutput)
                throws Exception
Throws:
Exception

moveDataSinkFilesToArchiveMrInput

public void moveDataSinkFilesToArchiveMrInput(org.apache.hadoop.fs.FileStatus fsDataSinkDir,
                                              String archivesMRInputDir)
                                       throws IOException
Throws:
IOException

setup

protected void setup(org.apache.hadoop.fs.Path directory)
              throws IOException
Create directory if !exists

Parameters:
directory -
Throws:
IOException


Copyright © ${year} The Apache Software Foundation