|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectorg.apache.hadoop.hive.ql.QTestUtil
public class QTestUtil
QTestUtil.
Nested Class Summary | |
---|---|
static class |
QTestUtil.QTestSetup
QTestSetup defines test fixtures which are reused across testcases, and are needed before any test can be run |
static class |
QTestUtil.QTRunner
QTRunner: Runnable class for running a a single query file. |
Field Summary | |
---|---|
protected HiveConf |
conf
|
static HashSet<String> |
srcTables
|
Constructor Summary | |
---|---|
QTestUtil(String outDir,
String logDir)
|
|
QTestUtil(String outDir,
String logDir,
boolean miniMr,
String hadoopVer)
|
Method Summary | |
---|---|
void |
addFile(File qf)
|
void |
addFile(String qFile)
|
List<Task<? extends Serializable>> |
analyzeAST(ASTNode ast)
|
int |
checkCliDriverResults(String tname)
|
int |
checkNegativeResults(String tname,
Exception e)
|
int |
checkParseResults(String tname,
ASTNode tree)
|
int |
checkPlan(String tname,
List<Task<? extends Serializable>> tasks)
|
void |
cleanUp()
|
void |
clearPostTestEffects()
Clear out any side effects of running tests |
void |
clearTestSideEffects()
Clear out any side effects of running tests |
void |
cliInit(String tname)
|
void |
cliInit(String tname,
boolean recreate)
|
void |
convertSequenceFileToTextFile()
|
void |
copyDirectoryToLocal(org.apache.hadoop.fs.Path src,
org.apache.hadoop.fs.Path dest)
|
void |
createSources()
|
boolean |
deleteDirectory(File path)
|
int |
execute(String tname)
|
int |
executeClient(String tname)
|
int |
executeOne(String tname)
|
TreeMap<String,String> |
getQMap()
|
void |
init()
|
void |
init(String tname)
|
void |
initConf()
|
void |
normalizeNames(File path)
|
String |
outPath(String outDir,
String testName)
Given the current configurations (e.g., hadoop version and execution mode), return the correct file name to compare with the current test run output. |
static void |
outputTestFailureHelpMessage()
|
ASTNode |
parseQuery(String tname)
|
static boolean |
queryListRunner(File[] qfiles,
String[] resDirs,
String[] logDirs,
boolean mt,
junit.framework.Test test)
executes a set of query files either in sequence or in parallel. |
void |
resetParser()
|
boolean |
shouldBeSkipped(String tname)
|
void |
shutdown()
|
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Field Detail |
---|
public static final HashSet<String> srcTables
protected HiveConf conf
Constructor Detail |
---|
public QTestUtil(String outDir, String logDir) throws Exception
Exception
public QTestUtil(String outDir, String logDir, boolean miniMr, String hadoopVer) throws Exception
Exception
Method Detail |
---|
public boolean deleteDirectory(File path)
public void copyDirectoryToLocal(org.apache.hadoop.fs.Path src, org.apache.hadoop.fs.Path dest) throws Exception
Exception
public void normalizeNames(File path) throws Exception
Exception
public void initConf() throws Exception
Exception
public void shutdown() throws Exception
Exception
public void addFile(String qFile) throws Exception
Exception
public void addFile(File qf) throws Exception
Exception
public void clearPostTestEffects() throws Exception
Exception
public void clearTestSideEffects() throws Exception
Exception
public void cleanUp() throws Exception
Exception
public void createSources() throws Exception
Exception
public void init() throws Exception
Exception
public void init(String tname) throws Exception
Exception
public void cliInit(String tname) throws Exception
Exception
public void cliInit(String tname, boolean recreate) throws Exception
Exception
public int executeOne(String tname)
public int execute(String tname)
public int executeClient(String tname)
public boolean shouldBeSkipped(String tname)
public void convertSequenceFileToTextFile() throws Exception
Exception
public int checkNegativeResults(String tname, Exception e) throws Exception
Exception
public int checkParseResults(String tname, ASTNode tree) throws Exception
Exception
public int checkPlan(String tname, List<Task<? extends Serializable>> tasks) throws Exception
Exception
public String outPath(String outDir, String testName)
outDir
- The directory where the reference log files are stored.testName
- The test file name (terminated by ".out").
public int checkCliDriverResults(String tname) throws Exception
Exception
public ASTNode parseQuery(String tname) throws Exception
Exception
public void resetParser() throws SemanticException
SemanticException
public List<Task<? extends Serializable>> analyzeAST(ASTNode ast) throws Exception
Exception
public TreeMap<String,String> getQMap()
public static boolean queryListRunner(File[] qfiles, String[] resDirs, String[] logDirs, boolean mt, junit.framework.Test test)
qfiles
- array of input query files containing arbitrary number of hive
queriesresDirs
- array of output directories one corresponding to each input query
filemt
- whether to run in multithreaded mode or not
public static void outputTestFailureHelpMessage()
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |