Java Code Examples for com.klarna.hiverunner.HiveShellContainer#start()
The following examples show how to use
com.klarna.hiverunner.HiveShellContainer#start() .
You can vote up the ones you like or vote down the ones you don't like,
and go to the original project or source file by following the links above each example. You may check out the related API usage on the sidebar.
Example 1
Source File: FlinkStandaloneHiveRunner.java From flink with Apache License 2.0 | 3 votes |
/** * Traverses the test class annotations. Will inject a HiveShell in the test case that envelopes the HiveServer. */ private HiveShellContainer createHiveServerContainer(final Class testClass, HiveServerContext context) throws Exception { final HiveServerContainer hiveServerContainer = new HiveServerContainer(context); HiveShellBuilder hiveShellBuilder = new HiveShellBuilder(); HiveRunnerShim hiveRunnerShim = HiveRunnerShimLoader.load(); hiveRunnerShim.setCommandShellEmulation(hiveShellBuilder, config); HiveShellField shellSetter = loadScriptsUnderTest(testClass, hiveShellBuilder); hiveShellBuilder.setHiveServerContainer(hiveServerContainer); loadAnnotatedResources(testClass, hiveShellBuilder); loadAnnotatedProperties(testClass, hiveShellBuilder); loadAnnotatedSetupScripts(testClass, hiveShellBuilder); // Build shell final HiveShellContainer shell = hiveShellBuilder.buildShell(); // Set shell shellSetter.setShell(shell); if (shellSetter.isAutoStart()) { shell.start(); } return shell; }
Example 2
Source File: FlinkStandaloneHiveRunner.java From flink with Apache License 2.0 | 3 votes |
/** * Traverses the test class annotations. Will inject a HiveShell in the test case that envelopes the HiveServer. */ private HiveShellContainer createHiveServerContainer(final Class testClass, HiveServerContext context) throws Exception { final HiveServerContainer hiveServerContainer = new HiveServerContainer(context); HiveShellBuilder hiveShellBuilder = new HiveShellBuilder(); HiveRunnerShim hiveRunnerShim = HiveRunnerShimLoader.load(); hiveRunnerShim.setCommandShellEmulation(hiveShellBuilder, config); HiveShellField shellSetter = loadScriptsUnderTest(testClass, hiveShellBuilder); hiveShellBuilder.setHiveServerContainer(hiveServerContainer); loadAnnotatedResources(testClass, hiveShellBuilder); loadAnnotatedProperties(testClass, hiveShellBuilder); loadAnnotatedSetupScripts(testClass, hiveShellBuilder); // Build shell final HiveShellContainer shell = hiveShellBuilder.buildShell(); // Set shell shellSetter.setShell(shell); if (shellSetter.isAutoStart()) { shell.start(); } return shell; }