Java Code Examples for org.apache.kylin.cube.model.HBaseColumnDesc#setQualifier()

The following examples show how to use org.apache.kylin.cube.model.HBaseColumnDesc#setQualifier() . 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: CubeDescTest.java    From kylin-on-parquet-v2 with Apache License 2.0 5 votes vote down vote up
@Test
public void testBadInit14() throws Exception {
    thrown.expect(IllegalStateException.class);
    CubeDesc cubeDesc = CubeDescManager.getInstance(getTestConfig()).getCubeDesc(CUBE_WITH_SLR_DESC);
    MeasureDesc measureForTransCnt = cubeDesc.getMeasures().get(3);
    Assert.assertEquals(measureForTransCnt.getName(), "TRANS_CNT");
    String measureInfoForTransCnt = measureForTransCnt.toString();
    thrown.expectMessage(
            "measure (" + measureInfoForTransCnt + ") does not exist in column family, or measure duplicates");
    HBaseColumnDesc colDesc = new HBaseColumnDesc();
    colDesc.setQualifier("M");
    colDesc.setMeasureRefs(new String[] { "GMV_SUM", "GMV_MIN", "GMV_MAX", "ITEM_COUNT_SUM" });
    cubeDesc.getHbaseMapping().getColumnFamily()[0].getColumns()[0] = colDesc;
    cubeDesc.initMeasureReferenceToColumnFamily();
}
 
Example 2
Source File: CubeDescTest.java    From kylin-on-parquet-v2 with Apache License 2.0 5 votes vote down vote up
@Test
public void testBadInit15() throws Exception {
    thrown.expect(IllegalStateException.class);
    CubeDesc cubeDesc = CubeDescManager.getInstance(getTestConfig()).getCubeDesc(CUBE_WITH_SLR_DESC);
    MeasureDesc measureForTransCnt = cubeDesc.getMeasures().get(3);
    Assert.assertEquals(measureForTransCnt.getName(), "TRANS_CNT");
    thrown.expectMessage("measure (" + measureForTransCnt.getName() + ") duplicates");
    HBaseColumnDesc colDesc = new HBaseColumnDesc();
    colDesc.setQualifier("M");
    colDesc.setMeasureRefs(
            new String[] { "GMV_SUM", "GMV_MIN", "GMV_MAX", "TRANS_CNT", "TRANS_CNT", "ITEM_COUNT_SUM" });
    cubeDesc.getHbaseMapping().getColumnFamily()[0].getColumns()[0] = colDesc;
    cubeDesc.initMeasureReferenceToColumnFamily();
}
 
Example 3
Source File: CubeDescTest.java    From kylin with Apache License 2.0 5 votes vote down vote up
@Test
public void testBadInit14() throws Exception {
    thrown.expect(IllegalStateException.class);
    CubeDesc cubeDesc = CubeDescManager.getInstance(getTestConfig()).getCubeDesc(CUBE_WITH_SLR_DESC);
    MeasureDesc measureForTransCnt = cubeDesc.getMeasures().get(3);
    Assert.assertEquals(measureForTransCnt.getName(), "TRANS_CNT");
    String measureInfoForTransCnt = measureForTransCnt.toString();
    thrown.expectMessage(
            "measure (" + measureInfoForTransCnt + ") does not exist in column family, or measure duplicates");
    HBaseColumnDesc colDesc = new HBaseColumnDesc();
    colDesc.setQualifier("M");
    colDesc.setMeasureRefs(new String[] { "GMV_SUM", "GMV_MIN", "GMV_MAX", "ITEM_COUNT_SUM" });
    cubeDesc.getHbaseMapping().getColumnFamily()[0].getColumns()[0] = colDesc;
    cubeDesc.initMeasureReferenceToColumnFamily();
}
 
Example 4
Source File: CubeDescTest.java    From kylin with Apache License 2.0 5 votes vote down vote up
@Test
public void testBadInit15() throws Exception {
    thrown.expect(IllegalStateException.class);
    CubeDesc cubeDesc = CubeDescManager.getInstance(getTestConfig()).getCubeDesc(CUBE_WITH_SLR_DESC);
    MeasureDesc measureForTransCnt = cubeDesc.getMeasures().get(3);
    Assert.assertEquals(measureForTransCnt.getName(), "TRANS_CNT");
    thrown.expectMessage("measure (" + measureForTransCnt.getName() + ") duplicates");
    HBaseColumnDesc colDesc = new HBaseColumnDesc();
    colDesc.setQualifier("M");
    colDesc.setMeasureRefs(
            new String[] { "GMV_SUM", "GMV_MIN", "GMV_MAX", "TRANS_CNT", "TRANS_CNT", "ITEM_COUNT_SUM" });
    cubeDesc.getHbaseMapping().getColumnFamily()[0].getColumns()[0] = colDesc;
    cubeDesc.initMeasureReferenceToColumnFamily();
}