projectColumns.add("float"); KuduScanner scanner = client.newScannerBuilder(table) .setProjectedColumnNames(projectColumns) .build(); while (scanner.hasMoreRows()) { RowResultIterator results = scanner.nextRows();
((AbstractAttribute) attribute).getJPAColumnName(), type).build(); KuduPredicate predicate = KuduDBDataHandler.getEqualComparisonPredicate(column, type, value); scannerBuilder.addPredicate(predicate);
scannerBuilder.setProjectedColumnNames(querySchema); KuduPredicate.ComparisonOp predicateOp = recordcount == 1 ? EQUAL : GREATER_EQUAL; KuduPredicate predicate = KuduPredicate.newComparisonPredicate(column, predicateOp, startkey); scannerBuilder.addPredicate(predicate); scannerBuilder.limit(recordcount); // currently noop KuduScanner scanner = scannerBuilder.build();
assertEquals(rows, collectRows(client.newScannerBuilder(table).build())); KuduScanner scanner = client.newScannerBuilder(table).lowerBound(lowerBound).build(); Set<Row> results = collectRows(scanner); assertEquals(expected, results); .exclusiveUpperBound(upperBound) .build(); Set<Row> results = collectRows(scanner); assertEquals(expected, results); .lowerBound(lowerBound) .exclusiveUpperBound(upperBound) .build(); Set<Row> results = collectRows(scanner); assertEquals(expected, results); .lowerBoundPartitionKeyRaw(tablet.getPartition().getPartitionKeyStart()) .exclusiveUpperBoundPartitionKeyRaw(tablet.getPartition().getPartitionKeyEnd()) .build(); Set<Row> tabletResults = collectRows(scanner); Set<Row> intersection = Sets.intersection(results, tabletResults); .lowerBound(lowerBound) .exclusiveUpperBound(upperBound) .lowerBoundPartitionKeyRaw(tablet.getPartition().getPartitionKeyStart()) .exclusiveUpperBoundPartitionKeyRaw(tablet.getPartition().getPartitionKeyEnd()) .build(); Set<Row> tabletResults = collectRows(scanner);
assertEquals(6, countRowsInScan(client.newScannerBuilder(table).build()));
builder.setProjectedColumnIndexes(columns); builder.addPredicate(KuduPredicate.fromPB(table.getSchema(), pred)); builder.lowerBoundRaw(message.getLowerBoundPrimaryKey().toByteArray()); builder.exclusiveUpperBoundRaw(message.getUpperBoundPrimaryKey().toByteArray()); builder.lowerBoundPartitionKeyRaw(message.getLowerBoundPartitionKey().toByteArray()); builder.exclusiveUpperBoundPartitionKeyRaw(message.getUpperBoundPartitionKey().toByteArray()); builder.limit(message.getLimit()); switch (message.getReadMode()) { case READ_AT_SNAPSHOT: { builder.readMode(AsyncKuduScanner.ReadMode.READ_AT_SNAPSHOT); if (message.hasSnapTimestamp()) { builder.snapshotTimestampRaw(message.getSnapTimestamp()); builder.readMode(AsyncKuduScanner.ReadMode.READ_LATEST); break; builder.readMode(AsyncKuduScanner.ReadMode.READ_YOUR_WRITES); break; switch (message.getReplicaSelection()) { case LEADER_ONLY: { builder.replicaSelection(ReplicaSelection.LEADER_ONLY);
session.apply(insert); KuduScanner scanner = client.newScannerBuilder(table).build(); while (scanner.hasMoreRows()) { RowResultIterator it = scanner.nextRows();
session.close(); KuduScanner scanner = client.newScannerBuilder(table).build(); while (scanner.hasMoreRows()) { RowResultIterator it = scanner.nextRows();
KuduScanner scanner = new KuduScanner.KuduScannerBuilder(asyncClient, table) .replicaSelection(ReplicaSelection.CLOSEST_REPLICA) .batchSizeBytes(100) // Use a small batch size so we can call nextRows many times. .build();
boolean finishFirstScan) throws Exception { KuduScanner scanner = harness.getClient().newScannerBuilder(table) .setFaultTolerant(isFaultTolerant) .batchSizeBytes(1) .setProjectedColumnIndexes(Lists.newArrayList(0)).build();
scanBuilder.addPredicate(predicate); scanBuilder.lowerBoundPartitionKeyRaw(lowerBoundPartitionKey); scanBuilder.exclusiveUpperBoundPartitionKeyRaw(upperBoundPartitionKey);
KuduScanner.KuduScannerBuilder builder = client.newScannerBuilder(table) .scanRequestTimeout(timeout); PartialRow row = table.getSchema().newPartialRow(); row.addLong(0, Long.parseLong(cmd.getOptionValue("s"))); builder.lowerBound(row); builder.exclusiveUpperBound(row); KuduScanner scanner = builder.build(); while (scanner.hasMoreRows() && count < limit) { RowResultIterator rowResults = scanner.nextRows();
rowStrings.get(4)); KuduScanner scanner = client.newScannerBuilder(table).build();
.setProjectedColumnNames(Lists.newArrayList("c0", "c1")).build(); while (scanner.hasMoreRows()) { scanner.nextRows(); .setProjectedColumnNames(Lists.newArrayList("c0Key", "c1")).build(); while (scanner.hasMoreRows()) { RowResultIterator it = scanner.nextRows();
KuduScanner scanner = new KuduScanner.KuduScannerBuilder(asyncClient, table) .replicaSelection(ReplicaSelection.CLOSEST_REPLICA) .batchSizeBytes(100) // Use a small batch size so we can call nextRows many times. .build();
.setFaultTolerant(isFaultTolerant) .batchSizeBytes(1) .build();
KuduScanner scanner = getScannerBuilder().build();
assertTrue(response.getRowError().getErrorStatus().isTimedOut()); KuduScanner lowTimeoutScanner = lowTimeoutsClient.newScannerBuilder(table).build(); try { lowTimeoutScanner.nextRows();