Search in sources :

Example 16 with KuduPredicate

use of org.apache.kudu.client.KuduPredicate 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

KuduPredicate (org.apache.kudu.client.KuduPredicate)16 ColumnSchema (org.apache.kudu.ColumnSchema)10 HiveStoragePredicateHandler (org.apache.hadoop.hive.ql.metadata.HiveStoragePredicateHandler)7 ExprNodeColumnDesc (org.apache.hadoop.hive.ql.plan.ExprNodeColumnDesc)7 ExprNodeDesc (org.apache.hadoop.hive.ql.plan.ExprNodeDesc)7 ExprNodeGenericFuncDesc (org.apache.hadoop.hive.ql.plan.ExprNodeGenericFuncDesc)7 PrimitiveTypeInfo (org.apache.hadoop.hive.serde2.typeinfo.PrimitiveTypeInfo)7 Test (org.junit.Test)7 ArrayList (java.util.ArrayList)6 ExprNodeConstantDesc (org.apache.hadoop.hive.ql.plan.ExprNodeConstantDesc)6 KuduScanner (org.apache.kudu.client.KuduScanner)6 IOException (java.io.IOException)5 GoraException (org.apache.gora.util.GoraException)4 GenericUDFOPNot (org.apache.hadoop.hive.ql.udf.generic.GenericUDFOPNot)4 KuduException (org.apache.kudu.client.KuduException)4 GenericUDF (org.apache.hadoop.hive.ql.udf.generic.GenericUDF)3 GenericUDFOPEqualOrGreaterThan (org.apache.hadoop.hive.ql.udf.generic.GenericUDFOPEqualOrGreaterThan)3 RowResult (org.apache.kudu.client.RowResult)3 GenericUDFOPAnd (org.apache.hadoop.hive.ql.udf.generic.GenericUDFOPAnd)2 GenericUDFOPEqualOrLessThan (org.apache.hadoop.hive.ql.udf.generic.GenericUDFOPEqualOrLessThan)2