Java 类com.facebook.presto.spi.TupleDomain 实例源码

项目:presto-riak    文件:CoverageRecordSet.java   
public CoverageRecordSet(CoverageSplit split,
                         List<RiakColumnHandle> columnHandles,
                         RiakConfig riakConfig,
                         TupleDomain<ColumnHandle> tupleDomain,
                         DirectConnection directConnection) {
    this.split = checkNotNull(split, "split is null");
    this.columnHandles = checkNotNull(columnHandles, "column handles is null");


    ImmutableList.Builder<Type> types = ImmutableList.builder();
    for (RiakColumnHandle column : columnHandles) {
        types.add(column.getColumn().getType());
    }
    this.types = types.build();
    this.tupleDomain = checkNotNull(tupleDomain);
    this.directConnection = checkNotNull(directConnection);
}
项目:presto-kafka-connector    文件:KafkaSplitManager.java   
@Override
public PartitionResult getPartitions(TableHandle tableHandle,
        TupleDomain tupleDomain)
{
    checkNotNull(tableHandle, "tableHandle is null");
    SchemaTableName tableName = getTableName(tableHandle);
    Table table;
    try {
        table = metastore().getTable(tableName.getSchemaName(),
                tableName.getTableName());
        Map<String, String> props = table.getParameters();
        if (!KafkaTableHandle.kafkaTableMarkPresent(props))
        {
            throw new RuntimeException("table not a kakfa mapped table.");
        }
    } catch (NoSuchObjectException e) {
        throw new RuntimeException(tableName + " not found.");
    }

    return hiveClient.getPartitions(tableHandle, tupleDomain);
}
项目:presto-riak    文件:CoverageSplit.java   
@JsonCreator
public CoverageSplit(
        @JsonProperty("tableHandle") RiakTableHandle tableHandle,
        @JsonProperty("table") PRTable table,
        @JsonProperty("host") String host,
        @JsonProperty("splitData") String splitData,
        @JsonProperty("tupleDomain") TupleDomain<ColumnHandle> tupleDomain) {

    this.tableHandle = checkNotNull(tableHandle);
    this.table = checkNotNull(table);
    this.host = checkNotNull(host);
    this.splitData = checkNotNull(splitData);
    this.tupleDomain = checkNotNull(tupleDomain);
}
项目:presto-riak    文件:RiakPartition.java   
public RiakPartition(String schemaName,
                     String tableName,
                     TupleDomain<ColumnHandle> tupleDomain,
                     List<String> indexedColumns
) {
    this.schemaName = checkNotNull(schemaName, "schema name is null");
    this.tableName = checkNotNull(tableName, "table name is null");
    this.tupleDomain = checkNotNull(tupleDomain);
    this.indexedColumns = checkNotNull(indexedColumns);
}
项目:presto-riak    文件:TestSerialization.java   
@Test
public void testCoverageSplit() {
    RiakTableHandle handle = new RiakTableHandle("c", "s", "t");
    PRTable table = TestPRTable.example("boom");
    CoverageSplit coverageSplit = new CoverageSplit(handle,
            table, "192.168.0.1", "", TupleDomain.<ColumnHandle>all());
    String s = MetadataUtil.COV_CODEC.toJson(coverageSplit);

    CoverageSplit cs2 = MetadataUtil.COV_CODEC.fromJson(s);
    assert(coverageSplit.getTableHandle().getTableName()
            .equals(cs2.getTableHandle().getTableName()));
}
项目:cloudata    文件:CloudataSplitManager.java   
@Override
public PartitionResult getPartitions(TableHandle table, TupleDomain tupleDomain) {
    // checkArgument(table instanceof CloudataTableHandle, "tableHandle is not an instance of CloudataTableHandle");
    assert table instanceof CloudataTableHandle;
    CloudataTableHandle tableHandle = (CloudataTableHandle) table;

    // example connector has only one partition
    List<Partition> partitions = ImmutableList.<Partition> of(new CloudataPartition(tableHandle.getSchemaName(),
            tableHandle.getTableName()));
    // example connector does not do any additional processing/filtering with the TupleDomain, so just return the
    // whole TupleDomain

    return new PartitionResult(partitions, tupleDomain);
}
项目:cloudata    文件:MockSplitManager.java   
@Override
public PartitionResult getPartitions(TableHandle tableHandle, TupleDomain tupleDomain) {
    checkArgument(tableHandle instanceof MockTableHandle, "tableHandle is not an instance of MockTableHandle");
    MockTableHandle exampleTableHandle = (MockTableHandle) tableHandle;

    // example connector has only one partition
    List<Partition> partitions = ImmutableList.<Partition> of(new MockPartition(exampleTableHandle.getSchemaName(),
            exampleTableHandle.getTableName()));
    // example connector does not do any additional processing/filtering with the TupleDomain, so just return the
    // whole TupleDomain
    ;
    return new PartitionResult(partitions, tupleDomain);
}
项目:presto-riak    文件:CoverageSplit.java   
@JsonProperty
public TupleDomain<ColumnHandle> getTupleDomain() {
    return tupleDomain;
}
项目:presto-riak    文件:RiakPartition.java   
@Override
public TupleDomain<ColumnHandle> getTupleDomain() {
    return tupleDomain;
}
项目:presto-kafka-connector    文件:KafkaHiveClient.java   
public PartitionResult getPartitions(TableHandle tableHandle,
    TupleDomain tupleDomain) {
  TableHandle newHandle = castToHiveTableHandle(tableHandle);
  return this.hiveClient.getPartitions(newHandle, tupleDomain);
}
项目:cloudata    文件:CloudataPartition.java   
@Override
public TupleDomain getTupleDomain() {
    return TupleDomain.all();
}
项目:cloudata    文件:MockPartition.java   
@Override
public TupleDomain getTupleDomain() {
    return TupleDomain.all();
}