org.apache.hadoop.chukwa.extraction.engine.datasource.record
Class ChukwaRecordDataSource

java.lang.Object
  extended by org.apache.hadoop.chukwa.extraction.engine.datasource.record.ChukwaRecordDataSource
All Implemented Interfaces:
DataSource

public class ChukwaRecordDataSource
extends Object
implements DataSource


Constructor Summary
ChukwaRecordDataSource()
           
 
Method Summary
 String buildFileName(int directoryType, String rootFolder, String dataSource, int spill, String day, String hour, int rawIndex)
           
 boolean containsRotateFlag(int directoryType, String rootFolder, String dataSource, String workingDay, String workingHour)
           
 boolean exist(int directoryType, String rootFolder, String dataSource, String workingDay, String workingHour, String raw)
           
 void extractRecords(ChukwaDSInternalResult res, int directoryType, String rootFolder, String dataSource, String day, String hour, int rawIndex, Token token, List<Record> records, int maxRows, long t0, long t1, String filter)
           
 boolean isThreadSafe()
           
protected  boolean isValid(ChukwaRecord record, String filter)
           
static void main(String[] args)
           
 void readData(ChukwaDSInternalResult res, Token token, String fileName, int maxRows, long t0, long t1, String filter)
           
 SearchResult search(SearchResult result, String cluster, String dataSource, long t0, long t1, String filter, Token token)
           
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

ChukwaRecordDataSource

public ChukwaRecordDataSource()
Method Detail

isThreadSafe

public boolean isThreadSafe()
Specified by:
isThreadSafe in interface DataSource

search

public SearchResult search(SearchResult result,
                           String cluster,
                           String dataSource,
                           long t0,
                           long t1,
                           String filter,
                           Token token)
                    throws DataSourceException
Specified by:
search in interface DataSource
Throws:
DataSourceException

extractRecords

public void extractRecords(ChukwaDSInternalResult res,
                           int directoryType,
                           String rootFolder,
                           String dataSource,
                           String day,
                           String hour,
                           int rawIndex,
                           Token token,
                           List<Record> records,
                           int maxRows,
                           long t0,
                           long t1,
                           String filter)
                    throws Exception
Throws:
Exception

readData

public void readData(ChukwaDSInternalResult res,
                     Token token,
                     String fileName,
                     int maxRows,
                     long t0,
                     long t1,
                     String filter)
              throws Exception
Throws:
Exception

containsRotateFlag

public boolean containsRotateFlag(int directoryType,
                                  String rootFolder,
                                  String dataSource,
                                  String workingDay,
                                  String workingHour)
                           throws Exception
Throws:
Exception

exist

public boolean exist(int directoryType,
                     String rootFolder,
                     String dataSource,
                     String workingDay,
                     String workingHour,
                     String raw)
              throws Exception
Throws:
Exception

isValid

protected boolean isValid(ChukwaRecord record,
                          String filter)

buildFileName

public String buildFileName(int directoryType,
                            String rootFolder,
                            String dataSource,
                            int spill,
                            String day,
                            String hour,
                            int rawIndex)

main

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


Copyright © ${year} The Apache Software Foundation