Java Code Examples for org.apache.kylin.metadata.realization.RealizationType#HYBRID

The following examples show how to use org.apache.kylin.metadata.realization.RealizationType#HYBRID . You can vote up the ones you like or vote down the ones you don't like, and go to the original project or source file by following the links above each example. You may check out the related API usage on the sidebar.
Example 1
Source File: RealizationSignature.java    From kylin-on-parquet-v2 with Apache License 2.0 6 votes vote down vote up
static HybridSignature getHybridSignature(KylinConfig config, String realizationName) {
    HybridInstance hybridInstance = HybridManager.getInstance(config).getHybridInstance(realizationName);
    if (hybridInstance == null) {
        return null;
    }
    IRealization[] realizations = hybridInstance.getRealizations();
    Set<RealizationSignature> realizationSignatureSet = Sets.newHashSetWithExpectedSize(realizations.length);
    for (IRealization realization : realizations) {
        RealizationSignature realizationSignature = null;
        if (realization.getType() == RealizationType.CUBE) {
            realizationSignature = CubeSignature.getCubeSignature(config, realization.getName());
        } else if (realization.getType() == RealizationType.HYBRID) {
            realizationSignature = getHybridSignature(config, realization.getName());
        }
        if (realizationSignature != null) {
            realizationSignatureSet.add(realizationSignature);
        }
    }
    return new HybridSignature(realizationName, realizationSignatureSet);
}
 
Example 2
Source File: RealizationSignature.java    From kylin with Apache License 2.0 6 votes vote down vote up
static HybridSignature getHybridSignature(KylinConfig config, String realizationName) {
    HybridInstance hybridInstance = HybridManager.getInstance(config).getHybridInstance(realizationName);
    if (hybridInstance == null) {
        return null;
    }
    IRealization[] realizations = hybridInstance.getRealizations();
    Set<RealizationSignature> realizationSignatureSet = Sets.newHashSetWithExpectedSize(realizations.length);
    for (IRealization realization : realizations) {
        RealizationSignature realizationSignature = null;
        if (realization.getType() == RealizationType.CUBE) {
            realizationSignature = CubeSignature.getCubeSignature(config, realization.getName());
        } else if (realization.getType() == RealizationType.HYBRID) {
            realizationSignature = getHybridSignature(config, realization.getName());
        }
        if (realizationSignature != null) {
            realizationSignatureSet.add(realizationSignature);
        }
    }
    return new HybridSignature(realizationName, realizationSignatureSet);
}
 
Example 3
Source File: DashboardService.java    From kylin-on-parquet-v2 with Apache License 2.0 5 votes vote down vote up
private List<CubeInstance> getCubeByHybrid(HybridInstance hybridInstance) {
    List<CubeInstance> cubeInstances = Lists.newArrayList();
    List<RealizationEntry> realizationEntries = hybridInstance.getRealizationEntries();
    for (RealizationEntry realizationEntry : realizationEntries) {
        String reName = realizationEntry.getRealization();
        if (RealizationType.CUBE == realizationEntry.getType()) {
            CubeInstance cubeInstance = getCubeManager().getCube(reName);
            cubeInstances.add(cubeInstance);
        } else if (RealizationType.HYBRID == realizationEntry.getType()) {
            HybridInstance innerHybridInstance = getHybridManager().getHybridInstance(reName);
            cubeInstances.addAll(getCubeByHybrid(innerHybridInstance));
        }
    }
    return cubeInstances;
}
 
Example 4
Source File: DashboardService.java    From kylin with Apache License 2.0 5 votes vote down vote up
private List<CubeInstance> getCubeByHybrid(HybridInstance hybridInstance) {
    List<CubeInstance> cubeInstances = Lists.newArrayList();
    List<RealizationEntry> realizationEntries = hybridInstance.getRealizationEntries();
    for (RealizationEntry realizationEntry : realizationEntries) {
        String reName = realizationEntry.getRealization();
        if (RealizationType.CUBE == realizationEntry.getType()) {
            CubeInstance cubeInstance = getCubeManager().getCube(reName);
            cubeInstances.add(cubeInstance);
        } else if (RealizationType.HYBRID == realizationEntry.getType()) {
            HybridInstance innerHybridInstance = getHybridManager().getHybridInstance(reName);
            cubeInstances.addAll(getCubeByHybrid(innerHybridInstance));
        }
    }
    return cubeInstances;
}
 
Example 5
Source File: HybridInstance.java    From kylin-on-parquet-v2 with Apache License 2.0 4 votes vote down vote up
@Override
public RealizationType getType() {
    return RealizationType.HYBRID;
}
 
Example 6
Source File: HybridManager.java    From kylin-on-parquet-v2 with Apache License 2.0 4 votes vote down vote up
@Override
public RealizationType getRealizationType() {
    return RealizationType.HYBRID;
}
 
Example 7
Source File: HybridInstance.java    From kylin with Apache License 2.0 4 votes vote down vote up
@Override
public RealizationType getType() {
    return RealizationType.HYBRID;
}
 
Example 8
Source File: HybridManager.java    From kylin with Apache License 2.0 4 votes vote down vote up
@Override
public RealizationType getRealizationType() {
    return RealizationType.HYBRID;
}