当前位置: 首页>>代码示例>>Java>>正文


Java HsqldbTestServer.getManager方法代码示例

本文整理汇总了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();
}
 
开发者ID:aliyun,项目名称:aliyun-maxcompute-data-collectors,代码行数:16,代码来源:TestHsqldbManager.java

示例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");
    }
  }
}
 
开发者ID:aliyun,项目名称:aliyun-maxcompute-data-collectors,代码行数:44,代码来源:TestClassWriter.java


注:本文中的com.cloudera.sqoop.testutil.HsqldbTestServer.getManager方法示例由纯净天空整理自Github/MSDocs等开源代码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。