Search in sources :

Example 16 with KuduScanner

use of org.apache.kudu.client.KuduScanner in project gora by apache.

the class KuduStore method createScanner.

private KuduScanner createScanner(List<KuduPredicate> predicates, List<String> projColumns, long limit) {
    KuduScanner.KuduScannerBuilder scannerBuilder = client.newScannerBuilder(table);
    if (limit != -1) {
        scannerBuilder.limit(limit);
    }
    scannerBuilder.setProjectedColumnNames(projColumns);
    for (KuduPredicate predicate : predicates) {
        scannerBuilder.addPredicate(predicate);
    }
    return scannerBuilder.build();
}
Also used : KuduScanner(org.apache.kudu.client.KuduScanner) KuduPredicate(org.apache.kudu.client.KuduPredicate)

Aggregations

KuduScanner (org.apache.kudu.client.KuduScanner)16 RowResult (org.apache.kudu.client.RowResult)10 ArrayList (java.util.ArrayList)9 RowResultIterator (org.apache.kudu.client.RowResultIterator)8 KuduTable (org.apache.kudu.client.KuduTable)7 ColumnSchema (org.apache.kudu.ColumnSchema)6 KuduException (org.apache.kudu.client.KuduException)6 KuduPredicate (org.apache.kudu.client.KuduPredicate)6 IOException (java.io.IOException)4 GoraException (org.apache.gora.util.GoraException)4 KuduClient (org.apache.kudu.client.KuduClient)4 PartialRow (org.apache.kudu.client.PartialRow)4 KuduSession (org.apache.kudu.client.KuduSession)3 Schema (org.apache.kudu.Schema)2 CreateTableOptions (org.apache.kudu.client.CreateTableOptions)2 Insert (org.apache.kudu.client.Insert)2 ListTablesResponse (org.apache.kudu.client.ListTablesResponse)2 PrestoException (com.facebook.presto.spi.PrestoException)1 BigDecimal (java.math.BigDecimal)1 Timestamp (java.sql.Timestamp)1