当前位置: 首页>>代码示例>>Java>>正文


Java OLAPQuery类代码示例

本文整理汇总了Java中org.apache.kylin.query.enumerator.OLAPQuery的典型用法代码示例。如果您正苦于以下问题:Java OLAPQuery类的具体用法?Java OLAPQuery怎么用?Java OLAPQuery使用的例子?那么, 这里精选的类代码示例或许可以为您提供帮助。


OLAPQuery类属于org.apache.kylin.query.enumerator包,在下文中一共展示了OLAPQuery类的8个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的Java代码示例。

示例1: asQueryable

import org.apache.kylin.query.enumerator.OLAPQuery; //导入依赖的package包/类
@Override
public <T> Queryable<T> asQueryable(QueryProvider queryProvider, SchemaPlus schema, String tableName) {
    return new AbstractTableQueryable<T>(queryProvider, schema, this, tableName) {
        @SuppressWarnings("unchecked")
        public Enumerator<T> enumerator() {
            final OLAPQuery query = new OLAPQuery(EnumeratorTypeEnum.OLAP, 0);
            return (Enumerator<T>) query.enumerator();
        }
    };
}
 
开发者ID:apache,项目名称:kylin,代码行数:11,代码来源:OLAPTable.java

示例2: asQueryable

import org.apache.kylin.query.enumerator.OLAPQuery; //导入依赖的package包/类
@Override
public <T> Queryable<T> asQueryable(QueryProvider queryProvider, SchemaPlus schema, String tableName) {
    return new AbstractTableQueryable<T>(queryProvider, schema, this, tableName) {
        @SuppressWarnings("unchecked")
        public Enumerator<T> enumerator() {
            final OLAPQuery query = new OLAPQuery(EnumeratorTypeEnum.INDEX, 0);
            return (Enumerator<T>) query.enumerator();
        }
    };
}
 
开发者ID:KylinOLAP,项目名称:Kylin,代码行数:11,代码来源:OLAPTable.java

示例3: setUpCubeConn

import org.apache.kylin.query.enumerator.OLAPQuery; //导入依赖的package包/类
private static void setUpCubeConn() throws SQLException {
    // Cube Connection
    File olapTmp = OLAPSchemaFactory.createTempOLAPJson(ProjectInstance.DEFAULT_PROJECT_NAME, config);
    Properties props = new Properties();
    props.setProperty(OLAPQuery.PROP_SCAN_THRESHOLD, "10000");
    cubeConnection = DriverManager.getConnection("jdbc:calcite:model=" + olapTmp.getAbsolutePath(), props);
}
 
开发者ID:KylinOLAP,项目名称:Kylin,代码行数:8,代码来源:KylinQueryTest.java

示例4: getOLAPDataSource

import org.apache.kylin.query.enumerator.OLAPQuery; //导入依赖的package包/类
public DataSource getOLAPDataSource(String project) {

        project = ProjectInstance.getNormalizedProjectName(project);

        DataSource ret = olapDataSources.get(project);
        if (ret == null) {
            logger.debug("Creating a new data source");
            logger.debug("OLAP data source pointing to " + getConfig());

            File modelJson = OLAPSchemaFactory.createTempOLAPJson(project, getConfig());

            try {
                List<String> text = Files.readLines(modelJson, Charset.defaultCharset());
                logger.debug("The new temp olap json is :");
                for (String line : text)
                    logger.debug(line);
            } catch (IOException e) {
                e.printStackTrace(); // logging failure is not critical
            }

            DriverManagerDataSource ds = new DriverManagerDataSource();
            Properties props = new Properties();
            props.setProperty(OLAPQuery.PROP_SCAN_THRESHOLD, String.valueOf(KylinConfig.getInstanceFromEnv().getScanThreshold()));
            ds.setConnectionProperties(props);
            ds.setDriverClassName("net.hydromatic.optiq.jdbc.Driver");
            ds.setUrl("jdbc:calcite:model=" + modelJson.getAbsolutePath());

            ret = olapDataSources.putIfAbsent(project, ds);
            if (ret == null) {
                ret = ds;
            }
        }
        return ret;
    }
 
开发者ID:KylinOLAP,项目名称:Kylin,代码行数:35,代码来源:BasicService.java

示例5: executeOLAPQuery

import org.apache.kylin.query.enumerator.OLAPQuery; //导入依赖的package包/类
public Enumerable<Object[]> executeOLAPQuery(DataContext optiqContext, int ctxSeq) {
    return new OLAPQuery(optiqContext, EnumeratorTypeEnum.OLAP, ctxSeq);
}
 
开发者ID:apache,项目名称:kylin,代码行数:4,代码来源:OLAPTable.java

示例6: executeLookupTableQuery

import org.apache.kylin.query.enumerator.OLAPQuery; //导入依赖的package包/类
public Enumerable<Object[]> executeLookupTableQuery(DataContext optiqContext, int ctxSeq) {
    return new OLAPQuery(optiqContext, EnumeratorTypeEnum.LOOKUP_TABLE, ctxSeq);
}
 
开发者ID:apache,项目名称:kylin,代码行数:4,代码来源:OLAPTable.java

示例7: executeHiveQuery

import org.apache.kylin.query.enumerator.OLAPQuery; //导入依赖的package包/类
public Enumerable<Object[]> executeHiveQuery(DataContext optiqContext, int ctxSeq) {
    return new OLAPQuery(optiqContext, EnumeratorTypeEnum.HIVE, ctxSeq);
}
 
开发者ID:apache,项目名称:kylin,代码行数:4,代码来源:OLAPTable.java

示例8: executeIndexQuery

import org.apache.kylin.query.enumerator.OLAPQuery; //导入依赖的package包/类
public Enumerable<Object[]> executeIndexQuery(DataContext optiqContext, int ctxSeq) {
    return new OLAPQuery(optiqContext, EnumeratorTypeEnum.INDEX, ctxSeq);
}
 
开发者ID:KylinOLAP,项目名称:Kylin,代码行数:4,代码来源:OLAPTable.java


注:本文中的org.apache.kylin.query.enumerator.OLAPQuery类示例由纯净天空整理自Github/MSDocs等开源代码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。