本文整理汇总了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");
}
}
}
}
示例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);
}
示例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));
}
}
示例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());
}