當前位置: 首頁>>代碼示例>>Java>>正文


Java Cuboid.getBaseCuboid方法代碼示例

本文整理匯總了Java中org.apache.kylin.cube.cuboid.Cuboid.getBaseCuboid方法的典型用法代碼示例。如果您正苦於以下問題:Java Cuboid.getBaseCuboid方法的具體用法?Java Cuboid.getBaseCuboid怎麽用?Java Cuboid.getBaseCuboid使用的例子?那麽, 這裏精選的方法代碼示例或許可以為您提供幫助。您也可以進一步了解該方法所在org.apache.kylin.cube.cuboid.Cuboid的用法示例。


在下文中一共展示了Cuboid.getBaseCuboid方法的5個代碼示例,這些例子默認根據受歡迎程度排序。您可以為喜歡或者感覺有用的代碼點讚,您的評價將有助於係統推薦出更棒的Java代碼示例。

示例1: getCuboidSizeMapFromRowCount

import org.apache.kylin.cube.cuboid.Cuboid; //導入方法依賴的package包/類
public static Map<Long, Double> getCuboidSizeMapFromRowCount(CubeSegment cubeSegment, Map<Long, Long> rowCountMap) {
    final CubeDesc cubeDesc = cubeSegment.getCubeDesc();
    final List<Integer> rowkeyColumnSize = Lists.newArrayList();
    final Cuboid baseCuboid = Cuboid.getBaseCuboid(cubeDesc);
    final List<TblColRef> columnList = baseCuboid.getColumns();
    final CubeDimEncMap dimEncMap = cubeSegment.getDimensionEncodingMap();
    final Long baseCuboidRowCount = rowCountMap.get(baseCuboid.getId());

    for (int i = 0; i < columnList.size(); i++) {
        rowkeyColumnSize.add(dimEncMap.get(columnList.get(i)).getLengthOfEncoding());
    }

    Map<Long, Double> sizeMap = Maps.newHashMap();
    for (Map.Entry<Long, Long> entry : rowCountMap.entrySet()) {
        sizeMap.put(entry.getKey(), estimateCuboidStorageSize(cubeSegment, entry.getKey(), entry.getValue(),
                baseCuboid.getId(), baseCuboidRowCount, rowkeyColumnSize));
    }
    return sizeMap;
}
 
開發者ID:apache,項目名稱:kylin,代碼行數:20,代碼來源:CubeStatsReader.java

示例2: printKVInfo

import org.apache.kylin.cube.cuboid.Cuboid; //導入方法依賴的package包/類
private void printKVInfo(PrintWriter writer) {
    Cuboid cuboid = Cuboid.getBaseCuboid(seg.getCubeDesc());
    RowKeyEncoder encoder = new RowKeyEncoder(seg, cuboid);
    for (TblColRef col : cuboid.getColumns()) {
        writer.println("Length of dimension " + col + " is " + encoder.getColumnLength(col));
    }
}
 
開發者ID:apache,項目名稱:kylin,代碼行數:8,代碼來源:CubeStatsReader.java

示例3: parseCubeDesc

import org.apache.kylin.cube.cuboid.Cuboid; //導入方法依賴的package包/類
private void parseCubeDesc() {
    Cuboid baseCuboid = Cuboid.getBaseCuboid(cubeDesc);

    // build index for rowkey columns
    List<TblColRef> cuboidColumns = baseCuboid.getColumns();
    int rowkeyColCount = cubeDesc.getRowkey().getRowKeyColumns().length;
    rowKeyColumnIndexes = new int[rowkeyColCount];
    for (int i = 0; i < rowkeyColCount; i++) {
        TblColRef col = cuboidColumns.get(i);
        rowKeyColumnIndexes[i] = flatDesc.getColumnIndex(col);
    }

    List<MeasureDesc> measures = cubeDesc.getMeasures();
    int measureSize = measures.size();
    measureColumnIndexes = new int[measureSize][];
    for (int i = 0; i < measureSize; i++) {
        FunctionDesc func = measures.get(i).getFunction();
        List<TblColRef> colRefs = func.getParameter().getColRefs();
        if (colRefs == null) {
            measureColumnIndexes[i] = null;
        } else {
            measureColumnIndexes[i] = new int[colRefs.size()];
            for (int j = 0; j < colRefs.size(); j++) {
                TblColRef c = colRefs.get(j);
                measureColumnIndexes[i][j] = flatDesc.getColumnIndex(c);
            }
        }
    }
}
 
開發者ID:apache,項目名稱:kylin,代碼行數:30,代碼來源:CubeJoinedFlatTableEnrich.java

示例4: testGTInfo

import org.apache.kylin.cube.cuboid.Cuboid; //導入方法依賴的package包/類
@Test
public void testGTInfo() {
    CubeInstance cube = CubeManager.getInstance(KylinConfig.getInstanceFromEnv()).getCube("test_kylin_cube_with_slr_ready");
    CubeSegment segment = cube.getFirstSegment();

    Cuboid baseCuboid = Cuboid.getBaseCuboid(cube.getDescriptor());
    GTInfo info = CubeGridTable.newGTInfo(baseCuboid, new CubeDimEncMap(segment));
    GTInfo.serializer.serialize(info, buffer);
    buffer.flip();

    GTInfo sInfo = GTInfo.serializer.deserialize(buffer);
    this.compareTwoGTInfo(info, sInfo);
}
 
開發者ID:apache,項目名稱:kylin,代碼行數:14,代碼來源:GTScanReqSerDerTest.java

示例5: init

import org.apache.kylin.cube.cuboid.Cuboid; //導入方法依賴的package包/類
private void init() {
    baseCuboid = Cuboid.getBaseCuboid(cubeDesc);
    initNullBytes();
}
 
開發者ID:apache,項目名稱:kylin,代碼行數:5,代碼來源:BaseCuboidBuilder.java


注:本文中的org.apache.kylin.cube.cuboid.Cuboid.getBaseCuboid方法示例由純淨天空整理自Github/MSDocs等開源代碼及文檔管理平台,相關代碼片段篩選自各路編程大神貢獻的開源項目,源碼版權歸原作者所有,傳播和使用請參考對應項目的License;未經允許,請勿轉載。