|
||||||||||
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
|
protected String |
logDir
|
protected String |
outDir
|
protected boolean |
overWrite
|
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)
|
String |
getLogDirectory()
|
String |
getOutputDirectory()
|
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 |
queryListRunnerMultiThreaded(File[] qfiles,
QTestUtil[] qt)
Executes a set of query files parallel. |
static QTestUtil[] |
queryListRunnerSetup(File[] qfiles,
String resDir,
String logDir)
Setup to execute a set of query files. |
static boolean |
queryListRunnerSingleThreaded(File[] qfiles,
QTestUtil[] qt)
Executes a set of query files in sequence. |
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 |
---|
protected final String outDir
protected final String logDir
public static final HashSet<String> srcTables
protected HiveConf conf
protected final boolean overWrite
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 String getOutputDirectory()
public String getLogDirectory()
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 QTestUtil[] queryListRunnerSetup(File[] qfiles, String resDir, String logDir) throws Exception
qfiles
- array of input query files containing arbitrary number of hive
queriesresDir
- output directorylogDir
- log directory
Exception
public static boolean queryListRunnerSingleThreaded(File[] qfiles, QTestUtil[] qt) throws Exception
qfiles
- array of input query files containing arbitrary number of hive
queriesqt
- array of QTestUtils, one per qfile
Exception
public static boolean queryListRunnerMultiThreaded(File[] qfiles, QTestUtil[] qt) throws Exception
qfiles
- array of input query files containing arbitrary number of hive
queriesqt
- array of QTestUtils, one per qfile
Exception
public static void outputTestFailureHelpMessage()
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |