Impala
Impalaistheopensource,nativeanalyticdatabaseforApacheHadoop.
|
Static Public Member Functions | |
static String | compareOutput (ArrayList< String > actual, ArrayList< String > expected, boolean orderMatters) |
static TQueryCtx | createQueryContext () |
static TQueryCtx | createQueryContext (String defaultDb, String user) |
static String | prettyPrintJson (String json) |
Static Private Member Functions | |
static String | applyHdfsFilePathFilter (String hdfsPath) |
Static Private Attributes | |
static final Logger | LOG = LoggerFactory.getLogger(TestUtils.class) |
static final String[] | expectedFilePrefix_ = { "hdfs:", "file: " } |
static final String[] | ignoreContentAfter_ = { "HOST:", "LOCATIONS:" } |
static final String | regexAgainstActual_ = "regex:" |
static final String | HDFS_FILE_PATH_FILTER = "-*\\d+--\\d+_\\d+.*$" |
static final String | HDFS_HOST_PORT_FILTER = "//\\w+:\\d+/" |
Definition at line 34 of file TestUtils.java.
|
inlinestaticprivate |
Applied a filter on the HDFS path to strip out information that might vary from run to run.
Definition at line 188 of file TestUtils.java.
References com.cloudera.impala.testutil.TestUtils.HDFS_FILE_PATH_FILTER, and com.cloudera.impala.testutil.TestUtils.HDFS_HOST_PORT_FILTER.
Referenced by com.cloudera.impala.testutil.TestUtils.compareOutput().
|
inlinestatic |
Do a line-by-line comparison of actual and expected output. Comparison of the individual lines ignores whitespace. If an expected line starts with expectedFilePrefix, then the expected vs. actual comparison is successful if the actual string contains the expected line (ignoring the expectedFilePrefix prefix). If orderMatters is false, we consider actual to match expected if they both contains the same output lines regardless of order.
Definition at line 61 of file TestUtils.java.
References com.cloudera.impala.testutil.TestUtils.applyHdfsFilePathFilter(), com.cloudera.impala.testutil.TestUtils.expectedFilePrefix_, com.cloudera.impala.testutil.TestUtils.ignoreContentAfter_, and com.cloudera.impala.testutil.TestUtils.regexAgainstActual_.
|
inlinestatic |
Create a TQueryCtx for executing FE tests.
Definition at line 197 of file TestUtils.java.
References com.cloudera.impala.catalog.Catalog.DEFAULT_DB.
Referenced by com.cloudera.impala.analysis.AnalyzerTest.AnalysisError(), com.cloudera.impala.analysis.ToSqlTest.analyze(), com.cloudera.impala.analysis.AnalyzerTest.AnalyzesOk(), com.cloudera.impala.analysis.AuditingTest.TestAccessEventsOnAuthFailure(), com.cloudera.impala.analysis.AuthorizationTest.TestFunction(), com.cloudera.impala.analysis.AuthorizationTest.TestLocalGroupPolicyProvider(), com.cloudera.impala.analysis.AuthorizationTest.TestShortUsernameUsed(), and com.cloudera.impala.analysis.AuthorizationTest.TestWithIncorrectConfig().
|
inlinestatic |
Create a TQueryCtx for executing FE tests using the given default DB and user.
Definition at line 204 of file TestUtils.java.
|
inlinestatic |
Pretty print a JSON string.
Definition at line 219 of file TestUtils.java.
|
staticprivate |
Definition at line 36 of file TestUtils.java.
Referenced by com.cloudera.impala.testutil.TestUtils.compareOutput().
|
staticprivate |
Definition at line 47 of file TestUtils.java.
Referenced by com.cloudera.impala.testutil.TestUtils.applyHdfsFilePathFilter().
|
staticprivate |
Definition at line 48 of file TestUtils.java.
Referenced by com.cloudera.impala.testutil.TestUtils.applyHdfsFilePathFilter().
|
staticprivate |
Definition at line 37 of file TestUtils.java.
Referenced by com.cloudera.impala.testutil.TestUtils.compareOutput().
|
staticprivate |
Definition at line 35 of file TestUtils.java.
|
staticprivate |
Definition at line 40 of file TestUtils.java.
Referenced by com.cloudera.impala.testutil.TestUtils.compareOutput().