Package org.olap4cloud.client

Examples of org.olap4cloud.client.CubeDescriptor


   
    protected void setup(Mapper<ImmutableBytesWritable,Result,ImmutableBytesWritable,ImmutableBytesWritable>
        .Context context)
          throws java.io.IOException ,InterruptedException {
      try {
        CubeDescriptor dataCube = (CubeDescriptor)DataUtils.stringToObject(context.getConfiguration()
          .get(OLAPEngineConstants.JOB_CONF_PROP_DATA_CUBE_DESCRIPTOR));
        AggregationCubeDescriptor aggCube = (AggregationCubeDescriptor)DataUtils
            .stringToObject(context.getConfiguration()
            .get(OLAPEngineConstants.JOB_CONF_PROP_AGG_CUBE_DESCRIPTOR));
        aggDimensionIndexes = new int[aggCube.getDimensions().size()];
        for(int i = 0; i < aggDimensionIndexes.length; i ++) {
          CubeDimension aggDimension = aggCube.getDimensions().get(i);
          for(int j = 0; j < dataCube.getDimensions().size(); j ++) {
            CubeDimension dataDimension = dataCube.getDimensions().get(j);
            if(aggDimension.getName().equals(dataDimension.getName())) {
              aggDimensionIndexes[i] = j;
            }
          }
        }
View Full Code Here


        ,ImmutableBytesWritable>.Context context)
        throws java.io.IOException ,InterruptedException {
      try {
        aggCube = (AggregationCubeDescriptor)DataUtils.stringToObject(context.getConfiguration()
            .get(OLAPEngineConstants.JOB_CONF_PROP_AGG_CUBE_DESCRIPTOR));
        CubeDescriptor dataCube = (CubeDescriptor)DataUtils.stringToObject(context.getConfiguration()
            .get(OLAPEngineConstants.JOB_CONF_PROP_DATA_CUBE_DESCRIPTOR));
        outN = aggCube.getAggregates().size();
        outValue = new byte[outN * 8];
      } catch(Exception e) {
        logger.error(e.getMessage(), e);
View Full Code Here

public class TestCubeUtils {

  public static void generateTestCube() throws Exception {
//    DataImportHFileMR.main(new String[]{});
    CubeDescriptor descr = TestCubeUtils.createTestCubeDescriptor();
    OLAPEngine engine = new OLAPEngine();
    engine.generateCube(descr);
  }
View Full Code Here

    OLAPEngine engine = new OLAPEngine();
    engine.generateCube(descr);
  }
 
  public static CubeDescriptor createTestCubeDescriptor() throws Exception {
    CubeDescriptor descr = new CubeDescriptor();
    descr.loadFromClassPath("testcube.xml", TestCubeUtils.class.getClassLoader());
/*    descr.setSourceDataDir("/data");
    descr.setCubeName("testcube");
    descr.setAggregationsCount(1);
    descr.getDimensions().add(new CubeDimension("d1"));
    descr.getDimensions().add(new CubeDimension("d2"));
View Full Code Here

  public static void main(String[] args) throws Exception {
    executeQueryTest();
  }
 
  static void executeQueryTest() throws Exception {
    CubeDescriptor cubeDescriptor = TestCubeUtils.createTestCubeDescriptor();
    cubeDescriptor.getAggregationCubes();
    CubeQuery cubeQuery = new CubeQuery();
    CubeQueryCondition condition = new CubeQueryCondition("d3");
    condition.getDimensionValues().add(1l);
    cubeQuery.getConditions().add(condition);
    condition = new CubeQueryCondition("d1");
View Full Code Here

TOP

Related Classes of org.olap4cloud.client.CubeDescriptor

Copyright © 2018 www.massapicom. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.