本文整理汇总了Java中org.apache.kylin.metadata.project.ProjectInstance.containsRealization方法的典型用法代码示例。如果您正苦于以下问题:Java ProjectInstance.containsRealization方法的具体用法?Java ProjectInstance.containsRealization怎么用?Java ProjectInstance.containsRealization使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类org.apache.kylin.metadata.project.ProjectInstance
的用法示例。
在下文中一共展示了ProjectInstance.containsRealization方法的2个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的Java代码示例。
示例1: listJobInstances
import org.apache.kylin.metadata.project.ProjectInstance; //导入方法依赖的package包/类
private List<JobInstance> listJobInstances(String project, String cube, long startTime, long endTime) {
final List<JobInstance> result = Lists.newArrayList();
final List<AbstractExecutable> executables = executableManager.getAllExecutables(startTime, endTime);
final Map<String, Output> allOutputs = executableManager.getAllOutputs();
for (AbstractExecutable executable : executables) {
if (executable instanceof CubingJob) {
String cubeName = CubingExecutableUtil.getCubeName(executable.getParams());
boolean shouldExtract = false;
if (cube == null || cube.equalsIgnoreCase(cubeName)) {
if (project == null) {
shouldExtract = true;
} else {
ProjectInstance projectInstance = projectManager.getProject(project);
if (projectInstance != null && projectInstance.containsRealization(RealizationType.CUBE, cubeName)) {
shouldExtract = true;
}
}
}
if (shouldExtract) {
result.add(parseToJobInstance((CubingJob) executable, allOutputs));
}
}
}
return result;
}
示例2: getProjectOfCube
import org.apache.kylin.metadata.project.ProjectInstance; //导入方法依赖的package包/类
public String getProjectOfCube(String cubeName) {
for (ProjectInstance p : getProjectManager().listAllProjects()) {
if (p.containsRealization(RealizationType.CUBE, cubeName))
return p.getName();
}
return null;
}