Impala
Impalaistheopensource,nativeanalyticdatabaseforApacheHadoop.
|
Classes | |
enum | Section |
class | TestCase |
Public Member Functions | |
TestFileParser (String fileName) | |
List< TestCase > | getTestCases () |
String | getTestFileName () |
boolean | hasSetupSection () |
void | parseFile () |
void | parseFile (String table) |
Private Member Functions | |
void | open (String table) |
TestCase | parseOneTestCase () |
void | close () |
Private Attributes | |
final List< TestCase > | testCases = Lists.newArrayList() |
int | lineNum = 0 |
final String | fileName |
BufferedReader | reader |
Scanner | scanner |
boolean | hasSetupSection = false |
Static Private Attributes | |
static final Logger | LOG = Logger.getLogger(TestCase.class) |
static final ArrayList< Section > | defaultSectionOrder |
Parses a file containing one or more test case descriptions into a list of TestCase objects. A test file has the following format:
<QUERY string>=""> -— <SECTION NAME 1> <EXPECTED CONTENTS 1> -— <SECTION NAME 2> <EXPECTED CONTENTS 2> -— <SECTION NAME 3>
<QUERY string>=""> -— <SECTION NAME 1> <EXPECTED CONTENTS 1> -— <SECTION NAME 2> <EXPECTED CONTENTS 2> -— <SECTION NAME 3>
Acceptable section names are ONLY those contained in TestFileParser.Section.
Lines beginning with # or // are comments. Clients can retrieve sections with or without these lines included.
Note that <QUERY string>=""> and <EXPECTED contents>=""> sections can consist of multiple lines.
Definition at line 51 of file TestFileParser.java.
|
inline |
Definition at line 201 of file TestFileParser.java.
References com.cloudera.impala.testutil.TestFileParser.fileName.
|
inlineprivate |
Definition at line 318 of file TestFileParser.java.
References com.cloudera.impala.testutil.TestFileParser.reader, and com.cloudera.impala.testutil.TestFileParser.scanner.
Referenced by com.cloudera.impala.testutil.TestFileParser.parseFile().
|
inline |
Definition at line 205 of file TestFileParser.java.
References com.cloudera.impala.testutil.TestFileParser.testCases.
Referenced by com.cloudera.impala.planner.PlannerTestBase.runPlannerTestFile().
|
inline |
Definition at line 209 of file TestFileParser.java.
References com.cloudera.impala.testutil.TestFileParser.fileName.
|
inline |
Definition at line 213 of file TestFileParser.java.
Referenced by com.cloudera.impala.testutil.TestFileParser.parseOneTestCase().
|
inlineprivate |
Initializes the scanner and the input stream corresponding to the test file name
Definition at line 220 of file TestFileParser.java.
References com.cloudera.impala.testutil.TestFileParser.fileName, com.cloudera.impala.testutil.TestFileParser.reader, and com.cloudera.impala.testutil.TestFileParser.scanner.
Referenced by com.cloudera.impala.testutil.TestFileParser.parseFile().
|
inline |
Parses a test file in its entirety and constructs a list of TestCases.
Definition at line 302 of file TestFileParser.java.
|
inline |
|
inlineprivate |
Consumes input from the test file until a single test case has been parsed.
Definition at line 235 of file TestFileParser.java.
References com.cloudera.impala.testutil.TestFileParser.defaultSectionOrder, com.cloudera.impala.testutil.TestFileParser.hasSetupSection(), com.cloudera.impala.testutil.TestFileParser.lineNum, com.cloudera.impala.testutil.TestFileParser.Section.QUERY, com.cloudera.impala.testutil.TestFileParser.scanner, and com.cloudera.impala.testutil.TestFileParser.Section.SETUP.
Referenced by com.cloudera.impala.testutil.TestFileParser.parseFile().
|
staticprivate |
For backwards compatibility, if no title is found this is the order in which sections are labeled.
Definition at line 198 of file TestFileParser.java.
Referenced by com.cloudera.impala.testutil.TestFileParser.parseOneTestCase().
|
private |
Definition at line 189 of file TestFileParser.java.
Referenced by com.cloudera.impala.testutil.TestFileParser.getTestFileName(), com.cloudera.impala.testutil.TestFileParser.open(), and com.cloudera.impala.testutil.TestFileParser.TestFileParser().
|
private |
Definition at line 192 of file TestFileParser.java.
|
private |
Definition at line 188 of file TestFileParser.java.
Referenced by com.cloudera.impala.testutil.TestFileParser.parseOneTestCase(), and com.cloudera.impala.testutil.TestFileParser.TestCase.TestCase().
|
staticprivate |
Definition at line 52 of file TestFileParser.java.
|
private |
Definition at line 190 of file TestFileParser.java.
Referenced by com.cloudera.impala.testutil.TestFileParser.close(), and com.cloudera.impala.testutil.TestFileParser.open().
|
private |
|
private |
Definition at line 186 of file TestFileParser.java.
Referenced by com.cloudera.impala.testutil.TestFileParser.getTestCases().