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


Java HBaseMetadataTestCase类代码示例

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


HBaseMetadataTestCase类属于org.apache.kylin.common.util包,在下文中一共展示了HBaseMetadataTestCase类的15个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的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: main

import org.apache.kylin.common.util.HBaseMetadataTestCase; //导入依赖的package包/类
public static void main(String[] args) throws Exception {
    System.setProperty("HADOOP_USER_NAME", "root");
    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");
    }

    if (args.length < 1) {
        printUsage();
        return;
    }

    if ("reset".equalsIgnoreCase(args[0])) {
        ResourceTool.main(new String[] { "reset" });
    } else if ("download".equalsIgnoreCase(args[0])) {
        ResourceTool.main(new String[] { "download", args[1] });
    } else if ("fetch".equalsIgnoreCase(args[0])) {
        ResourceTool.main(new String[] { "fetch", args[1], args[2] });
    } else if ("upload".equalsIgnoreCase(args[0])) {
        ResourceTool.main(new String[] { "upload", args[1] });
    } else {
        printUsage();
    }
}
 
开发者ID:apache,项目名称:kylin,代码行数:27,代码来源:SandboxMetastoreCLI.java

示例3: 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

示例4: beforeClass

import org.apache.kylin.common.util.HBaseMetadataTestCase; //导入依赖的package包/类
@BeforeClass
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");
    }
}
 
开发者ID:apache,项目名称:kylin,代码行数:10,代码来源:DeployLocalMetaToRemoteTest.java

示例5: 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

示例6: 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

示例7: clean

import org.apache.kylin.common.util.HBaseMetadataTestCase; //导入依赖的package包/类
protected static void clean() {
    if (cubeConnection != null)
        closeConnection(cubeConnection);
    if (h2Connection != null)
        closeConnection(h2Connection);

    HBaseMetadataTestCase.staticCleanupTestMetadata();
    RemoveBlackoutRealizationsRule.blackList.clear();

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

示例8: beforeClass

import org.apache.kylin.common.util.HBaseMetadataTestCase; //导入依赖的package包/类
@BeforeClass
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, "../examples/test_case_data/sandbox");
    System.setProperty("hdp.version", "2.2.0.0-2041"); // mapred-site.xml ref this
}
 
开发者ID:KylinOLAP,项目名称:Kylin,代码行数:8,代码来源:BuildCubeWithEngineTest.java

示例9: 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

示例10: clean

import org.apache.kylin.common.util.HBaseMetadataTestCase; //导入依赖的package包/类
protected static void clean() {
    if (cubeConnection != null)
        closeConnection(cubeConnection);
    if (h2Connection != null)
        closeConnection(h2Connection);

    ObserverEnabler.forceCoprocessorUnset();
    HBaseMetadataTestCase.staticCleanupTestMetadata();
}
 
开发者ID:KylinOLAP,项目名称:Kylin,代码行数:10,代码来源:KylinQueryTest.java

示例11: after

import org.apache.kylin.common.util.HBaseMetadataTestCase; //导入依赖的package包/类
@After
public void after() {
    HBaseMetadataTestCase.staticCleanupTestMetadata();
}
 
开发者ID:apache,项目名称:kylin,代码行数:5,代码来源:DeployLocalMetaToRemoteTest.java

示例12: cleanup

import org.apache.kylin.common.util.HBaseMetadataTestCase; //导入依赖的package包/类
public void cleanup() throws Exception {
    cleanupOldStorage();
    HBaseMetadataTestCase.staticCleanupTestMetadata();
}
 
开发者ID:apache,项目名称:kylin,代码行数:5,代码来源:BuildCubeWithStream.java

示例13: beforeClass

import org.apache.kylin.common.util.HBaseMetadataTestCase; //导入依赖的package包/类
public static void beforeClass() throws Exception {
    beforeClass(HBaseMetadataTestCase.SANDBOX_TEST_DATA);
}
 
开发者ID:apache,项目名称:kylin,代码行数:4,代码来源:BuildCubeWithEngine.java

示例14: afterClass

import org.apache.kylin.common.util.HBaseMetadataTestCase; //导入依赖的package包/类
public static void afterClass() {
    HBaseMetadataTestCase.staticCleanupTestMetadata();
}
 
开发者ID:apache,项目名称:kylin,代码行数:4,代码来源:BuildCubeWithEngine.java

示例15: beforeClass

import org.apache.kylin.common.util.HBaseMetadataTestCase; //导入依赖的package包/类
@BeforeClass
public static void beforeClass() throws Exception {
    ClassUtil.addClasspath(new File(HBaseMetadataTestCase.SANDBOX_TEST_DATA).getAbsolutePath());
    System.setProperty(KylinConfig.KYLIN_CONF, HBaseMetadataTestCase.SANDBOX_TEST_DATA);
}
 
开发者ID:apache,项目名称:kylin,代码行数:6,代码来源:MultipleDictionaryValueEnumeratorTest.java


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