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


Java ConnectorTableLayout类代码示例

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


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

示例1: getTableLayouts

import com.facebook.presto.spi.ConnectorTableLayout; //导入依赖的package包/类
/**
 * Return a list of table layouts that satisfy the given constraint.
 * <p>
 * For each layout, connectors must return an "unenforced constraint" representing the part of the constraint summary that isn't guaranteed by the layout.
 *
 * @param session session
 * @param table table
 * @param constraint constraint
 * @param desiredColumns desired columns
 */
@Override
public List<ConnectorTableLayoutResult> getTableLayouts(ConnectorSession session, ConnectorTableHandle table, Constraint<ColumnHandle> constraint, Optional<Set<ColumnHandle>> desiredColumns)
{
    // get table name from ConnectorTableHandle
    HDFSTableHandle hdfsTable = checkType(table, HDFSTableHandle.class, "table");
    SchemaTableName tableName = hdfsTable.getSchemaTableName();
    // create HDFSTableLayoutHandle
    HDFSTableLayoutHandle tableLayout = metaDataQuery.getTableLayout(connectorId, tableName.getSchemaName(), tableName.getTableName()).orElse(null);
    tableLayout.setPredicates(constraint.getSummary() != null ? Optional.of(constraint.getSummary()) : Optional.empty());
    // ConnectorTableLayout layout = new ConnectorTableLayout(HDFSTableLayoutHandle)
    ConnectorTableLayout layout = getTableLayout(session, tableLayout);

    return ImmutableList.of(new ConnectorTableLayoutResult(layout, constraint.getSummary()));
}
 
开发者ID:dbiir,项目名称:paraflow,代码行数:25,代码来源:HDFSMetadata.java

示例2: getTableLayout

import com.facebook.presto.spi.ConnectorTableLayout; //导入依赖的package包/类
@Override
public ConnectorTableLayout getTableLayout(ConnectorSession session, ConnectorTableLayoutHandle handle)
{
    // TODO add fiber and timestamp as new LocalProperty into ConnectorTableLayout ?
    HDFSTableLayoutHandle layoutHandle = checkType(handle, HDFSTableLayoutHandle.class, "tableLayoutHandle");
    return new ConnectorTableLayout(layoutHandle);
}
 
开发者ID:dbiir,项目名称:paraflow,代码行数:8,代码来源:HDFSMetadata.java

示例3: getTableLayout

import com.facebook.presto.spi.ConnectorTableLayout; //导入依赖的package包/类
@Override
public ConnectorTableLayout getTableLayout(ConnectorSession connectorSession, ConnectorTableLayoutHandle connectorTableLayoutHandle)
{

    RestConnectorTableLayoutHandle tableLayoutHandle = Types.checkType(connectorTableLayoutHandle, RestConnectorTableLayoutHandle.class, "tableLayoutHandle");
    return new ConnectorTableLayout(tableLayoutHandle);
}
 
开发者ID:prestodb-rocks,项目名称:presto-rest,代码行数:8,代码来源:RestMetadata.java

示例4: getTableLayouts

import com.facebook.presto.spi.ConnectorTableLayout; //导入依赖的package包/类
@Override
public List<ConnectorTableLayoutResult> getTableLayouts(ConnectorSession session, ConnectorTableHandle table, Constraint<ColumnHandle> constraint, Optional<Set<ColumnHandle>> desiredColumns)
{
    KuduTableHandle tableHandle = checkType(table, KuduTableHandle.class, "tableHandle");
    ConnectorTableLayout layout = new ConnectorTableLayout(new KuduTableLayoutHandle(tableHandle, constraint.getSummary()));
    return ImmutableList.of(new ConnectorTableLayoutResult(layout, constraint.getSummary()));
}
 
开发者ID:trackingio,项目名称:presto-kudu,代码行数:8,代码来源:KuduMetadata.java

示例5: getTableLayouts

import com.facebook.presto.spi.ConnectorTableLayout; //导入依赖的package包/类
@Override
public List<ConnectorTableLayoutResult> getTableLayouts(ConnectorSession session, ConnectorTableHandle table, Constraint<ColumnHandle> constraint, Optional<Set<ColumnHandle>> desiredColumns)
{
    KafkaTableHandle handle = convertTableHandle(table);
    ConnectorTableLayout layout = new ConnectorTableLayout(new KafkaTableLayoutHandle(handle));
    return ImmutableList.of(new ConnectorTableLayoutResult(layout, constraint.getSummary()));
}
 
开发者ID:y-lan,项目名称:presto,代码行数:8,代码来源:KafkaMetadata.java

示例6: getTableLayouts

import com.facebook.presto.spi.ConnectorTableLayout; //导入依赖的package包/类
@Override
public List<ConnectorTableLayoutResult> getTableLayouts(ConnectorSession session, ConnectorTableHandle table, Constraint<ColumnHandle> constraint, Optional<Set<ColumnHandle>> desiredColumns)
{
    ExampleTableHandle tableHandle = checkType(table, ExampleTableHandle.class, "table");
    ConnectorTableLayout layout = new ConnectorTableLayout(new ExampleTableLayoutHandle(tableHandle));
    return ImmutableList.of(new ConnectorTableLayoutResult(layout, constraint.getSummary()));
}
 
开发者ID:y-lan,项目名称:presto,代码行数:8,代码来源:ExampleMetadata.java

示例7: getTableLayouts

import com.facebook.presto.spi.ConnectorTableLayout; //导入依赖的package包/类
@Override
public List<ConnectorTableLayoutResult> getTableLayouts(ConnectorSession session, ConnectorTableHandle table, Constraint<ColumnHandle> constraint, Optional<Set<ColumnHandle>> desiredColumns)
{
    RaptorTableHandle handle = checkType(table, RaptorTableHandle.class, "table");
    ConnectorTableLayout layout = new ConnectorTableLayout(new RaptorTableLayoutHandle(handle, constraint.getSummary()));
    return ImmutableList.of(new ConnectorTableLayoutResult(layout, constraint.getSummary()));
}
 
开发者ID:y-lan,项目名称:presto,代码行数:8,代码来源:RaptorMetadata.java

示例8: getTableLayouts

import com.facebook.presto.spi.ConnectorTableLayout; //导入依赖的package包/类
@Override
public List<ConnectorTableLayoutResult> getTableLayouts(
        ConnectorSession session,
        ConnectorTableHandle table,
        Constraint<ColumnHandle> constraint,
        Optional<Set<ColumnHandle>> desiredColumns)
{
    RedisTableHandle tableHandle = convertTableHandle(table);

    ConnectorTableLayout layout = new ConnectorTableLayout(new RedisTableLayoutHandle(tableHandle));

    return ImmutableList.of(new ConnectorTableLayoutResult(layout, constraint.getSummary()));
}
 
开发者ID:y-lan,项目名称:presto,代码行数:14,代码来源:RedisMetadata.java

示例9: getTableLayout

import com.facebook.presto.spi.ConnectorTableLayout; //导入依赖的package包/类
@Override
public ConnectorTableLayout getTableLayout(ConnectorSession session, ConnectorTableLayoutHandle handle)
{
    RedisTableLayoutHandle layout = convertLayout(handle);

    // tables in this connector have a single layout
    return getTableLayouts(session, layout.getTable(), Constraint.<ColumnHandle>alwaysTrue(), Optional.empty())
            .get(0)
            .getTableLayout();
}
 
开发者ID:y-lan,项目名称:presto,代码行数:11,代码来源:RedisMetadata.java

示例10: getTableLayout

import com.facebook.presto.spi.ConnectorTableLayout; //导入依赖的package包/类
@Override
public ConnectorTableLayout getTableLayout(ConnectorSession session, ConnectorTableLayoutHandle handle)
{
    return new ConnectorTableLayout(
            handle,
            Optional.empty(),
            TupleDomain.none(),
            Optional.empty(),
            Optional.empty(),
            ImmutableList.of());
}
 
开发者ID:y-lan,项目名称:presto,代码行数:12,代码来源:BlackHoleMetadata.java

示例11: getTableLayouts

import com.facebook.presto.spi.ConnectorTableLayout; //导入依赖的package包/类
@Override
public List<ConnectorTableLayoutResult> getTableLayouts(ConnectorSession session, ConnectorTableHandle table, Constraint<ColumnHandle> constraint, Optional<Set<ColumnHandle>> desiredColumns)
{
    JmxTableHandle handle = checkType(table, JmxTableHandle.class, "table");
    ConnectorTableLayout layout = new ConnectorTableLayout(new JmxTableLayoutHandle(handle, constraint.getSummary()));
    return ImmutableList.of(new ConnectorTableLayoutResult(layout, constraint.getSummary()));
}
 
开发者ID:y-lan,项目名称:presto,代码行数:8,代码来源:JmxMetadata.java

示例12: getTableLayouts

import com.facebook.presto.spi.ConnectorTableLayout; //导入依赖的package包/类
@Override
public List<ConnectorTableLayoutResult> getTableLayouts(ConnectorSession session, ConnectorTableHandle table, Constraint<ColumnHandle> constraint, Optional<Set<ColumnHandle>> desiredColumns)
{
    JdbcTableHandle tableHandle = checkType(table, JdbcTableHandle.class, "table");
    ConnectorTableLayout layout = new ConnectorTableLayout(new JdbcTableLayoutHandle(tableHandle, constraint.getSummary()));
    return ImmutableList.of(new ConnectorTableLayoutResult(layout, constraint.getSummary()));
}
 
开发者ID:y-lan,项目名称:presto,代码行数:8,代码来源:JdbcMetadata.java

示例13: getTableLayouts

import com.facebook.presto.spi.ConnectorTableLayout; //导入依赖的package包/类
@Override
public List<ConnectorTableLayoutResult> getTableLayouts(ConnectorSession session, ConnectorTableHandle table, Constraint<ColumnHandle> constraint, Optional<Set<ColumnHandle>> desiredColumns)
{
    InformationSchemaTableHandle handle = checkType(table, InformationSchemaTableHandle.class, "table");
    ConnectorTableLayout layout = new ConnectorTableLayout(new InformationSchemaTableLayoutHandle(handle, constraint.getSummary()));
    return ImmutableList.of(new ConnectorTableLayoutResult(layout, constraint.getSummary()));
}
 
开发者ID:y-lan,项目名称:presto,代码行数:8,代码来源:InformationSchemaMetadata.java

示例14: getTableLayouts

import com.facebook.presto.spi.ConnectorTableLayout; //导入依赖的package包/类
@Override
public List<ConnectorTableLayoutResult> getTableLayouts(ConnectorSession session, ConnectorTableHandle table, Constraint<ColumnHandle> constraint, Optional<Set<ColumnHandle>> desiredColumns)
{
    SystemTableHandle tableHandle = checkType(table, SystemTableHandle.class, "table");
    ConnectorTableLayout layout = new ConnectorTableLayout(new SystemTableLayoutHandle(tableHandle.getConnectorId(), tableHandle, constraint.getSummary()));
    return ImmutableList.of(new ConnectorTableLayoutResult(layout, constraint.getSummary()));
}
 
开发者ID:y-lan,项目名称:presto,代码行数:8,代码来源:SystemTablesMetadata.java

示例15: TableLayout

import com.facebook.presto.spi.ConnectorTableLayout; //导入依赖的package包/类
public TableLayout(TableLayoutHandle handle, ConnectorTableLayout layout)
{
    requireNonNull(handle, "handle is null");
    requireNonNull(layout, "layout is null");

    this.handle = handle;
    this.layout = layout;
}
 
开发者ID:y-lan,项目名称:presto,代码行数:9,代码来源:TableLayout.java


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