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


Java RealizationRegistry类代码示例

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


RealizationRegistry类属于org.apache.kylin.metadata.realization包,在下文中一共展示了RealizationRegistry类的4个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的Java代码示例。

示例1: wireProjectAndRealizations

import org.apache.kylin.metadata.realization.RealizationRegistry; //导入依赖的package包/类
private void wireProjectAndRealizations(Collection<ProjectInstance> projectInstances) {
    if (projectInstances.isEmpty())
        return;

    RealizationRegistry registry = RealizationRegistry.getInstance(config);
    for (ProjectInstance projectInstance : projectInstances) {
        for (RealizationEntry realization : projectInstance.getRealizationEntries()) {
            IRealization rel = registry.getRealization(realization.getType(), realization.getRealization());
            if (rel != null) {
                rel.setProjectName(projectInstance.getName());
            } else {
                logger.warn("Realization '" + realization + "' defined under project '" + projectInstance + "' is not found");
            }
        }
    }
}
 
开发者ID:KylinOLAP,项目名称:Kylin,代码行数:17,代码来源:ProjectManager.java

示例2: executeExtract

import org.apache.kylin.metadata.realization.RealizationRegistry; //导入依赖的package包/类
@Override
protected void executeExtract(OptionsHelper optionsHelper, File exportDir) throws Exception {
    kylinConfig = KylinConfig.getInstanceFromEnv();
    cubeManager = CubeManager.getInstance(kylinConfig);
    realizationRegistry = RealizationRegistry.getInstance(kylinConfig);
    projectManager = ProjectManager.getInstance(kylinConfig);

    if (optionsHelper.hasOption(OPTION_PROJECT)) {
        String projectNames = optionsHelper.getOptionValue(OPTION_PROJECT);
        for (String projectName: projectNames.split(",")) {
            ProjectInstance projectInstance = projectManager.getProject(projectName);
            if (projectInstance == null) {
                throw new IllegalArgumentException("Project " + projectName + " does not exist");
            }
            List<RealizationEntry> realizationEntries = projectInstance.getRealizationEntries();
            for (RealizationEntry realizationEntry : realizationEntries) {
                retrieveResourcePath(getRealization(realizationEntry));
            }
        }
    } else if (optionsHelper.hasOption(OPTION_CUBE)) {
        String cubeNames = optionsHelper.getOptionValue(OPTION_CUBE);
        for (String cubeName : cubeNames.split(",")) {
            IRealization realization = cubeManager.getRealization(cubeName);
            if (realization != null) {
                retrieveResourcePath(realization);
            } else {
                throw new IllegalArgumentException("No cube found with name of " + cubeName);
            }
        }
    }

    extractCommonInfo(exportDir);
    extractHTables(exportDir);
}
 
开发者ID:apache,项目名称:kylin,代码行数:35,代码来源:HBaseUsageExtractor.java

示例3: test

import org.apache.kylin.metadata.realization.RealizationRegistry; //导入依赖的package包/类
@Test
public void test() throws Exception {
    final RealizationRegistry registry = RealizationRegistry.getInstance(KylinConfig.getInstanceFromEnv());
    final Set<RealizationType> realizationTypes = registry.getRealizationTypes();
    assertEquals(RealizationType.values().length, realizationTypes.size());
    for (RealizationType type : RealizationType.values()) {
        assertTrue(realizationTypes.contains(type));
    }
}
 
开发者ID:KylinOLAP,项目名称:Kylin,代码行数:10,代码来源:RealizationRegistryTest.java

示例4: test

import org.apache.kylin.metadata.realization.RealizationRegistry; //导入依赖的package包/类
@Test
public void test() throws Exception {
    final RealizationRegistry registry = RealizationRegistry.getInstance(KylinConfig.getInstanceFromEnv());
    final Set<RealizationType> realizationTypes = registry.getRealizationTypes();
    assertEquals(RealizationType.values().length - 1, realizationTypes.size());
}
 
开发者ID:apache,项目名称:kylin,代码行数:7,代码来源:RealizationRegistryTest.java


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