private void findNext(boolean fromRunQuery) { nextValue = null; if (rowsIterator == null) { return; } while (rowsIterator.hasNext() && nextValue == null) { Row<K, String, String> row = rowsIterator.next(); lastReadValue = row.getKey(); if (!row.getColumnSlice().getColumns().isEmpty()) { nextValue = lastReadValue; } } if (!rowsIterator.hasNext() && nextValue == null) { runQuery(lastReadValue, endKey); } }
@Deprecated /* * When pulling deprecated methods out, do not remove this but change it to private constructor */ public KeyIterator(Keyspace keyspace, String columnFamily, Serializer<K> serializer, K start, K end, int maxRowCount) { query = HFactory .createRangeSlicesQuery(keyspace, serializer, stringSerializer, stringSerializer) .setColumnFamily(columnFamily) .setRange(null, null, false, maxColumnCount) .setRowCount(maxRowCount); endKey = end; if(maxRowCount < Integer.MAX_VALUE) { rowCount = maxRowCount+1; //to compensate the first entry skip (except in first run) } runQuery(start, end); }
private void findNext(boolean fromRunQuery) { nextValue = null; if (rowsIterator == null) { return; } while (rowsIterator.hasNext() && nextValue == null) { Row<K, String, String> row = rowsIterator.next(); lastReadValue = row.getKey(); if (!row.getColumnSlice().getColumns().isEmpty()) { nextValue = lastReadValue; } } if (!rowsIterator.hasNext() && nextValue == null) { runQuery(lastReadValue, endKey); } }
private void findNext(boolean fromRunQuery) { nextValue = null; if (rowsIterator == null) { return; } while (rowsIterator.hasNext() && nextValue == null) { Row<K, String, String> row = rowsIterator.next(); lastReadValue = row.getKey(); if (!row.getColumnSlice().getColumns().isEmpty()) { nextValue = lastReadValue; } } if (!rowsIterator.hasNext() && nextValue == null) { runQuery(lastReadValue, endKey); } }
@Deprecated /* * When pulling deprecated methods out, do not remove this but change it to private constructor */ public KeyIterator(Keyspace keyspace, String columnFamily, Serializer<K> serializer, K start, K end, int maxRowCount) { query = HFactory .createRangeSlicesQuery(keyspace, serializer, stringSerializer, stringSerializer) .setColumnFamily(columnFamily) .setRange(null, null, false, maxColumnCount) .setRowCount(maxRowCount); endKey = end; if(maxRowCount < Integer.MAX_VALUE) { rowCount = maxRowCount+1; //to compensate the first entry skip (except in first run) } runQuery(start, end); }
public KeyIterator(Keyspace keyspace, String columnFamily, Serializer<K> serializer, K start, K end, int maxRowCount) { query = HFactory .createRangeSlicesQuery(keyspace, serializer, stringSerializer, stringSerializer) .setColumnFamily(columnFamily) .setRange(null, null, false, maxColumnCount) .setRowCount(maxRowCount); endKey = end; runQuery(start, end); }