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


Java HBaseMetadataTestCase.staticCreateTestMetadata方法代码示例

本文整理汇总了Java中org.apache.kylin.common.util.HBaseMetadataTestCase.staticCreateTestMetadata方法的典型用法代码示例。如果您正苦于以下问题:Java HBaseMetadataTestCase.staticCreateTestMetadata方法的具体用法?Java HBaseMetadataTestCase.staticCreateTestMetadata怎么用?Java HBaseMetadataTestCase.staticCreateTestMetadata使用的例子?那么, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在org.apache.kylin.common.util.HBaseMetadataTestCase的用法示例。


在下文中一共展示了HBaseMetadataTestCase.staticCreateTestMetadata方法的7个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的Java代码示例。

示例1: setupAll

import org.apache.kylin.common.util.HBaseMetadataTestCase; //导入方法依赖的package包/类
protected static void setupAll() throws Exception {
    //setup env
    HBaseMetadataTestCase.staticCreateTestMetadata();
    config = KylinConfig.getInstanceFromEnv();

    //setup cube conn
    String project = ProjectInstance.DEFAULT_PROJECT_NAME;
    cubeConnection = QueryConnection.getConnection(project);

    //setup h2
    h2Connection = DriverManager.getConnection("jdbc:h2:mem:db" + (h2InstanceCount++) + ";CACHE_SIZE=32072", "sa",
            "");
    // Load H2 Tables (inner join)
    H2Database h2DB = new H2Database(h2Connection, config, project);
    h2DB.loadAllTables();
}
 
开发者ID:apache,项目名称:kylin,代码行数:17,代码来源:KylinTestBase.java

示例2: before

import org.apache.kylin.common.util.HBaseMetadataTestCase; //导入方法依赖的package包/类
@Before
public void before() throws Exception {
    HBaseMetadataTestCase.staticCreateTestMetadata(AbstractKylinTestCase.SANDBOX_TEST_DATA);

    DeployUtil.initCliWorkDir();
    DeployUtil.deployMetadata();
    DeployUtil.overrideJobJarLocations();


    final KylinConfig kylinConfig = KylinConfig.getInstanceFromEnv();
    jobService = ExecutableManager.getInstance(kylinConfig);
    scheduler = DefaultScheduler.getInstance();
    scheduler.init(new JobEngineConfig(kylinConfig));
    if (!scheduler.hasStarted()) {
        throw new RuntimeException("scheduler has not been started");
    }
    cubeManager = CubeManager.getInstance(kylinConfig);
    jobEngineConfig = new JobEngineConfig(kylinConfig);
    for (String jobId : jobService.getAllJobIds()) {
        if(jobService.getJob(jobId) instanceof CubingJob){
            jobService.deleteJob(jobId);
        }
    }

}
 
开发者ID:KylinOLAP,项目名称:Kylin,代码行数:26,代码来源:BuildCubeWithEngineTest.java

示例3: before

import org.apache.kylin.common.util.HBaseMetadataTestCase; //导入方法依赖的package包/类
@Before
public void before() throws Exception {
    HBaseMetadataTestCase.staticCreateTestMetadata(HBaseMetadataTestCase.SANDBOX_TEST_DATA);

    DeployUtil.initCliWorkDir();
    DeployUtil.deployMetadata();
    DeployUtil.overrideJobJarLocations();

}
 
开发者ID:apache,项目名称:kylin,代码行数:10,代码来源:DeployLocalMetaToRemoteTest.java

示例4: beforeClass

import org.apache.kylin.common.util.HBaseMetadataTestCase; //导入方法依赖的package包/类
public static void beforeClass() throws Exception {
    logger.info("Adding to classpath: " + new File(HBaseMetadataTestCase.SANDBOX_TEST_DATA).getAbsolutePath());
    ClassUtil.addClasspath(new File(HBaseMetadataTestCase.SANDBOX_TEST_DATA).getAbsolutePath());
    System.setProperty(KylinConfig.KYLIN_CONF, HBaseMetadataTestCase.SANDBOX_TEST_DATA);
    if (StringUtils.isEmpty(System.getProperty("hdp.version"))) {
        throw new RuntimeException("No hdp.version set; Please set hdp.version in your jvm option, for example: -Dhdp.version=2.4.0.0-169");
    }
    HBaseMetadataTestCase.staticCreateTestMetadata(HBaseMetadataTestCase.SANDBOX_TEST_DATA);
}
 
开发者ID:apache,项目名称:kylin,代码行数:10,代码来源:BuildCubeWithStream.java

示例5: before

import org.apache.kylin.common.util.HBaseMetadataTestCase; //导入方法依赖的package包/类
@Before
public void before() throws Exception {
    HBaseMetadataTestCase.staticCreateTestMetadata(AbstractKylinTestCase.SANDBOX_TEST_DATA);

    DeployUtil.initCliWorkDir();
    //        DeployUtil.deployMetadata();
    DeployUtil.overrideJobJarLocations();

    final KylinConfig kylinConfig = KylinConfig.getInstanceFromEnv();
    jobService = ExecutableManager.getInstance(kylinConfig);
    scheduler = DefaultScheduler.getInstance();
    scheduler.init(new JobEngineConfig(kylinConfig));
    if (!scheduler.hasStarted()) {
        throw new RuntimeException("scheduler has not been started");
    }
    iiManager = IIManager.getInstance(kylinConfig);
    jobEngineConfig = new JobEngineConfig(kylinConfig);
    for (String jobId : jobService.getAllJobIds()) {
        if(jobService.getJob(jobId) instanceof IIJob){
            jobService.deleteJob(jobId);
        }
    }

    IIInstance ii = iiManager.getII(TEST_II_NAME);
    if (ii.getStatus() != RealizationStatusEnum.DISABLED) {
        ii.setStatus(RealizationStatusEnum.DISABLED);
        iiManager.updateII(ii);
    }
}
 
开发者ID:KylinOLAP,项目名称:Kylin,代码行数:30,代码来源:BuildIIWithEngineTest.java

示例6: beforeClass

import org.apache.kylin.common.util.HBaseMetadataTestCase; //导入方法依赖的package包/类
public static void beforeClass(String confDir) throws Exception {
    logger.info("Adding to classpath: " + new File(confDir).getAbsolutePath());
    ClassUtil.addClasspath(new File(confDir).getAbsolutePath());

    String fastModeStr = System.getProperty("fastBuildMode");
    if (fastModeStr != null && fastModeStr.equalsIgnoreCase("true")) {
        fastBuildMode = true;
        logger.info("Will use fast build mode");
    } else {
        logger.info("Will not use fast build mode");
    }

    String specifiedEngineType = System.getProperty("engineType");
    if (StringUtils.isNotEmpty(specifiedEngineType)) {
        engineType = Integer.parseInt(specifiedEngineType);
    } else {
        engineType = 2;
    }

    System.setProperty(KylinConfig.KYLIN_CONF, confDir);
    System.setProperty("SPARK_HOME", "/usr/local/spark"); // need manually create and put spark to this folder on Jenkins
    System.setProperty("kylin.hadoop.conf.dir", confDir);
    if (StringUtils.isEmpty(System.getProperty("hdp.version"))) {
        throw new RuntimeException("No hdp.version set; Please set hdp.version in your jvm option, for example: -Dhdp.version=2.4.0.0-169");
    }

    HBaseMetadataTestCase.staticCreateTestMetadata(confDir);

    try {
        //check hdfs permission
        FileSystem fileSystem = HadoopUtil.getWorkingFileSystem();
        String hdfsWorkingDirectory = KylinConfig.getInstanceFromEnv().getHdfsWorkingDirectory();
        Path coprocessorDir = new Path(hdfsWorkingDirectory);
        boolean success = fileSystem.mkdirs(coprocessorDir);
        if (!success) {
            throw new IOException("mkdir fails");
        }
    } catch (IOException e) {
        throw new RuntimeException("failed to create kylin.env.hdfs-working-dir, Please make sure the user has right to access " + KylinConfig.getInstanceFromEnv().getHdfsWorkingDirectory(), e);
    }
}
 
开发者ID:apache,项目名称:kylin,代码行数:42,代码来源:BuildCubeWithEngine.java

示例7: setUpEnv

import org.apache.kylin.common.util.HBaseMetadataTestCase; //导入方法依赖的package包/类
private static void setUpEnv() throws Exception {
    HBaseMetadataTestCase.staticCreateTestMetadata();

    config = KylinConfig.getInstanceFromEnv();
}
 
开发者ID:KylinOLAP,项目名称:Kylin,代码行数:6,代码来源:KylinQueryTest.java


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