本文整理汇总了Java中com.cloudera.sqoop.testutil.HsqldbTestServer.getManager方法的典型用法代码示例。如果您正苦于以下问题:Java HsqldbTestServer.getManager方法的具体用法?Java HsqldbTestServer.getManager怎么用?Java HsqldbTestServer.getManager使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类com.cloudera.sqoop.testutil.HsqldbTestServer
的用法示例。
在下文中一共展示了HsqldbTestServer.getManager方法的2个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的Java代码示例。
示例1: setUp
import com.cloudera.sqoop.testutil.HsqldbTestServer; //导入方法依赖的package包/类
@Before
public void setUp() {
testServer = new HsqldbTestServer();
try {
testServer.resetServer();
} catch (SQLException sqlE) {
LOG.error("Got SQLException: " + sqlE.toString());
fail("Got SQLException: " + sqlE.toString());
} catch (ClassNotFoundException cnfe) {
LOG.error("Could not find class for db driver: " + cnfe.toString());
fail("Could not find class for db driver: " + cnfe.toString());
}
manager = testServer.getManager();
}
示例2: setUp
import com.cloudera.sqoop.testutil.HsqldbTestServer; //导入方法依赖的package包/类
@Before
public void setUp() {
testServer = new HsqldbTestServer();
org.apache.log4j.Logger root = org.apache.log4j.Logger.getRootLogger();
root.setLevel(org.apache.log4j.Level.DEBUG);
try {
testServer.resetServer();
} catch (SQLException sqlE) {
LOG.error("Got SQLException: " + sqlE.toString());
fail("Got SQLException: " + sqlE.toString());
} catch (ClassNotFoundException cnfe) {
LOG.error("Could not find class for db driver: " + cnfe.toString());
fail("Could not find class for db driver: " + cnfe.toString());
}
manager = testServer.getManager();
options = testServer.getSqoopOptions();
// sanity check: make sure we're in a tmp dir before we blow anything away.
assertTrue("Test generates code in non-tmp dir!",
CODE_GEN_DIR.startsWith(ImportJobTestCase.TEMP_BASE_DIR));
assertTrue("Test generates jars in non-tmp dir!",
JAR_GEN_DIR.startsWith(ImportJobTestCase.TEMP_BASE_DIR));
// start out by removing these directories ahead of time
// to ensure that this is truly generating the code.
File codeGenDirFile = new File(CODE_GEN_DIR);
File classGenDirFile = new File(JAR_GEN_DIR);
if (codeGenDirFile.exists()) {
LOG.debug("Removing code gen dir: " + codeGenDirFile);
if (!DirUtil.deleteDir(codeGenDirFile)) {
LOG.warn("Could not delete " + codeGenDirFile + " prior to test");
}
}
if (classGenDirFile.exists()) {
LOG.debug("Removing class gen dir: " + classGenDirFile);
if (!DirUtil.deleteDir(classGenDirFile)) {
LOG.warn("Could not delete " + classGenDirFile + " prior to test");
}
}
}