本文整理汇总了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()));
}
示例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);
}
示例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);
}
示例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()));
}
示例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()));
}
示例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()));
}
示例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()));
}
示例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()));
}
示例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();
}
示例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());
}
示例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()));
}
示例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()));
}
示例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()));
}
示例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()));
}
示例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;
}